]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TRD/qaRec/info/AliTRDv0Info.h
2d4c6f9ac62fd5a6defba71139213ae9c8597218
[u/mrichter/AliRoot.git] / TRD / qaRec / info / AliTRDv0Info.h
1 #ifndef ALITRDV0INFO_H
2 #define ALITRDV0INFO_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 #ifndef Root_TObject
9 #include "TObject.h"
10 #endif
11
12 #ifndef ALITRDGEOMETRY_H
13 #include "AliTRDgeometry.h"
14 #endif
15
16 #ifndef ALIPID_H
17 #include "AliPID.h"
18 #endif
19
20
21 class AliESDv0;
22 class AliESDtrack;
23 class AliESDEvent;
24 class AliTRDtrackV1;
25 class AliTRDtrackInfo;
26 class AliTRDv0Info : public TObject
27 {
28 public:
29   enum ETRDv0Info{
30     kNV0param = 10
31     ,kNlayer   = AliTRDgeometry::kNlayer
32     ,kNDetectors = 3//TPC, TOF, ITS (TOF and ITS not implemented yet)
33     ,kNDaughters = 2//for positive and negative track
34     ,kNDecays = 4//number of decay types considered for reference data (conversions, K0s, Lambda, Anti-Lambda)  
35     ,kNMomBins = 2//number of different momentum bins to consider for different cuts; first example: below/above 2.5 GeV -> to be refined!
36   };
37
38   enum EDaughter{
39     kNeg = 0
40     ,kPos = 1
41   };
42
43   enum EDecayType{
44     kGamma = 0
45     ,kK0s = 1
46     ,kLambda = 2
47     ,kAntiLambda = 3
48   };
49
50   enum EDetector{
51     kTPC = 0
52     ,kTOF = 1
53     ,kITS = 2
54   };
55
56
57   AliTRDv0Info();
58   virtual ~AliTRDv0Info(){}
59
60   Float_t Pplus[2*kNlayer];
61   Float_t Pminus[2*kNlayer];
62
63  
64   void Print(Option_t *opt=0x0) const;
65  
66   Bool_t GetV0PID(Int_t ipart, AliTRDtrackInfo *track);//decides if a track is accepted for one of the reference samples!!
67
68   //Set values of measured/calculated variables:
69   void SetQuality(Int_t Quality){fQuality = Quality;}
70   void SetPplus(Int_t iLayer, Float_t Pplus){fPplus[iLayer] = Pplus;}
71   void SetPminus(Int_t iLayer, Float_t Pminus){fPminus[iLayer] = Pminus;}
72   void SetDCA(Float_t DCA){fDCA = DCA;}
73   void SetMomentum(Float_t Momentum){fMomentum = Momentum;}
74   void SetPointingAngle(Float_t PointingAngle){fPointingAngle = PointingAngle;}
75   void SetOpenAngle(Float_t OpenAngle){fOpenAngle = OpenAngle;}
76   void SetPsiPair(Float_t PsiPair){fPsiPair = PsiPair;}
77   void SetRadius(Float_t Radius){fRadius = Radius;}
78   void SetInvMass(Int_t iDecay, Float_t InvMass){fInvMass[iDecay] = InvMass;}
79   void SetDetPID(Int_t iDaughter, Int_t iDetector, Int_t iSpecies, Float_t DetPID){fDetPID[iDaughter][iDetector][iSpecies] = DetPID;}
80
81 //____________________________________________________________
82  //Set cut values:
83
84  void SetUpDCA(Int_t iDecay, Float_t UpDCA){fUpDCA[iDecay] = UpDCA;}
85  void SetUpPointingAngle(Int_t iDecay, Float_t UpPointingAngle){fUpPointingAngle[iDecay] = UpPointingAngle;}
86  void SetUpOpenAngle(Int_t iDecay, Float_t UpOpenAngle){fUpOpenAngle[iDecay] = UpOpenAngle;}
87  void SetDownOpenAngle(Int_t iDecay, Float_t DownOpenAngle){fDownOpenAngle[iDecay] = DownOpenAngle;}
88  void SetUpPsiPair(Int_t iDecay, Float_t UpPsiPair){fUpPsiPair[iDecay] = UpPsiPair;}
89  void SetDownPsiPair(Int_t iDecay, Float_t DownPsiPair){fDownPsiPair[iDecay] = DownPsiPair;}
90  void SetUpRadius(Int_t iDecay, Float_t UpRadius){fUpRadius[iDecay] = UpRadius;}
91  void SetDownRadius(Int_t iDecay, Float_t DownRadius){fDownRadius[iDecay] = DownRadius;}
92  void SetUpInvMass(Int_t iDecay, Int_t iMomentum, Double_t UpInvMass){fUpInvMass[iDecay][iMomentum] = UpInvMass;}
93  void SetDownInvMass(Int_t iDecay, Double_t DownInvMass){fDownInvMass[iDecay] = DownInvMass;}
94  void SetDownTPCPIDneg(Int_t iDecay, Double_t DownTPCPIDneg){fDownTPCPIDneg[iDecay] = DownTPCPIDneg;}
95  void SetDownTPCPIDpos(Int_t iDecay, Double_t DownTPCPIDpos){fDownTPCPIDpos[iDecay] = DownTPCPIDpos;}
96
97  
98
99 private:
100   AliTRDv0Info(const AliTRDv0Info&);
101   AliTRDv0Info& operator=(const AliTRDv0Info&);
102
103  void GetESDv0Info(AliESDv0 *esdv0);//gets most of the variables below
104   void GetDetectorPID();//operating with likelihood values of different detectors
105   Int_t Quality(AliESDv0 *esdv0);//checks for track/vertex quality criteria
106   Double_t InvMass(Int_t part1, Int_t part2, AliESDv0 *esdv0);//invariant mass of mother
107   Float_t PsiPair(AliESDv0 *esdv0);//angle between daughters in plane perpendicular to magnetic field (characteristically around zero for conversions)
108   Float_t OpenAngle(AliESDv0 *esdv0);//opening angle between V0 daughters; close to zero for conversions
109   Float_t Radius(AliESDv0 *esdv0);//distance of secondary to primary vertex in x-y-plane 
110   Float_t DCA() const {return fDCA;}//distance of closest approach between supposed daughter tracks
111   Float_t PointingAngle() const {return fPointingAngle;}//pointing angle: between vector from primary to secondary vertex and reconstructed momentum of V0 mother particle
112   Float_t V0Momentum(AliESDv0 *esdv0);//reconstructed momentum of V0 mother particle
113   void V0fromTrack(AliTRDtrackInfo *track, Int_t ivertex);//checks if a track belongs to a vertex found by V0 finder
114   
115   AliESDEvent *fESD;
116
117
118   Bool_t fHasV0; //Does this track belong to a vertex from a V0 finder?
119  
120   Int_t fQuality;              // track quality status for both V0 daughters; OnFly, TPCrefit, Kinks, TPC clusters
121  
122   Float_t fPplus[2*kNlayer];    // momentum and variance for the positive daughter  
123   Float_t fPminus[2*kNlayer];   // momentum and variance for the negative daughter  
124   Double_t fDetPID[kNDaughters][kNDetectors][AliPID::kSPECIES]; // PID provided by TPC, TOF and ITS
125
126   Float_t fMomentum;  // Momentum of track at the vertex
127
128   Float_t fDCA;  // Distance of closest approach of daughter tracks
129   
130   Float_t fPointingAngle;// = TMath::ACos(esdv0->GetV0CosineOfPointingAngle()); // Cosine of pointing angle
131   
132   Float_t fOpenAngle;  // opening angle between daughters
133   
134   Float_t fPsiPair; // /Angle between daughter momentum plane and plane perpendicular to magnetic field
135   
136   Double_t fInvMass[kNDecays];  // invariant mass for different decay scenarios (conversions, K0s, Lambda->p+pi-, Lambda->p-pi+)
137
138   Double_t fMagField;
139
140   Float_t fRadius; //distance of decay/conversion from primary vertex in x-y plane
141
142   Int_t fTrackID;//track index
143
144
145   Float_t fV0Momentum; //V0 mother's momentum
146
147   //____________________________________________________________
148   //Upper and lower limits for cut variables:
149
150   Float_t fUpDCA[kNDecays];  
151   
152   Float_t fUpPointingAngle[kNDecays];
153   
154   Float_t fUpOpenAngle[kNDecays];
155
156   Float_t fDownOpenAngle[kNDecays];
157   
158   Float_t fUpPsiPair[kNDecays];
159
160   Float_t fDownPsiPair[kNDecays];
161   
162   Double_t fUpInvMass[kNDecays][kNMomBins]; 
163
164   Double_t fDownInvMass[kNDecays]; 
165
166   Float_t fUpRadius[kNDecays];
167
168   Float_t fDownRadius[kNDecays];
169
170   Float_t fDownTPCPIDneg[AliPID::kSPECIES];
171
172   Float_t fDownTPCPIDpos[AliPID::kSPECIES];
173
174  
175   AliESDtrack *fTrackP; //positive daughter
176   AliESDtrack *fTrackN; //negative daughter
177   AliESDtrack *fTrack; //the current track in the ESDtrack loop (either positive or negative)
178
179
180   Int_t fNindex;//indices of positive and negative daughter track
181   Int_t fPindex;
182   
183   
184   ClassDef(AliTRDv0Info, 0) // extracted V0 MC information
185 };
186
187
188 #endif
189