4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
7 ////////////////////////////////////////////////////////////////////////////////
9 // Interface to candidate resonance decaying into 2 bodies.
11 ////////////////////////////////////////////////////////////////////////////////
14 #include "AliRsnDaughter.h"
18 class AliRsnMother : public TObject {
21 AliRsnMother() : fRefEvent(0), fSum(), fSumMC(), fRef(), fRefMC() {fDaughter[0] = fDaughter[1] = 0;}
22 AliRsnMother(const AliRsnMother &obj);
23 AliRsnMother& operator=(const AliRsnMother &obj);
24 virtual ~AliRsnMother();
26 // setters (4-vectors cannot be set)
28 void SetDaughter(Int_t i, AliRsnDaughter *d) {fDaughter[CkID(i)] = d;}
29 void SetRefEvent(AliRsnEvent *event) {fRefEvent = event;}
32 AliRsnEvent* GetRefEvent() {return fRefEvent;}
33 AliRsnDaughter* GetDaughter(const Int_t &i) {return fDaughter[CkID(i)];}
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);
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());}
42 Int_t CommonMother() const;
45 Double_t AngleTo(AliRsnDaughter *track, Bool_t mc = kFALSE) {return track->P(mc).Angle(Sum(mc).Vect());}
46 Double_t AngleToLeading(Bool_t &success);
49 void ComputeSum(Double_t mass1, Double_t mass2, Double_t motherMass);
50 Double_t CosThetaStar(Bool_t first = kTRUE, Bool_t useMC = kFALSE);
51 void PrintInfo(const Option_t *option = "ALL") const;
52 Bool_t CheckPair(Bool_t checkMC = kFALSE) const;
56 Int_t CkID(Int_t i) {if (i < 1) return 0; else return 1;}
58 AliRsnDaughter *fDaughter[2]; // elements of the pair
59 AliRsnEvent *fRefEvent; // reference event
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)
65 ClassDef(AliRsnMother, 1)