]>
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> |
b63357a0 | 14 | #include <TLorentzVector.h> |
15 | ||
2dab9030 | 16 | #include "AliRsnDaughter.h" |
17 | ||
d7712d44 | 18 | class AliRsnEvent; |
19 | ||
2a1c7696 | 20 | class AliRsnMother : public TObject { |
21 | public: | |
22 | ||
110620ce | 23 | AliRsnMother() : fRefEvent(0), fSum(), fSumMC(), fRef(), fRefMC() {fDaughter[0] = fDaughter[1] = 0;} |
2a1c7696 | 24 | AliRsnMother(const AliRsnMother &obj); |
25 | AliRsnMother& operator=(const AliRsnMother &obj); | |
26 | virtual ~AliRsnMother(); | |
27 | ||
d7712d44 | 28 | // setters (4-vectors cannot be set) |
f34f960b | 29 | void Reset(); |
d7712d44 | 30 | void SetDaughter(Int_t i, AliRsnDaughter *d) {fDaughter[CkID(i)] = d;} |
31 | void SetRefEvent(AliRsnEvent *event) {fRefEvent = event;} | |
747592c1 | 32 | |
d7712d44 | 33 | // getters |
34 | AliRsnEvent* GetRefEvent() {return fRefEvent;} | |
35 | AliRsnDaughter* GetDaughter(const Int_t &i) {return fDaughter[CkID(i)];} | |
f34f960b | 36 | TLorentzVector& Sum(Bool_t mc) {return (mc ? fSumMC : fSum);} |
37 | TLorentzVector& Ref(Bool_t mc) {return (mc ? fRefMC : fRef);} | |
38 | Bool_t GetResolution(Double_t &value); | |
b63357a0 | 39 | Double_t Rapidity(Bool_t mc) {if (mc) return fRefMC.Rapidity(); else return fRef.Rapidity();} |
d7712d44 | 40 | |
41 | // checks | |
42 | Bool_t IsLabelEqual() const {return TMath::Abs(fDaughter[0]->GetLabel()) == TMath::Abs(fDaughter[1]->GetLabel());} | |
43 | Bool_t IsIndexEqual() const {return (fDaughter[0]->GetID() == fDaughter[1]->GetID());} | |
44 | Bool_t IsOwnerEqual() const {return (fDaughter[0]->GetOwnerEvent() == fDaughter[1]->GetOwnerEvent());} | |
f34f960b | 45 | Int_t CommonMother() const; |
d7712d44 | 46 | |
f34f960b | 47 | // angles |
48 | Double_t AngleTo(AliRsnDaughter *track, Bool_t mc = kFALSE) {return track->P(mc).Angle(Sum(mc).Vect());} | |
d7712d44 | 49 | Double_t AngleToLeading(Bool_t &success); |
f34f960b | 50 | |
51 | // computations | |
52 | void ComputeSum(Double_t mass1, Double_t mass2, Double_t motherMass); | |
53 | Double_t CosThetaStar(Bool_t first = kTRUE, Bool_t useMC = kFALSE); | |
d7712d44 | 54 | void PrintInfo(const Option_t *option = "ALL") const; |
55 | Bool_t CheckPair(Bool_t checkMC = kFALSE) const; | |
2a1c7696 | 56 | |
57 | private: | |
58 | ||
b63357a0 | 59 | Int_t CkID(Int_t i) const {if (i < 1) return 0; else return 1;} |
d7712d44 | 60 | |
2a1c7696 | 61 | AliRsnDaughter *fDaughter[2]; // elements of the pair |
d7712d44 | 62 | AliRsnEvent *fRefEvent; // reference event |
f34f960b | 63 | TLorentzVector fSum; // sum computed from the two daughters (rec) |
64 | TLorentzVector fSumMC; // sum computed from the two daughters (sim) | |
65 | TLorentzVector fRef; // same to sum, but with fixed mass hypothesis (rec) | |
66 | TLorentzVector fRefMC; // same to sum, but with fixed mass hypothesis (sim) | |
2a1c7696 | 67 | |
68 | ClassDef(AliRsnMother, 1) | |
2dab9030 | 69 | }; |
70 | ||
71 | #endif |