more consistent use of cuts, new cut number 1008
[u/mrichter/AliRoot.git] / PWGJE / macros / CreateTrackCutsPWGJE.C
CommitLineData
5c4489e2 1AliESDtrackCuts *CreateTrackCutsPWGJE(Int_t cutMode) {
e35f09aa 2
3 //
5c4489e2 4 // Macro to create track cuts for PWG Jet analysis
e35f09aa 5 // User can select a specific set by indicating cutMode
6 // cutMode has 8 digits: first 4 digits additional cuts, last 4 digits standard cuts
7 // additional cuts are variations of standard cuts (used for hybrid track selection and QA)
e49861e4 8 // Numbering starts from 1000 For standard and additional cut numbers
e35f09aa 9
10 AliESDtrackCuts *trackCuts = new AliESDtrackCuts("AliESDtrackCuts");
11
12 TString tag;
13
14 Int_t mod = 10000;
15
16 Bool_t bStdCutsDefined = kFALSE;
17
18
19 //_____________________________________________________________________
20 // STANDARD CUTS
21
22 //Get standard cuts: last 4 digits of cutMode
23 Int_t stdCutMode = cutMode%mod;
24
25 if(stdCutMode == 1000) {
26
27 bStdCutsDefined = kTRUE;
28
29 trackCuts = AliESDtrackCuts::GetStandardITSTPCTrackCuts2010(kTRUE,1);
30 trackCuts->SetMinNCrossedRowsTPC(120);
31 trackCuts->SetMinRatioCrossedRowsOverFindableClustersTPC(0.8);
32 trackCuts->SetMaxChi2PerClusterITS(36);
33 trackCuts->SetMaxFractionSharedTPCClusters(0.4);
46a305f3 34 trackCuts->SetMaxChi2TPCConstrainedGlobal(36);
e35f09aa 35
36 trackCuts->SetEtaRange(-0.9,0.9);
37 trackCuts->SetPtRange(0.15, 1e10);
38
39 tag = "Global track RAA analysis QM2011 + Chi2ITS<36";
40
41 }
42
43 if(stdCutMode == 1001) {
44
45 bStdCutsDefined = kTRUE;
46
47 // TPC
48 trackCuts->SetMinNClustersTPC(90);
49 trackCuts->SetMaxChi2PerClusterTPC(4);
50 trackCuts->SetRequireTPCStandAlone(kTRUE); //cut on NClustersTPC and chi2TPC Iter1
51 trackCuts->SetAcceptKinkDaughters(kFALSE);
52 trackCuts->SetRequireTPCRefit(kTRUE);
53 trackCuts->SetMaxFractionSharedTPCClusters(0.4);
54 // ITS
55 trackCuts->SetRequireITSRefit(kTRUE);
56 //accept secondaries
57 trackCuts->SetMaxDCAToVertexXY(2.4);
58 trackCuts->SetMaxDCAToVertexZ(3.2);
59 trackCuts->SetDCAToVertex2D(kTRUE);
60 //reject fakes
61 trackCuts->SetMaxChi2PerClusterITS(36);
62
63 trackCuts->SetRequireSigmaToVertex(kFALSE);
64
65 trackCuts->SetEtaRange(-0.9,0.9);
66 trackCuts->SetPtRange(0.15, 100.);
67
68
69 tag = "Global tracks jet analysis with ITSrefit and NclsIter1=90, noSPD requirement";
70
71 }
72
73 if(stdCutMode == 1002) {
74
75 bStdCutsDefined = kTRUE;
76
77 // TPC
78 trackCuts->SetMinNClustersTPC(80);
79 trackCuts->SetMaxChi2PerClusterTPC(4);
80 trackCuts->SetAcceptKinkDaughters(kFALSE);
81 trackCuts->SetRequireTPCRefit(kTRUE);
82 trackCuts->SetMaxFractionSharedTPCClusters(0.4);
83 // ITS
84 trackCuts->SetRequireITSRefit(kTRUE);
85 //accept secondaries
86 trackCuts->SetMaxDCAToVertexXY(2.4);
87 trackCuts->SetMaxDCAToVertexZ(3.2);
88 trackCuts->SetDCAToVertex2D(kTRUE);
89 //reject fakes
90 trackCuts->SetMaxChi2PerClusterITS(36);
91
92 trackCuts->SetRequireSigmaToVertex(kFALSE);
93
94 trackCuts->SetEtaRange(-0.9,0.9);
95 trackCuts->SetPtRange(0.15, 100.);
96
97
98 tag = "Global tracks jet analysis with ITSrefit and Ncls=80, noSPD requirement";
99
100 }
101
d3a3f33d 102 if(stdCutMode == 1003) {
103
104 bStdCutsDefined = kTRUE;
105
106 // tight global tracks
107 trackCuts = AliESDtrackCuts::GetStandardITSTPCTrackCuts2010(kFALSE,1);
108 trackCuts->SetMinNClustersTPC(0);
109 trackCuts->SetMinNCrossedRowsTPC(120);
110 trackCuts->SetMinRatioCrossedRowsOverFindableClustersTPC(0.1);// essentially switches it off
111 trackCuts->SetMaxDCAToVertexXY(2.4);
112 trackCuts->SetMaxDCAToVertexZ(3.2);
113 trackCuts->SetDCAToVertex2D(kTRUE);
114 trackCuts->SetMaxChi2PerClusterITS(36);
115 trackCuts->SetMaxFractionSharedTPCClusters(0.4);
116
117 tag = "Global tracks ITSTPC2010 + NCrossedRows + loose ITS";
118
119 }
dc6bbd38 120
121 if(stdCutMode == 1004) {
122
123 bStdCutsDefined = kTRUE;
124
125 // TPC
126 trackCuts->SetMinNClustersTPC(70);
127 trackCuts->SetMaxChi2PerClusterTPC(4);
128 trackCuts->SetRequireTPCStandAlone(kTRUE); //cut on NClustersTPC and chi2TPC Iter1
129 trackCuts->SetAcceptKinkDaughters(kFALSE);
130 trackCuts->SetRequireTPCRefit(kTRUE);
131 trackCuts->SetMaxFractionSharedTPCClusters(0.4);
132 // ITS
133 trackCuts->SetRequireITSRefit(kTRUE);
134 //accept secondaries
135 trackCuts->SetMaxDCAToVertexXY(2.4);
136 trackCuts->SetMaxDCAToVertexZ(3.2);
137 trackCuts->SetDCAToVertex2D(kTRUE);
138 //reject fakes
139 trackCuts->SetMaxChi2PerClusterITS(36);
140
141 trackCuts->SetRequireSigmaToVertex(kFALSE);
142
143 trackCuts->SetEtaRange(-0.9,0.9);
144 trackCuts->SetPtRange(0.15, 100.);
145
146 tag = "Global tracks jet analysis with ITSrefit and NclsIter1=70, noSPD requirement";
147
148 }
65c43de8 149 if(stdCutMode == 1005) {
150
151 bStdCutsDefined = kTRUE;
152
153 // TPC
154 trackCuts->SetMinNClustersTPC(70);
155 trackCuts->SetMaxChi2PerClusterTPC(4);
156 trackCuts->SetRequireTPCStandAlone(kTRUE); //cut on NClustersTPC and chi2TPC Iter1
157 trackCuts->SetAcceptKinkDaughters(kFALSE);
158 trackCuts->SetRequireTPCRefit(kTRUE);
159 trackCuts->SetMaxFractionSharedTPCClusters(0.4);
160 // ITS
161 trackCuts->SetRequireITSRefit(kTRUE);
162 //accept secondaries
163 trackCuts->SetMaxDCAToVertexXY(2.4);
164 trackCuts->SetMaxDCAToVertexZ(3.2);
165 trackCuts->SetDCAToVertex2D(kTRUE);
166 //reject fakes
167 trackCuts->SetMaxChi2PerClusterITS(36);
168
169 trackCuts->SetRequireSigmaToVertex(kFALSE);
170
171 trackCuts->SetEtaRange(-0.9,0.9);
172 trackCuts->SetPtRange(0.15, 1E+15.);
173
174 tag = "Global tracks jet analysis with ITSrefit and NclsIter1=70, noSPD requirement, no upper pt cut";
175
176 }
e49861e4 177
46a305f3 178 if(stdCutMode == 1006) {
179
180 bStdCutsDefined = kTRUE;
181
182 // TPC
183 TFormula *f1NClustersTPCLinearPtDep = new TFormula("f1NClustersTPCLinearPtDep","70.+30./20.*x");
184 trackCuts->SetMinNClustersTPCPtDep(f1NClustersTPCLinearPtDep,20.);
185 trackCuts->SetMinNClustersTPC(70);
186 trackCuts->SetMaxChi2PerClusterTPC(4);
187 trackCuts->SetRequireTPCStandAlone(kTRUE); //cut on NClustersTPC and chi2TPC Iter1
188 trackCuts->SetAcceptKinkDaughters(kFALSE);
189 trackCuts->SetRequireTPCRefit(kTRUE);
190 trackCuts->SetMaxFractionSharedTPCClusters(0.4);
191 // ITS
192 trackCuts->SetRequireITSRefit(kTRUE);
193 //accept secondaries
194 trackCuts->SetMaxDCAToVertexXY(2.4);
195 trackCuts->SetMaxDCAToVertexZ(3.2);
196 trackCuts->SetDCAToVertex2D(kTRUE);
197 //reject fakes
198 trackCuts->SetMaxChi2PerClusterITS(36);
199 trackCuts->SetMaxChi2TPCConstrainedGlobal(36);
200
201 trackCuts->SetRequireSigmaToVertex(kFALSE);
202
203 trackCuts->SetEtaRange(-0.9,0.9);
204 trackCuts->SetPtRange(0.15, 1E+15.);
205
206 tag = "Global tracks jet analysis with ITSrefit and NclsIter1=PtDep, noSPD requirement, no upper pt cut, golden chi2";
207
208 }
dc6bbd38 209
e49861e4 210 if(stdCutMode == 1007) {
211
212 bStdCutsDefined = kTRUE;
213
214 trackCuts = AliESDtrackCuts::GetStandardITSTPCTrackCuts2011(kFALSE);
215 //accept secondaries
216 trackCuts->SetMaxDCAToVertexXY(2.4);
217 trackCuts->SetMaxDCAToVertexZ(3.2);
218 trackCuts->SetDCAToVertex2D(kTRUE);
219
220 //
221 trackCuts->SetMaxChi2TPCConstrainedGlobal(36);
222
223 trackCuts->SetEtaRange(-0.9,0.9);
224 trackCuts->SetPtRange(0.15, 1E+15.);
225
226 tag = "Global tracks with AliESDtrackCuts::GetStandardITSTPCTrackCuts2011(kFALSE)";
227
228 }
dc6bbd38 229
f8bd6b9f 230 if(stdCutMode == 1008) {
231
232 bStdCutsDefined = kTRUE;
233
234 trackCuts = AliESDtrackCuts::GetStandardITSTPCTrackCuts2011(kFALSE);
235 //accept secondaries
236 trackCuts->SetMaxDCAToVertexXY(2.4);
237 trackCuts->SetMaxDCAToVertexZ(3.2);
238 trackCuts->SetDCAToVertex2D(kTRUE);
239
240 //
241 trackCuts->SetMaxChi2TPCConstrainedGlobal(36);
242 trackCuts->->SetClusterRequirementITS(AliESDtrackCuts::kSPD, AliESDtrackCuts::kNone);
243
244 trackCuts->SetEtaRange(-0.9,0.9);
245 trackCuts->SetPtRange(0.15, 1E+15.);
246
247 tag = "Global tracks 2011 with NCrossedRows cut";
248
249 }
250
d3a3f33d 251
e35f09aa 252 if(stdCutMode == 2000) {
253
254 bStdCutsDefined = kTRUE;
255
256 // TPC
257 trackCuts->SetMinNClustersTPC(90);
258 trackCuts->SetMaxChi2PerClusterTPC(4);
259 trackCuts->SetRequireTPCStandAlone(kTRUE); //cut on NClustersTPC and chi2TPC Iter1
260 trackCuts->SetAcceptKinkDaughters(kFALSE);
261 trackCuts->SetRequireTPCRefit(kTRUE);
262 trackCuts->SetMaxFractionSharedTPCClusters(0.4);
263 //accept secondaries
264 trackCuts->SetMaxDCAToVertexXY(2.4);
265 trackCuts->SetMaxDCAToVertexZ(3.2);
266 trackCuts->SetDCAToVertex2D(kTRUE);
267
268 trackCuts->SetRequireSigmaToVertex(kFALSE);
269
270 trackCuts->SetEtaRange(-0.9,0.9);
271 trackCuts->SetPtRange(0.15, 100.);
272
273
274 tag = "Global tracks jet analysis, loose cuts, NClsIter1=90, no ITS requirements";
275
276 }
277
278 if(stdCutMode == 2001) {
279
280 bStdCutsDefined = kTRUE;
281
282 trackCuts = AliESDtrackCuts::GetStandardTPCOnlyTrackCuts();
53ef50a2 283 trackCuts->SetRequireTPCRefit(kTRUE);
e35f09aa 284 trackCuts->SetMinNClustersTPC(70);
285
286 trackCuts->SetEtaRange(-0.9,0.9);
287 trackCuts->SetPtRange(0.15, 100.);
288
289
290 tag = "TPConly track cuts, loose cuts, NCls=70, no ITS requirements";
291
292 }
293
d3a3f33d 294 if(stdCutMode == 2002) {
295
296 bStdCutsDefined = kTRUE;
297
298 trackCuts = AliESDtrackCuts::GetStandardTPCOnlyTrackCuts();
68216590 299 trackCuts->SetRequireTPCRefit(kTRUE);
d3a3f33d 300 trackCuts->SetMinNClustersTPC(0);
301 trackCuts->SetMinNCrossedRowsTPC(120);
302 trackCuts->SetMinRatioCrossedRowsOverFindableClustersTPC(0.1);// essentially switches it off
303
304 trackCuts->SetEtaRange(-0.9,0.9);
305 trackCuts->SetPtRange(0.15, 100.);
306
307
308 tag = "TPConly track cuts, loose cuts, NCls=70, no ITS requirements";
309
310 }
311
e35f09aa 312 if(!bStdCutsDefined) {
313 printf("last 4 digits do not represent a predefined set of standard cuts. Returning 0\n");
314 return 0;
315
316 }
317
318
319 //_____________________________________________________________________
320 // ADDITIONAL CUTS
321
322 //Get additional cut mode: first 4 digits of cutMode
323 Int_t addCutMode = (int)((float)cutMode/(float)mod);
324
325 if(addCutMode == 1000) {
326
327 trackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD, AliESDtrackCuts::kAny);
328
329 tag += " + additonal: SPD any requirement";
330
331 }
332
333 if(addCutMode == 1001) {
334
335 trackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD, AliESDtrackCuts::kNone);
336
337 tag += " + additional: w/o hits in SPD";
338
339 }
340
341 if(addCutMode == 1002) {
342
343 trackCuts->SetMaxChi2PerClusterITS(1E10);
344
345 tag += " + additional: maxITSChi2=1e10";
346
347 }
348
349 if(addCutMode == 1003) {
350
351 trackCuts->SetMinNClustersTPC(0);
352 trackCuts->SetMinNCrossedRowsTPC(0);
353 trackCuts->SetMinRatioCrossedRowsOverFindableClustersTPC(0.);
354
355 tag += " + additional: minClusters=0 minCrossedRows=0 minCrossedRowsOverFindable=0";
356
357 }
358
d3a3f33d 359 if(addCutMode == 1004) {
360
361 trackCuts->SetRequireITSRefit(kFALSE);
362
363 tag += " + additional: ITSrefit=kFALSE";
364
365 }
366
e35f09aa 367 Printf("Created track cuts for: %s", tag.Data());
368
369 return trackCuts;
370
371}