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() {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)
27 void SetDaughter(Int_t i, AliRsnDaughter *d) {fDaughter[CkID(i)] = d;}
28 void SetRefEvent(AliRsnEvent *event) {fRefEvent = event;}
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;}
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;
43 // useful computations/operations
44 void ComputeSum(Double_t mass1, Double_t mass2);
45 Double_t AngleTo(AliRsnDaughter track, Bool_t mc = kFALSE);
46 Double_t AngleToLeading(Bool_t &success);
47 Double_t CosThetaStar(Bool_t first = kTRUE, Bool_t useMC = kFALSE);
49 void PrintInfo(const Option_t *option = "ALL") const;
50 Bool_t CheckPair(Bool_t checkMC = kFALSE) const;
54 Int_t CkID(Int_t i) {if (i < 1) return 0; else return 1;}
56 AliRsnDaughter *fDaughter[2]; // elements of the pair
57 AliRsnEvent *fRefEvent; // reference event
58 TLorentzVector fSum; // sum computed from the two daughters
59 TLorentzVector fSumMC; // sum computed from the two daughters
61 ClassDef(AliRsnMother, 1)