Changing to centrality dependent corrections
[u/mrichter/AliRoot.git] / ANALYSIS / AliESDv0KineCuts.h
CommitLineData
7cd657f1 1/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *\r
2 * See cxx source for full Copyright notice */\r
3/*\r
4 * plesae see source file for more details\r
5 */\r
6#ifndef ALIESDV0KINECUTS_H\r
7#define ALIESDV0KINECUTS_H\r
8\r
9#include <TObject.h>\r
10\r
11class AliESDv0;\r
12class AliESDEvent;\r
13class AliVEvent;\r
14class AliESDtrack;\r
15class AliVTrack;\r
16class AliKFParticle;\r
17class AliKFVertex;\r
18\r
19class AliESDv0KineCuts : public TObject{\r
20 public:\r
21 enum{ // Reconstructed V0\r
22 kUndef = -1,\r
23 kGamma = 0,\r
24 kK0 = 1,\r
25 kLambda = 2,\r
26 kALambda = 3\r
27 };\r
28 enum{ // data types\r
29 kPP = 0,\r
30 kPbPb = 1, // not yet implemented\r
31 };\r
32 enum{ // operation modes\r
33 kPurity = 0, // purely kinematical selection\r
34 kEffGamma = 1 // !!! involves TPC dEdx or nSimga cuts !!!\r
35 };\r
36 \r
37 AliESDv0KineCuts();\r
38 virtual ~AliESDv0KineCuts();\r
39\r
40 AliESDv0KineCuts(const AliESDv0KineCuts &ref);\r
41 AliESDv0KineCuts &operator=(const AliESDv0KineCuts &ref);\r
42\r
43 // main selection function - called once per V0 candidate\r
5abc3dfe 44 Bool_t ProcessV0(AliESDv0* const v0, Int_t &pdgV0, Int_t &pdgP, Int_t &pdgN) const;\r
45 Bool_t ProcessV0(AliESDv0* const v0, Int_t &pdgP, Int_t &pdgN) const;\r
7cd657f1 46\r
47 // must be called by the user\r
48 void SetEvent(AliESDEvent* const event);\r
49 void SetEvent(AliVEvent* const event);\r
50 void SetPrimaryVertex(AliKFVertex* const v);\r
51\r
52 // user can select an operation modes [see .cxx for details]\r
53 void SetMode(Int_t mode, Int_t type);\r
54 void SetMode(Int_t mode, const char* type);\r
447e39d4 55 void UseExternalVertex(Bool_t use_external=kTRUE);\r
56 AliKFParticle *CreateMotherParticle(const AliVTrack* const pdaughter, const AliVTrack* const ndaughter, Int_t pspec, Int_t nspec) const;\r
57 void SetCuts(); // setup cuts for selected fMode and fType, see source file for details\r
7cd657f1 58 //\r
59 // setter functions for V0 cut values\r
60 // for default values see the constructor\r
61 // see the default contructor for comments\r
62 //\r
63\r
64 // single track cuts\r
65 void SetNTPCclusters(Int_t n) { fTPCNcls = n; };\r
66 void SetTPCrefit(Bool_t r = kTRUE) { fTPCrefit = r; };\r
67 void SetTPCchi2perCls(Float_t chi2) { fTPCchi2perCls = chi2; };\r
68 void SetTPCclusterratio(Float_t r) { fTPCclsRatio = r; };\r
69 void SetNoKinks(Bool_t k = kTRUE) { fNoKinks = k; };\r
70\r
71 // gamma cuts\r
72 void SetGammaCutChi2NDF(Float_t val) { fGcutChi2NDF = val; };\r
73 void SetGammaCutCosPoint(Float_t * const val) { \r
74 fGcutCosPoint[0] = val[0];\r
75 fGcutCosPoint[1] = val[1];\r
76 };\r
77 void SetGammaCutDCA(Float_t * const val){\r
78 fGcutDCA[0] = val[0];\r
79 fGcutDCA[1] = val[1];\r
80 };\r
81 void SetGammaCutVertexR(Float_t * const val){\r
82 fGcutVertexR[0] = val[0];\r
83 fGcutVertexR[1] = val[1];\r
84 };\r
85 void SetGammaCutPsiPair(Float_t * const val){\r
86 fGcutPsiPair[0] = val[0];\r
87 fGcutPsiPair[1] = val[1];\r
88 };\r
89 void SetGammaCutInvMass(Float_t val){\r
90 fGcutInvMass = val;\r
91 };\r
92 // K0 cuts\r
93 void SetK0CutChi2NDF(Float_t val) { fK0cutChi2NDF = val; };\r
94 void SetK0CutCosPoint(Float_t * const val) { \r
95 fK0cutCosPoint[0] = val[0];\r
96 fK0cutCosPoint[1] = val[1];\r
97 };\r
98 void SetK0CutDCA(Float_t * const val){\r
99 fK0cutDCA[0] = val[0];\r
100 fK0cutDCA[1] = val[1];\r
101 };\r
102 void SetK0CutVertexR(Float_t * const val){\r
103 fK0cutVertexR[0] = val[0];\r
104 fK0cutVertexR[1] = val[1];\r
105 };\r
106 void SetK0CutInvMass(Float_t * const val){\r
107 fK0cutInvMass[0] = val[0];\r
108 fK0cutInvMass[1] = val[1];\r
109 };\r
110 // lambda & anti-lambda cuts\r
111 void SetLambdaCutChi2NDF(Float_t val) { fLcutChi2NDF = val; };\r
112 void SetLambdaCutCosPoint(Float_t * const val) { \r
113 fLcutCosPoint[0] = val[0];\r
114 fLcutCosPoint[1] = val[1];\r
115 };\r
116 void SetLambdaCutDCA(Float_t * const val){\r
117 fLcutDCA[0] = val[0];\r
118 fLcutDCA[1] = val[1];\r
119 };\r
120 void SetLambdaCutVertexR(Float_t * const val){\r
121 fLcutVertexR[0] = val[0];\r
122 fLcutVertexR[1] = val[1];\r
123 };\r
124 void SetLambdaCutInvMass(Float_t * const val){\r
125 fLcutInvMass[0] = val[0];\r
126 fLcutInvMass[1] = val[1];\r
127 };\r
128 \r
129\r
5abc3dfe 130 Int_t PreselectV0(AliESDv0* const v0) const;\r
7cd657f1 131\r
5abc3dfe 132 Bool_t CaseGamma(AliESDv0* const v0, Int_t &pdgV0, Int_t &pdgP, Int_t &pdgN) const;\r
133 Bool_t CaseK0(AliESDv0* const v0, Int_t &pdgV0, Int_t &pdgP, Int_t &pdgN) const;\r
134 Bool_t CaseLambda(AliESDv0* const v0, Int_t &pdgV0, Int_t &pdgP, Int_t &pdgN, Int_t id) const;\r
7cd657f1 135\r
447e39d4 136 Bool_t V0CutsCommon(const AliESDv0 * const v0) const;\r
5abc3dfe 137 Bool_t SingleTrackCuts(AliESDv0 * const v0) const;\r
138 void Armenteros(AliESDv0* const v0, Float_t val[2]) const;\r
139 Bool_t CheckSigns(AliESDv0* const v0) const;\r
7cd657f1 140\r
5abc3dfe 141 Double_t PsiPair(AliESDv0* const v0) const;\r
142 Bool_t GetConvPosXY(AliESDtrack * const ptrack, AliESDtrack * const ntrack, Double_t convpos[2]) const;\r
143 Bool_t GetHelixCenter(AliESDtrack * const track, Double_t b, Int_t charge, Double_t center[2]) const;\r
7cd657f1 144\r
145 protected:\r
146 void Copy(TObject &ref) const;\r
147\r
148 private:\r
7cd657f1 149 Bool_t GammaEffCuts(AliESDv0 * const v0); // set of cuts optimized for high gamma efficiency\r
150\r
151 private:\r
152 AliESDEvent *fEvent; // current event\r
153 AliKFVertex *fPrimaryVertex; // primary vertex\r
154\r
155 Int_t fType; // data type: p-p or Pb-Pb\r
156 Int_t fMode; // current operation mode\r
157\r
158 // single track cuts\r
159 Int_t fTPCNcls; // number of TPC clusters\r
160 Bool_t fTPCrefit; // TPC refit - yes [kTRUE] or do not care [kFALSE]\r
161 Float_t fTPCchi2perCls; // max. chi2 per TPC cluster\r
162 Float_t fTPCclsRatio; // min. TPC cluster ratio\r
163 Bool_t fNoKinks; // kinks - no [kTRUE] or do not care [kFalse]\r
164\r
165 // gamma cut values\r
166 Float_t fGcutChi2NDF; // Chi2NF cut value for the AliKFparticle gamma\r
167 Float_t fGcutCosPoint[2]; // cos of the pointing angle [min, max]\r
168 Float_t fGcutDCA[2]; // DCA between the daughter tracks [min, max]\r
169 Float_t fGcutVertexR[2]; // radius of the conversion point [min, max]\r
170 Float_t fGcutPsiPair[2]; // value of the psi pair cut [min, max]\r
171 Float_t fGcutInvMass; // upper value on the gamma invariant mass\r
172 // K0 cut values\r
173 Float_t fK0cutChi2NDF; // Chi2NF cut value for the AliKFparticle K0\r
174 Float_t fK0cutCosPoint[2]; // cos of the pointing angle [min, max]\r
175 Float_t fK0cutDCA[2]; // DCA between the daughter tracks [min, max]\r
176 Float_t fK0cutVertexR[2]; // radius of the decay point [min, max]\r
177 Float_t fK0cutInvMass[2]; // invariant mass window\r
178 // Lambda & anti-Lambda cut values\r
179 Float_t fLcutChi2NDF; // Chi2NF cut value for the AliKFparticle K0\r
180 Float_t fLcutCosPoint[2]; // cos of the pointing angle [min, max]\r
181 Float_t fLcutDCA[2]; // DCA between the daughter tracks [min, max]\r
182 Float_t fLcutVertexR[2]; // radius of the decay point [min, max]\r
183 Float_t fLcutInvMass[2]; // invariant mass window\r
447e39d4 184 Bool_t fUseExternalVertex; // Is kTRUE if Vertex is set via SetPrimaryVertex()\r
185 Bool_t fDeleteVertex; // Is kTRUE if Vertex has been created in SetEvent() function\r
7cd657f1 186 \r
187 ClassDef(AliESDv0KineCuts, 0);\r
188\r
189};\r
190\r
191#endif\r