]>
Commit | Line | Data |
---|---|---|
2dab9030 | 1 | #ifndef ALIRSNMOTHER_H |
2 | #define ALIRSNMOTHER_H | |
3 | ||
7356f978 | 4 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * |
5 | * See cxx source for full Copyright notice */ | |
6 | ||
7 | //////////////////////////////////////////////////////////////////////////////// | |
8 | // | |
9 | // Interface to candidate resonance decaying into 2 bodies. | |
10 | // | |
11 | //////////////////////////////////////////////////////////////////////////////// | |
12 | ||
d7712d44 | 13 | #include <TMath.h> |
2dab9030 | 14 | #include "AliRsnDaughter.h" |
15 | ||
d7712d44 | 16 | class AliRsnEvent; |
17 | ||
2a1c7696 | 18 | class AliRsnMother : public TObject { |
19 | public: | |
20 | ||
d7712d44 | 21 | AliRsnMother() : fRefEvent(0), fSum(), fSumMC() {fDaughter[0] = fDaughter[1] = 0;} |
2a1c7696 | 22 | AliRsnMother(const AliRsnMother &obj); |
23 | AliRsnMother& operator=(const AliRsnMother &obj); | |
24 | virtual ~AliRsnMother(); | |
25 | ||
d7712d44 | 26 | // setters (4-vectors cannot be set) |
27 | void SetDaughter(Int_t i, AliRsnDaughter *d) {fDaughter[CkID(i)] = d;} | |
28 | void SetRefEvent(AliRsnEvent *event) {fRefEvent = event;} | |
747592c1 | 29 | |
d7712d44 | 30 | // getters |
31 | AliRsnEvent* GetRefEvent() {return fRefEvent;} | |
32 | AliRsnDaughter* GetDaughter(const Int_t &i) {return fDaughter[CkID(i)];} | |
33 | TLorentzVector& Sum() {return fSum;} | |
34 | TLorentzVector& SumMC() {return fSumMC;} | |
35 | ||
36 | // checks | |
37 | Bool_t IsLabelEqual() const {return TMath::Abs(fDaughter[0]->GetLabel()) == TMath::Abs(fDaughter[1]->GetLabel());} | |
38 | Bool_t IsIndexEqual() const {return (fDaughter[0]->GetID() == fDaughter[1]->GetID());} | |
39 | Bool_t IsOwnerEqual() const {return (fDaughter[0]->GetOwnerEvent() == fDaughter[1]->GetOwnerEvent());} | |
40 | Int_t CommonMother() const {Int_t d0, d1; return CommonMother(d0, d1);} | |
41 | Int_t CommonMother(Int_t &m0, Int_t &m1) const; | |
42 | ||
43 | // useful computations/operations | |
44 | void ComputeSum(Double_t mass1, Double_t mass2); | |
245cd328 | 45 | Double_t AngleTo(AliRsnDaughter *track, Bool_t mc = kFALSE); |
d7712d44 | 46 | Double_t AngleToLeading(Bool_t &success); |
47 | Double_t CosThetaStar(Bool_t first = kTRUE, Bool_t useMC = kFALSE); | |
48 | void ResetPair(); | |
49 | void PrintInfo(const Option_t *option = "ALL") const; | |
50 | Bool_t CheckPair(Bool_t checkMC = kFALSE) const; | |
2a1c7696 | 51 | |
52 | private: | |
53 | ||
d7712d44 | 54 | Int_t CkID(Int_t i) {if (i < 1) return 0; else return 1;} |
55 | ||
2a1c7696 | 56 | AliRsnDaughter *fDaughter[2]; // elements of the pair |
d7712d44 | 57 | AliRsnEvent *fRefEvent; // reference event |
2a1c7696 | 58 | TLorentzVector fSum; // sum computed from the two daughters |
59 | TLorentzVector fSumMC; // sum computed from the two daughters | |
60 | ||
61 | ClassDef(AliRsnMother, 1) | |
2dab9030 | 62 | }; |
63 | ||
64 | #endif |