]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/RESONANCES/AliRsnMother.h
8c3002d2a04a3f339c9455225370eb666781c0a3
[u/mrichter/AliRoot.git] / PWG2 / RESONANCES / AliRsnMother.h
1 #ifndef ALIRSNMOTHER_H
2 #define ALIRSNMOTHER_H
3
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
13 #include "AliRsnDaughter.h"
14
15 class AliRsnMother : public TObject {
16 public:
17
18    AliRsnMother();
19    AliRsnMother(const AliRsnMother &obj);
20    AliRsnMother& operator=(const AliRsnMother &obj);
21    virtual ~AliRsnMother();
22
23    AliRsnDaughter*   GetDaughter(const Int_t &index)    const {if (index < 1) return   fDaughter[0] ; return   fDaughter[1] ;}
24    AliRsnDaughter&   GetDaughterRef(const Int_t &index) const {if (index < 1) return (*fDaughter[0]); return (*fDaughter[1]);}
25    TLorentzVector&   Sum()                                    {return fSum;}
26    TLorentzVector&   SumMC()                                  {return fSumMC;}
27    
28    Double_t          AngleTo(AliRsnDaughter *track, Bool_t mc = kFALSE) const {if (track) return fSum.Angle(track->P(mc).Vect()); return -99.0;}
29    Double_t          CosThetaStar(Bool_t first = kTRUE, Bool_t useMC = kFALSE);
30
31    Bool_t            IsLabelEqual() const {return abs(fDaughter[0]->GetLabel()) == abs(fDaughter[1]->GetLabel());}
32    Bool_t            IsIndexEqual() const {return (fDaughter[0]->GetID() == fDaughter[1]->GetID());}
33    Int_t             CommonMother(Int_t &m0, Int_t &m1) const;
34    Int_t             CommonMother() const {Int_t d0, d1; return CommonMother(d0, d1);}
35
36    void              SetDaughters(AliRsnDaughter * const daughter1, Double_t mass1, AliRsnDaughter * const daughter2, Double_t mass2);
37    void              ResetPair();
38    void              PrintInfo(const Option_t *option = "ALL") const;
39    Bool_t            CheckPair(Bool_t checkMC = kFALSE) const;
40
41 private:
42
43    AliRsnDaughter  *fDaughter[2];      // elements of the pair
44    TLorentzVector   fSum;              // sum computed from the two daughters
45    TLorentzVector   fSumMC;            // sum computed from the two daughters
46
47    ClassDef(AliRsnMother, 1)
48 };
49
50 #endif