Fix in the last caall to CleanOwnPrimaryVertex
[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
55\r
56 //\r
57 // setter functions for V0 cut values\r
58 // for default values see the constructor\r
59 // see the default contructor for comments\r
60 //\r
61\r
62 // single track cuts\r
63 void SetNTPCclusters(Int_t n) { fTPCNcls = n; };\r
64 void SetTPCrefit(Bool_t r = kTRUE) { fTPCrefit = r; };\r
65 void SetTPCchi2perCls(Float_t chi2) { fTPCchi2perCls = chi2; };\r
66 void SetTPCclusterratio(Float_t r) { fTPCclsRatio = r; };\r
67 void SetNoKinks(Bool_t k = kTRUE) { fNoKinks = k; };\r
68\r
69 // gamma cuts\r
70 void SetGammaCutChi2NDF(Float_t val) { fGcutChi2NDF = val; };\r
71 void SetGammaCutCosPoint(Float_t * const val) { \r
72 fGcutCosPoint[0] = val[0];\r
73 fGcutCosPoint[1] = val[1];\r
74 };\r
75 void SetGammaCutDCA(Float_t * const val){\r
76 fGcutDCA[0] = val[0];\r
77 fGcutDCA[1] = val[1];\r
78 };\r
79 void SetGammaCutVertexR(Float_t * const val){\r
80 fGcutVertexR[0] = val[0];\r
81 fGcutVertexR[1] = val[1];\r
82 };\r
83 void SetGammaCutPsiPair(Float_t * const val){\r
84 fGcutPsiPair[0] = val[0];\r
85 fGcutPsiPair[1] = val[1];\r
86 };\r
87 void SetGammaCutInvMass(Float_t val){\r
88 fGcutInvMass = val;\r
89 };\r
90 // K0 cuts\r
91 void SetK0CutChi2NDF(Float_t val) { fK0cutChi2NDF = val; };\r
92 void SetK0CutCosPoint(Float_t * const val) { \r
93 fK0cutCosPoint[0] = val[0];\r
94 fK0cutCosPoint[1] = val[1];\r
95 };\r
96 void SetK0CutDCA(Float_t * const val){\r
97 fK0cutDCA[0] = val[0];\r
98 fK0cutDCA[1] = val[1];\r
99 };\r
100 void SetK0CutVertexR(Float_t * const val){\r
101 fK0cutVertexR[0] = val[0];\r
102 fK0cutVertexR[1] = val[1];\r
103 };\r
104 void SetK0CutInvMass(Float_t * const val){\r
105 fK0cutInvMass[0] = val[0];\r
106 fK0cutInvMass[1] = val[1];\r
107 };\r
108 // lambda & anti-lambda cuts\r
109 void SetLambdaCutChi2NDF(Float_t val) { fLcutChi2NDF = val; };\r
110 void SetLambdaCutCosPoint(Float_t * const val) { \r
111 fLcutCosPoint[0] = val[0];\r
112 fLcutCosPoint[1] = val[1];\r
113 };\r
114 void SetLambdaCutDCA(Float_t * const val){\r
115 fLcutDCA[0] = val[0];\r
116 fLcutDCA[1] = val[1];\r
117 };\r
118 void SetLambdaCutVertexR(Float_t * const val){\r
119 fLcutVertexR[0] = val[0];\r
120 fLcutVertexR[1] = val[1];\r
121 };\r
122 void SetLambdaCutInvMass(Float_t * const val){\r
123 fLcutInvMass[0] = val[0];\r
124 fLcutInvMass[1] = val[1];\r
125 };\r
126 \r
127\r
5abc3dfe 128 Int_t PreselectV0(AliESDv0* const v0) const;\r
7cd657f1 129\r
5abc3dfe 130 Bool_t CaseGamma(AliESDv0* const v0, Int_t &pdgV0, Int_t &pdgP, Int_t &pdgN) const;\r
131 Bool_t CaseK0(AliESDv0* const v0, Int_t &pdgV0, Int_t &pdgP, Int_t &pdgN) const;\r
132 Bool_t CaseLambda(AliESDv0* const v0, Int_t &pdgV0, Int_t &pdgP, Int_t &pdgN, Int_t id) const;\r
7cd657f1 133\r
5abc3dfe 134 Bool_t V0CutsCommon(AliESDv0 * const v0) const;\r
135 Bool_t SingleTrackCuts(AliESDv0 * const v0) const;\r
136 void Armenteros(AliESDv0* const v0, Float_t val[2]) const;\r
137 Bool_t CheckSigns(AliESDv0* const v0) const;\r
7cd657f1 138\r
5abc3dfe 139 Double_t PsiPair(AliESDv0* const v0) const;\r
140 Bool_t GetConvPosXY(AliESDtrack * const ptrack, AliESDtrack * const ntrack, Double_t convpos[2]) const;\r
141 Bool_t GetHelixCenter(AliESDtrack * const track, Double_t b, Int_t charge, Double_t center[2]) const;\r
7cd657f1 142\r
143 protected:\r
144 void Copy(TObject &ref) const;\r
145\r
146 private:\r
147\r
5abc3dfe 148 AliKFParticle *CreateMotherParticle(const AliVTrack* const pdaughter, const AliVTrack* const ndaughter, Int_t pspec, Int_t nspec) const;\r
7cd657f1 149 void SetCuts(); // setup cuts for selected fMode and fType, see source file for details\r
150 Bool_t GammaEffCuts(AliESDv0 * const v0); // set of cuts optimized for high gamma efficiency\r
151\r
152 private:\r
153 AliESDEvent *fEvent; // current event\r
154 AliKFVertex *fPrimaryVertex; // primary vertex\r
155\r
156 Int_t fType; // data type: p-p or Pb-Pb\r
157 Int_t fMode; // current operation mode\r
158\r
159 // single track cuts\r
160 Int_t fTPCNcls; // number of TPC clusters\r
161 Bool_t fTPCrefit; // TPC refit - yes [kTRUE] or do not care [kFALSE]\r
162 Float_t fTPCchi2perCls; // max. chi2 per TPC cluster\r
163 Float_t fTPCclsRatio; // min. TPC cluster ratio\r
164 Bool_t fNoKinks; // kinks - no [kTRUE] or do not care [kFalse]\r
165\r
166 // gamma cut values\r
167 Float_t fGcutChi2NDF; // Chi2NF cut value for the AliKFparticle gamma\r
168 Float_t fGcutCosPoint[2]; // cos of the pointing angle [min, max]\r
169 Float_t fGcutDCA[2]; // DCA between the daughter tracks [min, max]\r
170 Float_t fGcutVertexR[2]; // radius of the conversion point [min, max]\r
171 Float_t fGcutPsiPair[2]; // value of the psi pair cut [min, max]\r
172 Float_t fGcutInvMass; // upper value on the gamma invariant mass\r
173 // K0 cut values\r
174 Float_t fK0cutChi2NDF; // Chi2NF cut value for the AliKFparticle K0\r
175 Float_t fK0cutCosPoint[2]; // cos of the pointing angle [min, max]\r
176 Float_t fK0cutDCA[2]; // DCA between the daughter tracks [min, max]\r
177 Float_t fK0cutVertexR[2]; // radius of the decay point [min, max]\r
178 Float_t fK0cutInvMass[2]; // invariant mass window\r
179 // Lambda & anti-Lambda cut values\r
180 Float_t fLcutChi2NDF; // Chi2NF cut value for the AliKFparticle K0\r
181 Float_t fLcutCosPoint[2]; // cos of the pointing angle [min, max]\r
182 Float_t fLcutDCA[2]; // DCA between the daughter tracks [min, max]\r
183 Float_t fLcutVertexR[2]; // radius of the decay point [min, max]\r
184 Float_t fLcutInvMass[2]; // invariant mass window\r
185 \r
186 \r
187 ClassDef(AliESDv0KineCuts, 0);\r
188\r
189};\r
190\r
191#endif\r