]>
Commit | Line | Data |
---|---|---|
aec0ec32 | 1 | // |
2 | // *** Class AliRsnPair *** | |
3 | // | |
4 | // TODO | |
5 | // | |
6 | // authors: A. Pulvirenti (email: alberto.pulvirenti@ct.infn.it) | |
7 | // M. Vala (email: martin.vala@cern.ch) | |
8 | // | |
9 | ||
10 | #ifndef ALIRSNPAIR_H | |
11 | #define ALIRSNPAIR_H | |
12 | ||
5eb970a4 | 13 | #include "TClonesArray.h" |
aec0ec32 | 14 | |
15 | #include "AliRsnDaughter.h" | |
16 | #include "AliRsnPairDef.h" | |
5eb970a4 | 17 | #include "AliRsnPairParticle.h" |
aec0ec32 | 18 | |
4fbb2459 | 19 | class TH1; |
20 | class TH2; | |
21 | class TList; | |
22 | class TArrayI; | |
23 | ||
24 | class AliRsnEvent; | |
25 | class AliRsnCutMgr; | |
26 | class AliRsnPIDIndex; | |
aec0ec32 | 27 | class AliRsnFunction; |
28 | ||
29 | class AliRsnPair : public TObject | |
30 | { | |
31 | public: | |
32 | ||
4fbb2459 | 33 | enum EPairType { |
e0baff8c | 34 | kNoPID = 0, kNoPIDMix, |
35 | kRealisticPID, kRealisticPIDMix, | |
36 | kPerfectPID, kPerfectPIDMix, | |
e0baff8c | 37 | kPairTypes |
aec0ec32 | 38 | }; |
39 | ||
15d5fd02 | 40 | AliRsnPair(EPairType type = kRealisticPID, AliRsnPairDef *def = 0); |
aec0ec32 | 41 | ~AliRsnPair(); |
42 | ||
4fbb2459 | 43 | void SetOnlyTrue(Bool_t onlyTrue = kTRUE) {fOnlyTrue = onlyTrue;} |
44 | ||
78b94cbd | 45 | void Print(Option_t *option = "") const; |
4fbb2459 | 46 | void LoopPair(AliRsnPIDIndex*const pidIndex1, AliRsnEvent*const ev1, AliRsnPIDIndex*const pidIndex2 = 0, AliRsnEvent* ev2 = 0); |
5eb970a4 | 47 | void LoopPair(TArrayI *a1, TArrayI *a2, AliRsnEvent *ev1, AliRsnEvent *ev2 = 0); |
4fbb2459 | 48 | void SetCutMgr(AliRsnCutMgr* const mgr) { fCutMgr = mgr; } |
49 | void AddFunction(AliRsnFunction*const fcn); | |
6f4a992c | 50 | TList* GenerateHistograms(TString prefix = "", TList *list=0); |
aec0ec32 | 51 | |
4fbb2459 | 52 | Bool_t IsMixed() const {return fIsMixed;} |
53 | Bool_t IsPairEqual() const { | |
54 | if (fPIDMethod == AliRsnDaughter::kNoPID) return (fPairDef->IsLikeSign()); | |
55 | else return (fPairDef->IsLikeSign() && fPairDef->HasEqualTypes()); | |
56 | } | |
15d5fd02 | 57 | |
78b94cbd | 58 | TString GetPairTypeName(EPairType type) const; |
59 | TString GetPairName() const; | |
4fbb2459 | 60 | TString GetPairHistName(AliRsnFunction *const fcn, TString text = "") const; |
61 | TString GetPairHistTitle(AliRsnFunction *const fcn, TString text = "") const; | |
aec0ec32 | 62 | |
63 | private: | |
e0baff8c | 64 | |
4fbb2459 | 65 | AliRsnPair(const AliRsnPair ©) : TObject(copy), |
9c67a289 | 66 | fOnlyTrue(kFALSE),fIsMixed(kFALSE),fPairType(kPairTypes),fPIDMethod(AliRsnDaughter::kRealistic), |
4fbb2459 | 67 | fPairDef(0x0),fCutMgr(0x0),fFunctions("AliRsnFunction",0),fTrack1(),fTrack2(),fPairParticle() {} |
aec0ec32 | 68 | AliRsnPair& operator=(const AliRsnPair&) {return *this;} |
69 | ||
15d5fd02 | 70 | void SetUp(EPairType type); |
71 | void SetAllFlags(AliRsnDaughter::EPIDMethod pid, Bool_t mix) {fPIDMethod = pid; fIsMixed = mix;} | |
15d5fd02 | 72 | |
73 | Bool_t CutPass(AliRsnDaughter *d); | |
74 | Bool_t CutPass(AliRsnPairParticle *p); | |
75 | Bool_t CutPass(AliRsnEvent *e); | |
76 | ||
4fbb2459 | 77 | Bool_t fOnlyTrue; // select true pairs only? |
15d5fd02 | 78 | Bool_t fIsMixed; // doing event-mixing ? |
79 | EPairType fPairType; // pair type (PID + mixing or not) | |
80 | AliRsnDaughter::EPIDMethod fPIDMethod; // pid type variable for single track | |
81 | ||
82 | AliRsnPairDef *fPairDef; // pair definition (particles, charges) | |
83 | AliRsnCutMgr *fCutMgr; // cut manager | |
84 | TClonesArray fFunctions; // functions | |
5eb970a4 | 85 | AliRsnDaughter fTrack1; // track #1 (external loop) |
86 | AliRsnDaughter fTrack2; // track #2 (internal loop) | |
87 | AliRsnPairParticle fPairParticle; // track pair | |
15d5fd02 | 88 | |
4fbb2459 | 89 | ClassDef(AliRsnPair, 2) |
aec0ec32 | 90 | }; |
91 | ||
92 | #endif |