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