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 | |
13 | #include "TH1.h" |
14 | #include "TH2.h" |
15 | #include "TList.h" |
922688c0 |
16 | #include "TArrayI.h" |
5eb970a4 |
17 | #include "TClonesArray.h" |
aec0ec32 |
18 | |
19 | #include "AliRsnDaughter.h" |
20 | #include "AliRsnPairDef.h" |
5eb970a4 |
21 | #include "AliRsnPairParticle.h" |
aec0ec32 |
22 | #include "AliRsnEvent.h" |
23 | #include "AliRsnCutMgr.h" |
5eb970a4 |
24 | #include "AliRsnPIDIndex.h" |
aec0ec32 |
25 | |
26 | class AliRsnFunction; |
27 | |
28 | class AliRsnPair : public TObject |
29 | { |
30 | public: |
31 | |
32 | enum EPairType |
33 | { |
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 | |
78b94cbd |
43 | void Print(Option_t *option = "") const; |
5eb970a4 |
44 | void LoopPair(AliRsnPIDIndex *pidIndex1, AliRsnEvent *ev1, AliRsnPIDIndex *pidIndex2 = 0, AliRsnEvent *ev2 = 0); |
45 | void LoopPair(TArrayI *a1, TArrayI *a2, AliRsnEvent *ev1, AliRsnEvent *ev2 = 0); |
aec0ec32 |
46 | void SetCutMgr(AliRsnCutMgr* theValue) { fCutMgr = theValue; } |
47 | void AddFunction(AliRsnFunction *fcn); |
48 | TList* GenerateHistograms(TString prefix = ""); |
49 | void GenerateHistograms(TString prefix, TList *tgt); |
50 | |
15d5fd02 |
51 | Bool_t IsMixed() {return fIsMixed;} |
52 | Bool_t IsPairEqual() {if (fPIDMethod == AliRsnDaughter::kNoPID) return (fPairDef->IsLikeSign()); |
53 | else return (fPairDef->IsLikeSign() && fPairDef->HasEqualTypes());} |
54 | |
78b94cbd |
55 | TString GetPairTypeName(EPairType type) const; |
56 | TString GetPairName() const; |
57 | TString GetPairHistName(AliRsnFunction *fcn, TString text = "") const; |
58 | TString GetPairHistTitle(AliRsnFunction *fcn, TString text = "") const; |
aec0ec32 |
59 | |
60 | private: |
e0baff8c |
61 | |
aec0ec32 |
62 | AliRsnPair (const AliRsnPair ©) : TObject(copy), |
15d5fd02 |
63 | fIsMixed(kFALSE),fPairType(kPairTypes),fPIDMethod(AliRsnDaughter::kRealistic), |
5eb970a4 |
64 | fPairDef(0x0),fCutMgr(0x0),fFunctions("AliRsnFunction",0),fTrack1(),fTrack2(),fPairParticle() {} |
aec0ec32 |
65 | AliRsnPair& operator=(const AliRsnPair&) {return *this;} |
66 | |
15d5fd02 |
67 | void SetUp(EPairType type); |
68 | void SetAllFlags(AliRsnDaughter::EPIDMethod pid, Bool_t mix) {fPIDMethod = pid; fIsMixed = mix;} |
15d5fd02 |
69 | |
70 | Bool_t CutPass(AliRsnDaughter *d); |
71 | Bool_t CutPass(AliRsnPairParticle *p); |
72 | Bool_t CutPass(AliRsnEvent *e); |
73 | |
74 | Bool_t fIsMixed; // doing event-mixing ? |
75 | EPairType fPairType; // pair type (PID + mixing or not) |
76 | AliRsnDaughter::EPIDMethod fPIDMethod; // pid type variable for single track |
77 | |
78 | AliRsnPairDef *fPairDef; // pair definition (particles, charges) |
79 | AliRsnCutMgr *fCutMgr; // cut manager |
80 | TClonesArray fFunctions; // functions |
5eb970a4 |
81 | AliRsnDaughter fTrack1; // track #1 (external loop) |
82 | AliRsnDaughter fTrack2; // track #2 (internal loop) |
83 | AliRsnPairParticle fPairParticle; // track pair |
15d5fd02 |
84 | |
85 | ClassDef (AliRsnPair, 2) |
aec0ec32 |
86 | }; |
87 | |
88 | #endif |