]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG1/TRD/info/AliTRDv0Info.h
Fixed compilation
[u/mrichter/AliRoot.git] / PWG1 / TRD / info / AliTRDv0Info.h
1 #ifndef ALITRDV0INFO_H
2 #define ALITRDV0INFO_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 /* $Id: AliTRDv0Info.h 34132 2009-08-06 11:18:32Z cblume $ */
7
8 ////////////////////////////////////////////////////////////////////////////
9 //                                                                        //
10 //  Reconstruction QA                                                     //
11 //                                                                        //
12 ////////////////////////////////////////////////////////////////////////////
13
14 #ifndef Root_TObject
15 #include "TObject.h"
16 #endif
17
18 #ifndef ALITRDGEOMETRY_H
19 #include "AliTRDgeometry.h"
20 #endif
21
22 #ifndef ALIPID_H
23 #include "AliPID.h"
24 #endif
25
26
27 class AliESDv0;
28 class AliESDtrack;
29 class AliKFParticle;
30 class AliKFVertex;
31 class AliVEvent;
32 class AliVTrack;
33 //class AliTRDtrackV1;
34 class AliTRDtrackInfo;
35 class AliTRDv0Info : public TObject
36 {
37 public:
38   enum ETRDv0Info{
39     kNV0param = 10
40     ,kNlayer   = AliTRDgeometry::kNlayer
41     ,kNDetectors = 3//TPC, TOF, ITS (TOF and ITS not implemented yet)
42     ,kNDaughters = 2//for positive and negative track
43     ,kNDecays = 4//number of decay types considered for reference data (conversions, K0s, Lambda, Anti-Lambda)  
44     ,kNMomBins = 2//number of different momentum bins to consider for different cuts; first example: below /above 2.5 GeV-> to be refined!
45     ,kNArmenteros = 2//number of Armenteros-Polanski parameters
46   };
47
48   enum EDaughter{  
49     kNeg = 0
50     ,kPos = 1
51   };
52
53   enum EDecayType{
54     kGamma = 0
55     ,kK0s = 1
56     ,kLambda = 2
57     ,kAntiLambda = 3
58   };
59
60   enum EDetector{
61     kTPC = 0
62     ,kTOF = 1
63     ,kITS = 2
64   };
65
66
67   AliTRDv0Info();
68   AliTRDv0Info(const AliTRDv0Info &ref);
69   virtual ~AliTRDv0Info(){}
70   
71   Int_t  GetPID(Int_t ipart, AliTRDtrackInfo *track);
72   Int_t  HasTrack(AliTRDtrackInfo * const track);
73   Int_t  HasTrack(Int_t ti);
74
75   void   Print(Option_t *opt="") const;
76
77   void   SetMagField(Float_t b) {fMagField = b;}
78   void   SetV0tracks(AliESDtrack *p, AliESDtrack *n);
79   void SetInputEvent(AliVEvent *e)      { fInputEvent = e; };
80   void SetPrimaryVertex(AliKFVertex *v) { fPrimaryVertex = v; };
81
82   //Set values of measured/calculated variables:
83   void SetQuality(Int_t SQuality){fQuality = SQuality;}
84   void SetPplus(Int_t iLayer, Float_t SPplus){fPplus[iLayer] = SPplus;}
85   void SetPminus(Int_t iLayer, Float_t SPminus){fPminus[iLayer] = SPminus;}
86   void SetDCA(Float_t SDCA){fDCA = SDCA;}
87   void SetPointingAngle(Float_t SPointingAngle){fPointingAngle = SPointingAngle;}
88   void SetOpenAngle(Float_t SOpenAngle){fOpenAngle = SOpenAngle;}
89   void SetPsiPair(Float_t SPsiPair){fPsiPair = SPsiPair;}
90   void SetRadius(Float_t SRadius){fRadius = SRadius;}
91   void SetInvMass(Int_t iDecay, Float_t SInvMass){fInvMass[iDecay] = SInvMass;}
92   void SetDetPID(Int_t iDaughter, Int_t iDetector, Int_t iSpecies, Float_t SDetPID){fDetPID[iDaughter][iDetector][iSpecies] = SDetPID;}
93   void SetComPID(Int_t iDaughter, Int_t iSpecies, Float_t SComPID){fComPID[iDaughter][iSpecies] = SComPID;}
94   void SetTPCdEdx(Int_t iDaughter, Float_t STpcdEdx){fTPCdEdx[iDaughter] = STpcdEdx;}
95
96 //____________________________________________________________
97  //Set cut values:
98
99   void SetUpDCA(Int_t iDecay, Float_t UpDCA){fUpDCA[iDecay] = UpDCA;}
100   void SetUpPointingAngle(Int_t iDecay, Float_t UpPointingAngle){fUpPointingAngle[iDecay] = UpPointingAngle;}
101   void SetUpOpenAngle(Int_t iDecay, Float_t UpOpenAngle){fUpOpenAngle[iDecay] = UpOpenAngle;}
102   void SetDownOpenAngle(Int_t iDecay, Float_t DownOpenAngle){fDownOpenAngle[iDecay] = DownOpenAngle;}
103   void SetUpPsiPair(Int_t iDecay, Float_t UpPsiPair){fUpPsiPair[iDecay] = UpPsiPair;}
104   void SetDownPsiPair(Int_t iDecay, Float_t DownPsiPair){fDownPsiPair[iDecay] = DownPsiPair;}
105   void SetUpRadius(Int_t iDecay, Float_t UpRadius){fUpRadius[iDecay] = UpRadius;}
106   void SetDownRadius(Int_t iDecay, Float_t DownRadius){fDownRadius[iDecay] = DownRadius;}
107   void SetUpInvMass(Int_t iDecay, Int_t iMomentum, Double_t UpInvMass){fUpInvMass[iDecay][iMomentum] = UpInvMass;}
108   void SetDownInvMass(Int_t iDecay, Double_t DownInvMass){fDownInvMass[iDecay] = DownInvMass;}
109   void SetDownTPCPIDneg(Int_t iPart, Double_t DownTPCPIDneg){fDownTPCPIDneg[iPart] = DownTPCPIDneg;}
110   void SetDownTPCPIDpos(Int_t iPart, Double_t DownTPCPIDpos){fDownTPCPIDpos[iPart] = DownTPCPIDpos;}
111   void SetDownComPIDneg(Int_t iPart, Double_t DownComPIDneg){fDownComPIDneg[iPart] = DownComPIDneg;}
112   void SetDownComPIDpos(Int_t iPart, Double_t DownComPIDpos){fDownComPIDpos[iPart] = DownComPIDpos;}
113   void SetDownComPIDnegPart(Int_t iPart, Double_t DownComPIDnegPart){fDownComPIDnegPart[iPart] = DownComPIDnegPart;}
114   void SetDownComPIDposPart(Int_t iPart, Double_t DownComPIDposPart){fDownComPIDposPart[iPart] = DownComPIDposPart;}
115
116   void SetV0Info(AliESDv0 *v0);//gets most of the variables below
117
118   Double_t fChi2ndf[kNDecays];//Chi2/NDF from KF
119
120
121   Double_t fInvMass[kNDecays];  // invariant mass for different decay scenarios (conversions, K0s, Lambda->p+pi-, Lambda->p-pi+)
122   Int_t fQuality;              // track quality status for both V0 daughters; OnFly, TPCrefit, Kinks, TPC clusters
123  
124  Double_t fDetPID[kNDaughters][kNDetectors][AliPID::kSPECIES]; // PID provided by TPC, TOF and ITS
125   Double_t fComPID[kNDaughters][AliPID::kSPECIES];//Combined PID, momentarily from TPC and TOF only
126
127   Float_t fDCA;  // Distance of closest approach of daughter tracks
128   Float_t fPointingAngle;// = TMath::ACos(esdv0->GetV0CosineOfPointingAngle()); // Cosine of pointing angle
129   Float_t fOpenAngle;  // opening angle between daughters
130   Float_t fPsiPair; // /Angle between daughter momentum plane and plane perpendicular to magnetic field
131  
132   Bool_t fArmenteros[kNDecays];// Array for the Armenteros yes/no decision for all decays
133   Double_t fMagField; //magnetic field strength
134   Float_t fRadius; //distance of decay/conversion from primary vertex in x-y plane
135   Float_t fV0Momentum; //V0 mother's momentum
136   Float_t fTPCdEdx[kNDaughters]; //Energy deposition in the TPC
137
138   Double_t fUpInvMass[kNDecays][kNMomBins];  // invariant mass, upper limit
139   Double_t fDownInvMass[kNDecays];           // invariant mass, lower limit
140
141   AliESDtrack *fTrackP; //!positive daughter
142   AliESDtrack *fTrackN; //!negative daughter
143
144 private:
145   AliTRDv0Info& operator=(const AliTRDv0Info&);
146
147   void GetDetectorPID();//operating with likelihood values of different detectors
148   void CombinePID();//Bayesian combination of TPC and TOF likelihoods
149   Bool_t TPCdEdxCuts(Int_t part, AliTRDtrackInfo * const track);//direct cuts on TPC dE/dx
150
151   void GetTPCdEdx();//TPC dE/dx values from both tracks
152   Int_t Quality(AliESDv0 * const esdv0);//checks for track/vertex quality criteria
153   Double_t InvMass(Int_t part1, Int_t part2, AliESDv0 *esdv0) const;//invariant mass of mother
154   Float_t PsiPair(AliESDv0 *esdv0);//angle between daughters in plane perpendicular to magnetic field (characteristically around zero for conversions)
155   Float_t OpenAngle(AliESDv0 *esdv0);//opening angle between V0 daughters; close to zero for conversions
156   Float_t Radius(AliESDv0 *esdv0);//distance of secondary to primary vertex in x-y-plane 
157   Float_t DCA() const {return fDCA;}//distance of closest approach between supposed daughter tracks
158   Float_t PointingAngle() const {return fPointingAngle;}//pointing angle: between vector from primary to secondary vertex and reconstructed momentum of V0 mother particle
159   Float_t V0Momentum(AliESDv0 *esdv0) const;//reconstructed momentum of V0 mother particle
160   Bool_t V0SignCheck();//checks if daughters have opposite signs
161   Bool_t  Armenteros(AliESDv0 *esdv0, Int_t species);//the famous Armenteros-Polanski cut
162   Double_t KFChi2ndf(Int_t part1, Int_t part2,Int_t decay);//Chi2ndf from KF
163   AliKFParticle *CreateMotherParticle(AliESDtrack *pdaughter, AliESDtrack *ndaughter, Int_t pspec, Int_t nspec);//Mother Particle from KF
164
165   Float_t fPplus[2*kNlayer];    // momentum and variance for the positive daughter  
166   Float_t fPminus[2*kNlayer];   // momentum and variance for the negative daughter  
167  
168
169   //____________________________________________________________
170   //Upper and lower limits for cut variables:
171
172   Float_t fUpDCA[kNDecays];                  // DCA, upper limit
173   Float_t fUpPointingAngle[kNDecays];        // pointing angle, upper limit
174   Float_t fUpOpenAngle[kNDecays];            // opening angle, upper limit
175   Float_t fDownOpenAngle[kNDecays];          // opening angle, lower limit
176   Float_t fUpPsiPair[kNDecays];              // psi angle, upper limit
177   Float_t fDownPsiPair[kNDecays];            // psi angle, lower limit
178  
179   Double_t fUpChi2ndf[kNDecays];
180   Float_t fUpRadius[kNDecays];               // radius, upper limit
181   Float_t fDownRadius[kNDecays];             // radius, lower limit
182   Float_t fDownTPCPIDneg[AliPID::kSPECIES];  // TPC PID negatives, lower limit
183   Float_t fDownTPCPIDpos[AliPID::kSPECIES];  // TPC PID positives, lower limit
184   Float_t fDownComPIDneg[AliPID::kSPECIES];  // Combined PID negatives, lower limit
185   Float_t fDownComPIDpos[AliPID::kSPECIES];  // Combined PID positives, lower limit
186   Float_t fDownComPIDnegPart[AliPID::kSPECIES]; // Combined PID positive partner daughters (NOT the daughter track that would go into the reference data; here: pion daughters from Lambda decays; lower limit
187   Float_t fDownComPIDposPart[AliPID::kSPECIES]; // Combined PID positive partner daughters (NOT the daughter track that would go into the reference data; here: pion daughters from Lambda decays; lower limit
188   
189
190   Int_t       fNindex; //indices of positive and negative daughter track
191   Int_t       fPindex; //indices of positive and negative daughter track
192
193   AliVEvent            *fInputEvent;    // Input Event
194   AliKFVertex          *fPrimaryVertex; // primary vertex
195   
196   
197   ClassDef(AliTRDv0Info, 1) // extracted V0 MC information
198 };
199
200
201 #endif
202