]>
Commit | Line | Data |
---|---|---|
2dab9030 | 1 | // |
2 | // Class AliRsnMother | |
3 | // | |
4 | // Implementation of a pair of tracks, for several purposes | |
5 | // - computing the total 4-momentum & inv. mass for output histos filling | |
6 | // - evaluating cut checks on the pair of particles | |
7 | // - evaluating any kind of kinematic value over their sum | |
8 | // | |
9 | // authors: Martin Vala (martin.vala@cern.ch) | |
10 | // Alberto Pulvirenti (alberto.pulvirenti@ct.infn.it) | |
11 | // | |
12 | ||
13 | #ifndef ALIRSNMOTHER_H | |
14 | #define ALIRSNMOTHER_H | |
15 | ||
16 | #include <TLorentzVector.h> | |
17 | ||
a378358c | 18 | #include "AliRsnEvent.h" |
2dab9030 | 19 | #include "AliRsnDaughter.h" |
20 | ||
21 | class AliRsnPairDef; | |
22 | ||
23 | class AliRsnMother : public TObject | |
24 | { | |
25 | public: | |
26 | ||
27 | AliRsnMother(); | |
28 | AliRsnMother(const AliRsnMother &obj); | |
29 | AliRsnMother& operator=(const AliRsnMother &obj); | |
30 | virtual ~AliRsnMother(); | |
31 | ||
a378358c | 32 | TLorentzVector& Sum() {return fSum;} |
2dab9030 | 33 | TLorentzVector& SumMC() {return fSumMC;} |
2dab9030 | 34 | Double_t AngleTo(AliRsnDaughter track, Bool_t mc = kFALSE) const {return fSum.Angle(track.P(mc).Vect());} |
2e521c29 | 35 | Double_t CosThetaStar(Bool_t first = kTRUE, Bool_t useMC = kFALSE); |
2dab9030 | 36 | |
a378358c | 37 | AliRsnDaughter* GetDaughter (const Int_t &index) const {if (index==0||index==1) return fDaughter[index]; return 0x0;} |
38 | AliRsnDaughter& GetDaughterRef(const Int_t &index) const {if (index==1) return (*fDaughter[1]); return (*fDaughter[0]);} | |
2dab9030 | 39 | |
40 | Bool_t IsLabelEqual() const {return abs(fDaughter[0]->GetLabel()) == abs(fDaughter[1]->GetLabel());} | |
41 | Bool_t IsIndexEqual() const {return (fDaughter[0]->GetID() == fDaughter[1]->GetID());} | |
d0282f3d | 42 | Int_t CommonMother(Int_t &m0, Int_t &m1) const; |
43 | Int_t CommonMother() const {Int_t d0, d1; return CommonMother(d0,d1);} | |
2dab9030 | 44 | |
45 | void SetDaughters(AliRsnDaughter * const daughter1, Double_t mass1, AliRsnDaughter * const daughter2, Double_t mass2); | |
46 | void ResetPair(); | |
47 | void PrintInfo(const Option_t *option = "ALL") const; | |
48 | Bool_t CheckPair() const; | |
49 | Bool_t MatchesDef(AliRsnPairDef *pairDef); | |
50 | ||
51 | private: | |
52 | ||
53 | Bool_t fUseMC; // choose if momenta are taken from ESD/AOD or MC | |
2dab9030 | 54 | AliRsnDaughter *fDaughter[2]; // elements of the pair |
55 | TLorentzVector fSum; // sum computed from the two daughters | |
56 | TLorentzVector fSumMC; // sum computed from the two daughters | |
2dab9030 | 57 | |
58 | ClassDef(AliRsnMother,1) | |
59 | }; | |
60 | ||
61 | #endif |