X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=PWG2%2FRESONANCES%2FAliRsnPair.h;h=926d7465fffa8d43e4818a027f0ffba40c714498;hb=b37b954695b5c13427ef10ffb58e6d3e2127a39e;hp=c5507923f61e40c8eee079607e8a9dd4a80a2b06;hpb=6f4a992cae2bd2295c0b56d75c38b6bba5c41336;p=u%2Fmrichter%2FAliRoot.git diff --git a/PWG2/RESONANCES/AliRsnPair.h b/PWG2/RESONANCES/AliRsnPair.h index c5507923f61..926d7465fff 100644 --- a/PWG2/RESONANCES/AliRsnPair.h +++ b/PWG2/RESONANCES/AliRsnPair.h @@ -10,78 +10,65 @@ #ifndef ALIRSNPAIR_H #define ALIRSNPAIR_H -#include "TH1.h" -#include "TH2.h" -#include "TList.h" -#include "TArrayI.h" -#include "TClonesArray.h" +#include "TNamed.h" -#include "AliRsnDaughter.h" #include "AliRsnPairDef.h" -#include "AliRsnPairParticle.h" -#include "AliRsnEvent.h" -#include "AliRsnCutMgr.h" -#include "AliRsnPIDIndex.h" - -class AliRsnFunction; - -class AliRsnPair : public TObject -{ - public: - - enum EPairType - { - kNoPID = 0, kNoPIDMix, - kRealisticPID, kRealisticPIDMix, - kPerfectPID, kPerfectPIDMix, - kPairTypes - }; - - AliRsnPair(EPairType type = kRealisticPID, AliRsnPairDef *def = 0); - ~AliRsnPair(); - - void Print(Option_t *option = "") const; - void LoopPair(AliRsnPIDIndex *pidIndex1, AliRsnEvent *ev1, AliRsnPIDIndex *pidIndex2 = 0, AliRsnEvent *ev2 = 0); - void LoopPair(TArrayI *a1, TArrayI *a2, AliRsnEvent *ev1, AliRsnEvent *ev2 = 0); - void SetCutMgr(AliRsnCutMgr* theValue) { fCutMgr = theValue; } - void AddFunction(AliRsnFunction *fcn); - TList* GenerateHistograms(TString prefix = "", TList *list=0); - - Bool_t IsMixed() {return fIsMixed;} - Bool_t IsPairEqual() {if (fPIDMethod == AliRsnDaughter::kNoPID) return (fPairDef->IsLikeSign()); - else return (fPairDef->IsLikeSign() && fPairDef->HasEqualTypes());} - - TString GetPairTypeName(EPairType type) const; - TString GetPairName() const; - TString GetPairHistName(AliRsnFunction *fcn, TString text = "") const; - TString GetPairHistTitle(AliRsnFunction *fcn, TString text = "") const; - - private: - - AliRsnPair (const AliRsnPair ©) : TObject(copy), - fIsMixed(kFALSE),fPairType(kPairTypes),fPIDMethod(AliRsnDaughter::kRealistic), - fPairDef(0x0),fCutMgr(0x0),fFunctions("AliRsnFunction",0),fTrack1(),fTrack2(),fPairParticle() {} - AliRsnPair& operator=(const AliRsnPair&) {return *this;} - - void SetUp(EPairType type); - void SetAllFlags(AliRsnDaughter::EPIDMethod pid, Bool_t mix) {fPIDMethod = pid; fIsMixed = mix;} - - Bool_t CutPass(AliRsnDaughter *d); - Bool_t CutPass(AliRsnPairParticle *p); - Bool_t CutPass(AliRsnEvent *e); - - Bool_t fIsMixed; // doing event-mixing ? - EPairType fPairType; // pair type (PID + mixing or not) - AliRsnDaughter::EPIDMethod fPIDMethod; // pid type variable for single track - - AliRsnPairDef *fPairDef; // pair definition (particles, charges) - AliRsnCutMgr *fCutMgr; // cut manager - TClonesArray fFunctions; // functions - AliRsnDaughter fTrack1; // track #1 (external loop) - AliRsnDaughter fTrack2; // track #2 (internal loop) - AliRsnPairParticle fPairParticle; // track pair - - ClassDef (AliRsnPair, 2) +#include "AliRsnCutManager.h" +#include "AliRsnMother.h" + +class TList; + +class AliRsnPair : public TNamed { +public: + + AliRsnPair(const char *name = "default", AliRsnPairDef *def = 0); + AliRsnPair(const AliRsnPair ©); + AliRsnPair& operator=(const AliRsnPair&); + ~AliRsnPair(); + + // getters + Bool_t IsOnlyTrue() const {return fOnlyTrue;} + Bool_t IsCheckDecay() const {return fCheckDecay;} + Bool_t IsMixed() const {return fIsMixed;} + Int_t GetCount() const {return fCount;} + AliRsnPairDef* GetPairDef() {return fPairDef;} + AliRsnCutManager* GetCutManager() {return &fCutManager;} + AliRsnMother* GetMother() {return &fMother;} + + // shortcuts to data-member getters + AliRsnCutSet* GetCommonDaughterCuts() {return fCutManager.GetCommonDaughterCuts();} + AliRsnCutSet* GetDaughter1Cuts() {return fCutManager.GetDaughter1Cuts();} + AliRsnCutSet* GetDaughter2Cuts() {return fCutManager.GetDaughter2Cuts();} + AliRsnCutSet* GetMotherCuts() {return fCutManager.GetMotherCuts();} + + // setters (not for all members) + void SetOnlyTrue(Bool_t onlyTrue = kTRUE) {fOnlyTrue = onlyTrue;} + void SetCheckDecay(Bool_t check = kTRUE) {fCheckDecay = check;} + void SetMixed(Bool_t doit = kTRUE) {fIsMixed = doit;} + void SetCount(Int_t count) {fCount = count;} + void ResetCount() {fCount = 0;} + + // methods + Bool_t Fill(AliRsnDaughter *d0, AliRsnDaughter *d1, Bool_t refFirst = kTRUE); + virtual void Print(Option_t *option = "") const; + virtual void Compute(); + virtual void Init(const char *prefix, TList *list); + +protected: + + Bool_t fOnlyTrue; // select true pairs only? + Bool_t fCheckDecay; // is the decay channel correct in a true pair? + Bool_t fIsMixed; // is this an event-mixing? + Int_t fCount; // counter incremented for each added pair + + AliRsnPairDef *fPairDef; // pair definition (particles, charges) + AliRsnCutManager fCutManager; // collection of all cuts + AliRsnMother fMother; // mother candidate (to avoid creating it continuously) + +private: + + ClassDef(AliRsnPair, 2) }; #endif +