]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGLF/RESONANCES/AliRsnMiniPair.h
st^Cic functions for p-value: cleanup and add all code that was used for approval
[u/mrichter/AliRoot.git] / PWGLF / RESONANCES / AliRsnMiniPair.h
1 #ifndef ALIRSNMINIPAIR_H
2 #define ALIRSNMINIPAIR_H
3
4 //
5 // This object is used as lightweight temporary container
6 // of all information needed from any input object and
7 // useful for resonance analysis.
8 //
9
10 #include <TObject.h>
11 #include <TLorentzVector.h>
12 #include "TClonesArray.h"
13 #include "AliRsnListOutput.h"
14
15 class AliRsnListOutput;
16 class AliRsnMiniParticle;
17
18 class AliRsnMiniPair : public TObject {
19 public:
20
21    AliRsnMiniPair() : fDCA1(0), fDCA2(0), fMother(-1), fMotherPDG(0), fNSisters(-1), fIsFromB(kFALSE), fIsQuarkFound(kFALSE) {Int_t i = 3; while (i--) fPmother[i] = 0.0;}
22   
23    Int_t          &Mother()    {return fMother;}
24    Int_t          &MotherPDG() {return fMotherPDG;}
25    Bool_t         &IsFromB()      {return fIsFromB;}
26    Bool_t         &IsQuarkFound() {return fIsQuarkFound;}
27    Float_t        &PmotherX()  {return fPmother[0];}
28    Float_t        &PmotherY()  {return fPmother[1];}
29    Float_t        &PmotherZ()  {return fPmother[2];} 
30    void           Fill(AliRsnMiniParticle *p1, AliRsnMiniParticle *p2, Double_t m1, Double_t m2, Double_t refMass);
31    void           FillRef(Double_t mass);
32    void           InvertP(Bool_t first);
33
34    Int_t          ID(Bool_t mc) const {if (mc) return 1; else return 0;}
35
36    TLorentzVector &P1 (Bool_t mc) {return fP1 [ID(mc)];}
37    TLorentzVector &P2 (Bool_t mc) {return fP2 [ID(mc)];}
38    TLorentzVector &Sum(Bool_t mc) {return fSum[ID(mc)];}
39    TLorentzVector &Ref(Bool_t mc) {return fRef[ID(mc)];}
40
41    Double_t        Pt(Bool_t mc)             const  {return fSum[ID(mc)].Pt();}
42    Double_t        Pz(Bool_t mc)             const  {return fSum[ID(mc)].Pz();}
43    Double_t        Eta(Bool_t mc)            const  {return fSum[ID(mc)].Eta();}
44    Double_t        InvMass(Bool_t mc)        const  {return fSum[ID(mc)].M();}
45    Double_t        InvMassRes()              const;
46    Double_t        InvMassDiff()             const;
47    Double_t        Mt(Bool_t mc)             const  {return fRef[ID(mc)].Mt();}
48    Double_t        Y(Bool_t mc)              const  {return fRef[ID(mc)].Rapidity();}
49    Double_t        PtRatio(Bool_t mc)        const;
50    Double_t        DipAngle(Bool_t mc)       const;
51    Double_t        CosThetaStar(Bool_t mc);
52    Double_t        DaughterPt(Int_t daughterId, Bool_t mc);
53    Double_t        DaughterDCA(Int_t daughterId); 
54    Double_t        DCAProduct();                                                   
55    void            DaughterPxPyPz(Int_t daughterId, Bool_t mc, Double_t *pxpypz); 
56    Short_t         NSisters()  {return fNSisters;}
57
58  private:
59    
60    TLorentzVector fP1 [2];    // 1st daughter momentum
61    TLorentzVector fP2 [2];    // 2nd daughter momentum
62    TLorentzVector fSum[2];    // sum of momenta
63    TLorentzVector fRef[2];    // same as 'fSum' but with nominal resonance mass
64    
65    Double_t       fDCA1;      // 1st daughter DCA
66    Double_t       fDCA2;      // 2nd daughter DCA 
67    
68    Int_t          fMother;    // label of mothers (when common)
69    Int_t          fMotherPDG; // PDG code of mother (when common)
70    Short_t        fNSisters;  // total number of mother's daughters in the MC stack
71    Bool_t         fIsFromB;           // is the particle from B meson flag      
72    Bool_t         fIsQuarkFound;      // is the particle from a quark flag (used to reject or accept Hijing event)
73    Float_t        fPmother[3];// MC momentum of the pair corresponding mother
74    
75    ClassDef(AliRsnMiniPair,4)
76      };
77
78 #endif