Fix in AliTrackerBase::PropagateTo... routines: length integral was not correctly...
[u/mrichter/AliRoot.git] / PWGUD / dNdPt / macros / CreatedNdPtTrackCuts.C
1 /* $Id: CreateCuts.C,v 1.5 2008/01/11 08:28:52 jgrosseo Exp $ */
2
3 // this macro creates the track and event cuts used in this analysis
4
5 // last modified: 2011-03-28 
6 // m.l.knichel@gsi.de
7 // added cut modes 200,201: replacing TPCNcluster cut
8
9
10 AliESDtrackCuts* CreatedNdPtTrackCuts(Int_t cutMode=1, Bool_t fieldOn = kTRUE, Bool_t hists = kTRUE)
11 {
12   AliESDtrackCuts* esdTrackCuts = new AliESDtrackCuts("AliESDtrackCuts");
13
14   if (hists)
15     esdTrackCuts->DefineHistograms(1);
16
17   Double_t cov1, cov2, cov3, cov4, cov5;
18   Double_t nSigma;
19   Double_t maxDCAtoVertex, maxDCAtoVertexXY, maxDCAtoVertexZ;
20   Double_t minNClustersTPC;
21   Double_t maxChi2PerClusterTPC;
22   Double_t minPt, maxPt;
23
24   // default cuts for ITS+TPC
25   if (cutMode == 0) 
26   {
27     cov1 = 2;
28     cov2 = 2;
29     cov3 = 0.5;
30     cov4 = 0.5;
31     cov5 = 2;
32     nSigma = 3;
33     minNClustersTPC = 50;
34     maxChi2PerClusterTPC = 3.5;
35
36     esdTrackCuts->SetMaxCovDiagonalElements(cov1, cov2, cov3, cov4, cov5);
37     esdTrackCuts->SetMinNsigmaToVertex(nSigma);
38     esdTrackCuts->SetRequireSigmaToVertex(kTRUE);
39     esdTrackCuts->SetRequireTPCRefit(kTRUE);
40     esdTrackCuts->SetAcceptKinkDaughters(kFALSE);
41     esdTrackCuts->SetMinNClustersTPC(minNClustersTPC);
42     esdTrackCuts->SetMaxChi2PerClusterTPC(maxChi2PerClusterTPC);
43
44     TString tag("Global tracking");
45   }
46
47   // TPC-only cuts (vertex n sigma cut)
48   if (cutMode == 1) 
49   {
50     // beta cuts (still under investigation)
51     //cov1 = 4;
52     //cov2 = 4;
53     cov1 = 2;
54     cov2 = 2;
55     cov3 = 0.5;
56     cov4 = 0.5;
57     cov5 = 2;
58     nSigma = 4;
59     minNClustersTPC = 50;
60     maxChi2PerClusterTPC = 3.5;
61
62     esdTrackCuts->SetMaxCovDiagonalElements(cov1, cov2, cov3, cov4, cov5);
63     esdTrackCuts->SetMinNsigmaToVertex(nSigma);
64     esdTrackCuts->SetRequireSigmaToVertex(kTRUE);
65     esdTrackCuts->SetRequireTPCRefit(kFALSE);
66     esdTrackCuts->SetAcceptKinkDaughters(kFALSE);
67     esdTrackCuts->SetMinNClustersTPC(minNClustersTPC);
68     esdTrackCuts->SetMaxChi2PerClusterTPC(maxChi2PerClusterTPC);
69
70     TString tag = "TPC-only tracking";
71   }
72
73   // TPC-only cuts (vertex maxDCAtoVertex cut)
74   if (cutMode == 2) 
75   {
76     // beta cuts (still under investigation)
77     maxDCAtoVertex = 3.0; // cm
78     minNClustersTPC = 50;
79     maxChi2PerClusterTPC = 3.5;
80
81     esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
82     esdTrackCuts->SetMaxDCAToVertexXY(maxDCAtoVertex);    
83     esdTrackCuts->SetMaxDCAToVertexZ(maxDCAtoVertex);    
84     esdTrackCuts->SetRequireTPCRefit(kFALSE);
85     esdTrackCuts->SetAcceptKinkDaughters(kFALSE);
86     esdTrackCuts->SetMinNClustersTPC(minNClustersTPC);
87     esdTrackCuts->SetMaxChi2PerClusterTPC(maxChi2PerClusterTPC);
88
89     TString tag = "TPC-only tracking";
90   }
91
92   // TPC-only no vertex cuts
93   if (cutMode == 3) 
94   {
95     // beta cuts (still under investigation)
96     minNClustersTPC = 50;
97     maxChi2PerClusterTPC = 3.5;
98
99     esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
100     esdTrackCuts->SetRequireTPCRefit(kFALSE);
101     esdTrackCuts->SetAcceptKinkDaughters(kFALSE);
102     esdTrackCuts->SetMinNClustersTPC(minNClustersTPC);
103     esdTrackCuts->SetMaxChi2PerClusterTPC(maxChi2PerClusterTPC);
104
105     TString tag = "TPC-only tracking";
106   }
107
108   // TPC-only no cuts at all 
109   if (cutMode == 4) 
110   {
111
112     // beta cuts (still under investigation)
113     esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
114     esdTrackCuts->SetRequireTPCRefit(kFALSE);
115     esdTrackCuts->SetAcceptKinkDaughters(kTRUE);
116
117     TString tag = "TPC-only tracking";
118   }
119
120   // TPC-only no kink removal no chi2 
121   if (cutMode == 5) 
122   {
123     // beta cuts (still under investigation)
124     minNClustersTPC = 50;
125     //maxChi2PerClusterTPC = 3.5;
126
127     esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
128     esdTrackCuts->SetRequireTPCRefit(kFALSE);
129     esdTrackCuts->SetAcceptKinkDaughters(kTRUE);
130     esdTrackCuts->SetMinNClustersTPC(minNClustersTPC);
131     //esdTrackCuts->SetMaxChi2PerClusterTPC(maxChi2PerClusterTPC);
132
133     TString tag = "TPC-only tracking";
134   }
135
136   // TPC-only no kink removal 
137   if (cutMode == 6) 
138   {
139     // beta cuts (still under investigation)
140     minNClustersTPC = 50;
141     maxChi2PerClusterTPC = 3.5;
142
143     esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
144     esdTrackCuts->SetRequireTPCRefit(kFALSE);
145     esdTrackCuts->SetAcceptKinkDaughters(kTRUE);
146     esdTrackCuts->SetMinNClustersTPC(minNClustersTPC);
147     esdTrackCuts->SetMaxChi2PerClusterTPC(maxChi2PerClusterTPC);
148
149     TString tag = "TPC-only tracking";
150   }
151
152   // TPC-only no kink removal no minNClustersTPC 
153   if (cutMode == 7) 
154   {
155     // beta cuts (still under investigation)
156     //minNClustersTPC = 50;
157     maxChi2PerClusterTPC = 3.5;
158
159     esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
160     esdTrackCuts->SetRequireTPCRefit(kFALSE);
161     esdTrackCuts->SetAcceptKinkDaughters(kTRUE);
162     //esdTrackCuts->SetMinNClustersTPC(minNClustersTPC);
163     esdTrackCuts->SetMaxChi2PerClusterTPC(maxChi2PerClusterTPC);
164
165     TString tag = "TPC-only tracking";
166   }
167   // TPC-only no kink removal no minNClustersTPC 
168   if (cutMode == 8) 
169   {
170     // beta cuts (still under investigation)
171     //minNClustersTPC = 50;
172     maxChi2PerClusterTPC = 3.5;
173     maxDCAtoVertex = 3.0; // cm
174
175     esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
176     esdTrackCuts->SetMaxDCAToVertexXY(maxDCAtoVertex);    
177     esdTrackCuts->SetMaxDCAToVertexZ(maxDCAtoVertex);    
178     esdTrackCuts->SetRequireTPCRefit(kFALSE);
179     esdTrackCuts->SetAcceptKinkDaughters(kTRUE);
180     //esdTrackCuts->SetMinNClustersTPC(minNClustersTPC);
181     esdTrackCuts->SetMaxChi2PerClusterTPC(maxChi2PerClusterTPC);
182
183     TString tag = "TPC-only tracking";
184   }
185
186   // TPC-only no kink removal no minNClustersTPC no maxChi2PerClusterTPC
187   if (cutMode == 9) 
188   {
189     // beta cuts (still under investigation)
190     //minNClustersTPC = 50;
191     //maxChi2PerClusterTPC = 3.5;
192     maxDCAtoVertex = 3.0; // cm
193
194     esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
195     esdTrackCuts->SetMaxDCAToVertexXY(maxDCAtoVertex);    
196     esdTrackCuts->SetMaxDCAToVertexZ(maxDCAtoVertex);    
197     esdTrackCuts->SetRequireTPCRefit(kFALSE);
198     esdTrackCuts->SetAcceptKinkDaughters(kTRUE);
199     //esdTrackCuts->SetMinNClustersTPC(minNClustersTPC);
200     //esdTrackCuts->SetMaxChi2PerClusterTPC(maxChi2PerClusterTPC);
201
202     TString tag = "TPC-only tracking";
203   }
204
205   // TPC-only (loose cuts, absolute DCA cut) 
206   if (cutMode == 10) 
207   {
208     // beta cuts (still under investigation)
209     minNClustersTPC = 50;
210     maxChi2PerClusterTPC = 4.0;
211     maxDCAtoVertex = 2.8; // cm
212     minPt=0.15;
213     maxPt=1.e10;
214
215     esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
216     esdTrackCuts->SetRequireTPCRefit(kFALSE);
217     esdTrackCuts->SetAcceptKinkDaughters(kTRUE);
218     esdTrackCuts->SetMinNClustersTPC(minNClustersTPC);
219     esdTrackCuts->SetMaxChi2PerClusterTPC(maxChi2PerClusterTPC);
220     esdTrackCuts->SetMaxDCAToVertexXY(maxDCAtoVertex);    
221     esdTrackCuts->SetMaxDCAToVertexZ(maxDCAtoVertex);    
222     esdTrackCuts->SetPtRange(minPt,maxPt);
223
224     TString tag = "TPC-only tracking";
225   }
226
227
228   // TPC-only (loose cuts, no DCA cut) 
229   if (cutMode == 11) 
230   {
231     // beta cuts (still under investigation)
232     minNClustersTPC = 50;
233     maxChi2PerClusterTPC = 4.0;
234     maxDCAtoVertexXY = 1.e10; // cm
235     maxDCAtoVertexZ  = 1.e10; // cm
236     minPt=0.15;
237     maxPt=1.e10;
238
239     esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
240     esdTrackCuts->SetRequireTPCRefit(kFALSE);
241     esdTrackCuts->SetAcceptKinkDaughters(kTRUE);
242     esdTrackCuts->SetMinNClustersTPC(minNClustersTPC);
243     esdTrackCuts->SetMaxChi2PerClusterTPC(maxChi2PerClusterTPC);
244     esdTrackCuts->SetMaxDCAToVertexXY(maxDCAtoVertexXY);
245     esdTrackCuts->SetMaxDCAToVertexZ(maxDCAtoVertexZ);
246     esdTrackCuts->SetDCAToVertex2D(kTRUE);
247     esdTrackCuts->SetPtRange(minPt,maxPt);
248
249     TString tag = "TPC-only tracking";
250   }
251
252   // TPC-only (standard cuts, no DCA cut) 
253   if (cutMode == 12) 
254   {
255     // beta cuts (still under investigation)
256     minNClustersTPC = 96;
257     maxChi2PerClusterTPC = 3.5;
258     maxDCAtoVertexXY = 1.e10; // cm
259     maxDCAtoVertexZ  = 1.e10; // cm
260     minPt=0.2;
261     maxPt=1.e10;
262
263     esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
264     esdTrackCuts->SetRequireTPCRefit(kFALSE);
265     esdTrackCuts->SetAcceptKinkDaughters(kTRUE);
266     esdTrackCuts->SetMinNClustersTPC(minNClustersTPC);
267     esdTrackCuts->SetMaxChi2PerClusterTPC(maxChi2PerClusterTPC);
268     esdTrackCuts->SetMaxDCAToVertexXY(maxDCAtoVertexXY);
269     esdTrackCuts->SetMaxDCAToVertexZ(maxDCAtoVertexZ);
270     esdTrackCuts->SetDCAToVertex2D(kTRUE);
271     esdTrackCuts->SetPtRange(minPt,maxPt);
272
273     TString tag = "TPC-only tracking";
274   }
275
276   // TPC-only (tight cuts, no DCA cut) 
277   if (cutMode == 13) 
278   {
279     // beta cuts (still under investigation)
280     minNClustersTPC = 120;
281     maxChi2PerClusterTPC = 3.5;
282     maxDCAtoVertexXY = 1.e10; // cm
283     maxDCAtoVertexZ  = 1.e10; // cm
284     minPt=0.3;
285     maxPt=1.e10;
286
287     esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
288     esdTrackCuts->SetRequireTPCRefit(kFALSE);
289     esdTrackCuts->SetAcceptKinkDaughters(kTRUE);
290     esdTrackCuts->SetMinNClustersTPC(minNClustersTPC);
291     esdTrackCuts->SetMaxChi2PerClusterTPC(maxChi2PerClusterTPC);
292     esdTrackCuts->SetMaxDCAToVertexXY(maxDCAtoVertexXY);
293     esdTrackCuts->SetMaxDCAToVertexZ(maxDCAtoVertexZ);
294     esdTrackCuts->SetDCAToVertex2D(kTRUE);
295     esdTrackCuts->SetPtRange(minPt,maxPt);
296
297     TString tag = "TPC-only tracking";
298   }
299
300   // TPC-only (loose cuts, no pt cut) 
301   if (cutMode == 14) 
302   {
303     // beta cuts (still under investigation)
304     minNClustersTPC = 50;
305     maxChi2PerClusterTPC = 4.0;
306     maxDCAtoVertexXY = 1.e10; // cm
307     maxDCAtoVertexZ  = 1.e10; // cm
308     minPt=0.0;
309     maxPt=1.e10;
310
311     esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
312     esdTrackCuts->SetRequireTPCRefit(kFALSE);
313     esdTrackCuts->SetAcceptKinkDaughters(kTRUE);
314     esdTrackCuts->SetMinNClustersTPC(minNClustersTPC);
315     esdTrackCuts->SetMaxChi2PerClusterTPC(maxChi2PerClusterTPC);
316     esdTrackCuts->SetMaxDCAToVertexXY(maxDCAtoVertexXY);
317     esdTrackCuts->SetMaxDCAToVertexZ(maxDCAtoVertexZ);
318     esdTrackCuts->SetDCAToVertex2D(kTRUE);
319     esdTrackCuts->SetPtRange(minPt,maxPt);
320
321     TString tag = "TPC-only tracking";
322   }
323
324   // TPC-only (standard cuts, no pt cut) 
325   if (cutMode == 15) 
326   {
327     // beta cuts (still under investigation)
328     minNClustersTPC = 96;
329     maxChi2PerClusterTPC = 3.5;
330     maxDCAtoVertexXY = 1.e10; // cm
331     maxDCAtoVertexZ  = 1.e10; // cm
332     minPt=0.0;
333     maxPt=1.e10;
334
335     esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
336     esdTrackCuts->SetRequireTPCRefit(kFALSE);
337     esdTrackCuts->SetAcceptKinkDaughters(kTRUE);
338     esdTrackCuts->SetMinNClustersTPC(minNClustersTPC);
339     esdTrackCuts->SetMaxChi2PerClusterTPC(maxChi2PerClusterTPC);
340     esdTrackCuts->SetMaxDCAToVertexXY(maxDCAtoVertexXY);
341     esdTrackCuts->SetMaxDCAToVertexZ(maxDCAtoVertexZ);
342     esdTrackCuts->SetDCAToVertex2D(kTRUE);
343     esdTrackCuts->SetPtRange(minPt,maxPt);
344
345     TString tag = "TPC-only tracking";
346   }
347
348   // TPC-only (tight cuts, no pt cuts) 
349   if (cutMode == 16) 
350   {
351     // beta cuts (still under investigation)
352     minNClustersTPC = 120;
353     maxChi2PerClusterTPC = 3.5;
354     maxDCAtoVertexXY = 1.e10; // cm
355     maxDCAtoVertexZ  = 1.e10; // cm
356     minPt=0.0;
357     maxPt=1.e10;
358
359     esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
360     esdTrackCuts->SetRequireTPCRefit(kFALSE);
361     esdTrackCuts->SetAcceptKinkDaughters(kTRUE);
362     esdTrackCuts->SetMinNClustersTPC(minNClustersTPC);
363     esdTrackCuts->SetMaxChi2PerClusterTPC(maxChi2PerClusterTPC);
364     esdTrackCuts->SetMaxDCAToVertexXY(maxDCAtoVertexXY);
365     esdTrackCuts->SetMaxDCAToVertexZ(maxDCAtoVertexZ);
366     esdTrackCuts->SetDCAToVertex2D(kTRUE);
367     esdTrackCuts->SetPtRange(minPt,maxPt);
368
369     TString tag = "TPC-only tracking";
370   }
371   // TPC-only (loose cuts)
372   if (cutMode == 17) 
373   {
374     // beta cuts (still under investigation)
375     minNClustersTPC = 50;
376     maxChi2PerClusterTPC = 4.0;
377     //maxDCAtoVertexXY = 2.4; // cm
378     //maxDCAtoVertexZ  = 3.2; // cm
379     maxDCAtoVertexXY = 1.6; // cm
380     maxDCAtoVertexZ  = 2.1; // cm
381     minPt=0.15;
382     maxPt=1.e10;
383
384     esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
385     esdTrackCuts->SetRequireTPCRefit(kFALSE);
386     esdTrackCuts->SetAcceptKinkDaughters(kTRUE);
387     esdTrackCuts->SetMinNClustersTPC(minNClustersTPC);
388     esdTrackCuts->SetMaxChi2PerClusterTPC(maxChi2PerClusterTPC);
389     esdTrackCuts->SetMaxDCAToVertexXY(maxDCAtoVertexXY);
390     esdTrackCuts->SetMaxDCAToVertexZ(maxDCAtoVertexZ);
391     esdTrackCuts->SetDCAToVertex2D(kTRUE);
392     esdTrackCuts->SetPtRange(minPt,maxPt);
393
394     TString tag = "TPC-only tracking";
395   }
396
397   // TPC-only (standard cuts)
398   if (cutMode == 18) 
399   {
400     // beta cuts (still under investigation)
401     minNClustersTPC = 96;
402     maxChi2PerClusterTPC = 3.5;
403     //maxDCAtoVertexXY = 2.4; // cm
404     //maxDCAtoVertexZ  = 3.2; // cm
405     maxDCAtoVertexXY = 1.4; // cm
406     maxDCAtoVertexZ  = 1.8; // cm
407     minPt=0.2;
408     maxPt=1.e10;
409
410     esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
411     esdTrackCuts->SetRequireTPCRefit(kFALSE);
412     esdTrackCuts->SetAcceptKinkDaughters(kTRUE);
413     esdTrackCuts->SetMinNClustersTPC(minNClustersTPC);
414     esdTrackCuts->SetMaxChi2PerClusterTPC(maxChi2PerClusterTPC);
415     esdTrackCuts->SetMaxDCAToVertexXY(maxDCAtoVertexXY);
416     esdTrackCuts->SetMaxDCAToVertexZ(maxDCAtoVertexZ);
417     esdTrackCuts->SetDCAToVertex2D(kTRUE);
418     esdTrackCuts->SetPtRange(minPt,maxPt);
419
420     TString tag = "TPC-only tracking";
421   }
422
423  // TPC-only (tight cuts)
424   if (cutMode == 19) 
425   {
426     // beta cuts (still under investigation)
427     minNClustersTPC = 120;
428     maxChi2PerClusterTPC = 3.0;
429     //maxDCAtoVertexXY = 2.4; // cm
430     //maxDCAtoVertexZ  = 3.2; // cm
431     maxDCAtoVertexXY = 1.4; // cm
432     maxDCAtoVertexZ  = 1.8; // cm
433     minPt=0.3;
434     maxPt=1.e10;
435
436     esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
437     esdTrackCuts->SetRequireTPCRefit(kFALSE);
438     esdTrackCuts->SetAcceptKinkDaughters(kTRUE);
439     esdTrackCuts->SetMinNClustersTPC(minNClustersTPC);
440     esdTrackCuts->SetMaxChi2PerClusterTPC(maxChi2PerClusterTPC);
441     esdTrackCuts->SetMaxDCAToVertexXY(maxDCAtoVertexXY);
442     esdTrackCuts->SetMaxDCAToVertexZ(maxDCAtoVertexZ);
443     esdTrackCuts->SetDCAToVertex2D(kTRUE);
444     esdTrackCuts->SetPtRange(minPt,maxPt);
445
446     TString tag = "TPC-only tracking";
447   }
448
449   // TPC-only (arb. cuts, kink cuts included)
450   if (cutMode == 20) 
451   {
452     // beta cuts (still under investigation)
453     minNClustersTPC = 50;
454     maxChi2PerClusterTPC = 1.e10;
455     maxDCAtoVertexXY = 3.0; // cm
456     maxDCAtoVertexZ  = 3.0; // cm
457     minPt=0.0;
458     maxPt=1.e10;
459
460     esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
461     esdTrackCuts->SetRequireTPCRefit(kFALSE);
462     esdTrackCuts->SetAcceptKinkDaughters(kFALSE);
463     esdTrackCuts->SetMinNClustersTPC(minNClustersTPC);
464     esdTrackCuts->SetMaxChi2PerClusterTPC(maxChi2PerClusterTPC);
465     esdTrackCuts->SetMaxDCAToVertexXY(maxDCAtoVertexXY);
466     esdTrackCuts->SetMaxDCAToVertexZ(maxDCAtoVertexZ);
467     esdTrackCuts->SetDCAToVertex2D(kTRUE);
468     esdTrackCuts->SetPtRange(minPt,maxPt);
469
470     TString tag = "TPC-only tracking";
471   }
472
473   // TPC-only (arb. cuts, kink cuts excluded)
474   if (cutMode == 21) 
475   {
476     // beta cuts (still under investigation)
477     minNClustersTPC = 50;
478     maxChi2PerClusterTPC = 1.e10;
479     maxDCAtoVertexXY = 3.0; // cm
480     maxDCAtoVertexZ  = 3.0; // cm
481     minPt=0.0;
482     maxPt=1.e10;
483
484     esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
485     esdTrackCuts->SetRequireTPCRefit(kFALSE);
486     esdTrackCuts->SetAcceptKinkDaughters(kTRUE);
487     esdTrackCuts->SetMinNClustersTPC(minNClustersTPC);
488     esdTrackCuts->SetMaxChi2PerClusterTPC(maxChi2PerClusterTPC);
489     esdTrackCuts->SetMaxDCAToVertexXY(maxDCAtoVertexXY);
490     esdTrackCuts->SetMaxDCAToVertexZ(maxDCAtoVertexZ);
491     esdTrackCuts->SetDCAToVertex2D(kTRUE);
492     esdTrackCuts->SetPtRange(minPt,maxPt);
493
494     TString tag = "TPC-only tracking";
495   }
496
497   // TPC-only (arb. cuts, kink cuts excluded, no chi2, no DCA)
498   if (cutMode == 22) 
499   {
500     // beta cuts (still under investigation)
501     minNClustersTPC = 50;
502     maxChi2PerClusterTPC = 1.e10;
503     maxDCAtoVertexXY = 1.e10; // cm
504     maxDCAtoVertexZ  = 1.e10; // cm
505     minPt=0.15;
506     maxPt=1.e10;
507
508     esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
509     esdTrackCuts->SetRequireTPCRefit(kFALSE);
510     esdTrackCuts->SetAcceptKinkDaughters(kTRUE);
511     esdTrackCuts->SetMinNClustersTPC(minNClustersTPC);
512     esdTrackCuts->SetMaxChi2PerClusterTPC(maxChi2PerClusterTPC);
513     esdTrackCuts->SetMaxDCAToVertexXY(maxDCAtoVertexXY);
514     esdTrackCuts->SetMaxDCAToVertexZ(maxDCAtoVertexZ);
515     esdTrackCuts->SetDCAToVertex2D(kTRUE);
516     esdTrackCuts->SetPtRange(minPt,maxPt);
517
518     TString tag = "TPC-only tracking";
519   }
520
521   // TPC-only 
522   if (cutMode == 23) 
523   {
524     // beta cuts (still under investigation)
525     minNClustersTPC = 70;
526     maxChi2PerClusterTPC = 4.0;
527     maxDCAtoVertexXY = 2.4; // cm
528     maxDCAtoVertexZ  = 3.2; // cm
529
530     esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
531     esdTrackCuts->SetRequireTPCRefit(kFALSE);
532     esdTrackCuts->SetRequireTPCStandAlone(kTRUE);
533     esdTrackCuts->SetAcceptKinkDaughters(kFALSE);
534     esdTrackCuts->SetMinNClustersTPC(minNClustersTPC);
535     esdTrackCuts->SetMaxChi2PerClusterTPC(maxChi2PerClusterTPC);
536     esdTrackCuts->SetRequireITSRefit(kFALSE);
537     esdTrackCuts->SetMaxDCAToVertexXY(maxDCAtoVertexXY);
538     esdTrackCuts->SetMaxDCAToVertexZ(maxDCAtoVertexZ);
539     esdTrackCuts->SetDCAToVertex2D(kTRUE);
540     //esdTrackCuts->SetPtRange(minPt,maxPt);
541     //esdTrackCuts->SetEtaRange(minEta,maxEta);
542
543     TString tag = "TPC-only tracking";
544   }
545   
546   // TPC-only tight cuts
547   if (cutMode == 230) 
548   {
549     // beta cuts (still under investigation)
550     minNClustersTPC = 70;
551     maxChi2PerClusterTPC = 4.0;
552     maxDCAtoVertexXY = 0.3; // cm
553     maxDCAtoVertexZ  = 0.3; // cm
554
555     esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
556     esdTrackCuts->SetRequireTPCRefit(kFALSE);
557     esdTrackCuts->SetRequireTPCStandAlone(kTRUE);
558     esdTrackCuts->SetAcceptKinkDaughters(kFALSE);
559     esdTrackCuts->SetMinNClustersTPC(minNClustersTPC);
560     esdTrackCuts->SetMaxChi2PerClusterTPC(maxChi2PerClusterTPC);
561     esdTrackCuts->SetRequireITSRefit(kFALSE);
562     esdTrackCuts->SetMaxDCAToVertexXY(maxDCAtoVertexXY);
563     esdTrackCuts->SetMaxDCAToVertexZ(maxDCAtoVertexZ);
564     esdTrackCuts->SetDCAToVertex2D(kTRUE);
565     //esdTrackCuts->SetPtRange(minPt,maxPt);
566     //esdTrackCuts->SetEtaRange(minEta,maxEta);
567
568     TString tag = "TPC-only tracking";
569   }
570   
571
572   // TPC (no pt cut, no eta cut)
573   if (cutMode == 24) 
574   {
575     // beta cuts (still under investigation)
576     minNClustersTPC = 70;
577     maxChi2PerClusterTPC = 4.0;
578     maxDCAtoVertexXY = 2.4; // cm
579     maxDCAtoVertexZ  = 3.2; // cm
580
581     esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
582     esdTrackCuts->SetRequireTPCRefit(kFALSE);
583     esdTrackCuts->SetRequireTPCStandAlone(kFALSE);
584     esdTrackCuts->SetAcceptKinkDaughters(kFALSE);
585     esdTrackCuts->SetMinNClustersTPC(minNClustersTPC);
586     esdTrackCuts->SetMaxChi2PerClusterTPC(maxChi2PerClusterTPC);
587     esdTrackCuts->SetRequireITSRefit(kFALSE);
588     esdTrackCuts->SetMaxDCAToVertexXY(maxDCAtoVertexXY);
589     esdTrackCuts->SetMaxDCAToVertexZ(maxDCAtoVertexZ);
590     esdTrackCuts->SetDCAToVertex2D(kTRUE);
591
592     TString tag = "TPC tracking";
593   }
594   
595   // TPC-only (no pt cut, no eta cut) updated 2011
596   if (cutMode == 201) 
597   {
598     // beta cuts (still under investigation)
599     //minNClustersTPC = 50;
600     Float_t minNCrossedRowsTPC = 120; 
601     Float_t minRatioCrossedRowsOverFindableClustersTPC = 0.8; 
602     Float_t maxFractionSharedTPCCluster = 0.4;    
603     maxChi2PerClusterTPC = 4.0;
604     maxDCAtoVertexXY = 2.4; // cm
605     maxDCAtoVertexZ  = 3.2; // cm
606     minPt=0.0;
607     maxPt=1.e10;
608
609     esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
610     esdTrackCuts->SetRequireTPCRefit(kFALSE);
611     esdTrackCuts->SetAcceptKinkDaughters(kFALSE);
612     //esdTrackCuts->SetMinNClustersTPC(minNClustersTPC);
613     
614     esdTrackCuts->SetMinNCrossedRowsTPC(minNCrossedRowsTPC);
615     esdTrackCuts->SetMinRatioCrossedRowsOverFindableClustersTPC(minRatioCrossedRowsOverFindableClustersTPC);
616     esdTrackCuts->SetMaxChi2PerClusterTPC(maxChi2PerClusterTPC);
617     esdTrackCuts->SetMaxFractionSharedTPCClusters(maxFractionSharedTPCCluster);
618     
619     esdTrackCuts->SetMaxDCAToVertexXY(maxDCAtoVertexXY);
620     esdTrackCuts->SetMaxDCAToVertexZ(maxDCAtoVertexZ);
621     esdTrackCuts->SetDCAToVertex2D(kTRUE);
622     esdTrackCuts->SetPtRange(minPt,maxPt);
623
624     TString tag = "TPC-only tracking (2011)";
625   }  
626   
627
628   //
629   // systematic errors DCA cut studies
630   //
631   // TPC-only
632   if (cutMode == 25) 
633   {
634     // beta cuts (still under investigation)
635     minNClustersTPC = 50;
636     maxChi2PerClusterTPC = 4.0;
637     maxDCAtoVertexXY = 1.4; // cm
638     maxDCAtoVertexZ  = 2.2; // cm
639     minPt=0.0;
640     maxPt=1.e10;
641
642     esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
643     esdTrackCuts->SetRequireTPCRefit(kFALSE);
644     esdTrackCuts->SetAcceptKinkDaughters(kFALSE);
645     esdTrackCuts->SetMinNClustersTPC(minNClustersTPC);
646     esdTrackCuts->SetMaxChi2PerClusterTPC(maxChi2PerClusterTPC);
647     esdTrackCuts->SetMaxDCAToVertexXY(maxDCAtoVertexXY);
648     esdTrackCuts->SetMaxDCAToVertexZ(maxDCAtoVertexZ);
649     esdTrackCuts->SetDCAToVertex2D(kTRUE);
650     esdTrackCuts->SetPtRange(minPt,maxPt);
651
652     TString tag = "TPC-only tracking";
653   }
654
655   if (cutMode == 26) 
656   {
657     // beta cuts (still under investigation)
658     minNClustersTPC = 50;
659     maxChi2PerClusterTPC = 4.0;
660     maxDCAtoVertexXY = 1.6; // cm
661     maxDCAtoVertexZ  = 2.4; // cm
662     minPt=0.0;
663     maxPt=1.e10;
664
665     esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
666     esdTrackCuts->SetRequireTPCRefit(kFALSE);
667     esdTrackCuts->SetAcceptKinkDaughters(kFALSE);
668     esdTrackCuts->SetMinNClustersTPC(minNClustersTPC);
669     esdTrackCuts->SetMaxChi2PerClusterTPC(maxChi2PerClusterTPC);
670     esdTrackCuts->SetMaxDCAToVertexXY(maxDCAtoVertexXY);
671     esdTrackCuts->SetMaxDCAToVertexZ(maxDCAtoVertexZ);
672     esdTrackCuts->SetDCAToVertex2D(kTRUE);
673     esdTrackCuts->SetPtRange(minPt,maxPt);
674
675     TString tag = "TPC-only tracking";
676   }
677
678   //
679   // systematic errors cut studies
680   //
681   // TPC-only
682   if (cutMode == 27) 
683   {
684     // beta cuts (still under investigation)
685     minNClustersTPC = 50;
686     maxChi2PerClusterTPC = 4.0;
687     maxDCAtoVertexXY = 1.8; // cm
688     maxDCAtoVertexZ  = 2.6; // cm
689     minPt=0.0;
690     maxPt=1.e10;
691
692     esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
693     esdTrackCuts->SetRequireTPCRefit(kFALSE);
694     esdTrackCuts->SetAcceptKinkDaughters(kFALSE);
695     esdTrackCuts->SetMinNClustersTPC(minNClustersTPC);
696     esdTrackCuts->SetMaxChi2PerClusterTPC(maxChi2PerClusterTPC);
697     esdTrackCuts->SetMaxDCAToVertexXY(maxDCAtoVertexXY);
698     esdTrackCuts->SetMaxDCAToVertexZ(maxDCAtoVertexZ);
699     esdTrackCuts->SetDCAToVertex2D(kTRUE);
700     esdTrackCuts->SetPtRange(minPt,maxPt);
701
702     TString tag = "TPC-only tracking";
703   }
704
705   if (cutMode == 28) 
706   {
707     // beta cuts (still under investigation)
708     minNClustersTPC = 50;
709     maxChi2PerClusterTPC = 4.0;
710     maxDCAtoVertexXY = 2.0; // cm
711     maxDCAtoVertexZ  = 2.8; // cm
712     minPt=0.0;
713     maxPt=1.e10;
714
715     esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
716     esdTrackCuts->SetRequireTPCRefit(kFALSE);
717     esdTrackCuts->SetAcceptKinkDaughters(kFALSE);
718     esdTrackCuts->SetMinNClustersTPC(minNClustersTPC);
719     esdTrackCuts->SetMaxChi2PerClusterTPC(maxChi2PerClusterTPC);
720     esdTrackCuts->SetMaxDCAToVertexXY(maxDCAtoVertexXY);
721     esdTrackCuts->SetMaxDCAToVertexZ(maxDCAtoVertexZ);
722     esdTrackCuts->SetDCAToVertex2D(kTRUE);
723     esdTrackCuts->SetPtRange(minPt,maxPt);
724
725     TString tag = "TPC-only tracking";
726   }
727
728   if (cutMode == 29) 
729   {
730     // beta cuts (still under investigation)
731     minNClustersTPC = 50;
732     maxChi2PerClusterTPC = 4.0;
733     maxDCAtoVertexXY = 2.2; // cm
734     maxDCAtoVertexZ  = 3.0; // cm
735     minPt=0.0;
736     maxPt=1.e10;
737
738     esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
739     esdTrackCuts->SetRequireTPCRefit(kFALSE);
740     esdTrackCuts->SetAcceptKinkDaughters(kFALSE);
741     esdTrackCuts->SetMinNClustersTPC(minNClustersTPC);
742     esdTrackCuts->SetMaxChi2PerClusterTPC(maxChi2PerClusterTPC);
743     esdTrackCuts->SetMaxDCAToVertexXY(maxDCAtoVertexXY);
744     esdTrackCuts->SetMaxDCAToVertexZ(maxDCAtoVertexZ);
745     esdTrackCuts->SetDCAToVertex2D(kTRUE);
746     esdTrackCuts->SetPtRange(minPt,maxPt);
747
748     TString tag = "TPC-only tracking";
749   }
750
751   if (cutMode == 30) 
752   {
753     // beta cuts (still under investigation)
754     minNClustersTPC = 50;
755     maxChi2PerClusterTPC = 4.0;
756     maxDCAtoVertexXY = 2.4; // cm
757     maxDCAtoVertexZ  = 3.2; // cm
758     minPt=0.0;
759     maxPt=1.e10;
760
761     esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
762     esdTrackCuts->SetRequireTPCRefit(kFALSE);
763     esdTrackCuts->SetAcceptKinkDaughters(kFALSE);
764     esdTrackCuts->SetMinNClustersTPC(minNClustersTPC);
765     esdTrackCuts->SetMaxChi2PerClusterTPC(maxChi2PerClusterTPC);
766     esdTrackCuts->SetMaxDCAToVertexXY(maxDCAtoVertexXY);
767     esdTrackCuts->SetMaxDCAToVertexZ(maxDCAtoVertexZ);
768     esdTrackCuts->SetDCAToVertex2D(kTRUE);
769     esdTrackCuts->SetPtRange(minPt,maxPt);
770
771     TString tag = "TPC-only tracking";
772   }
773
774   if (cutMode == 31) 
775   {
776     // beta cuts (still under investigation)
777     minNClustersTPC = 50;
778     maxChi2PerClusterTPC = 4.0;
779     maxDCAtoVertexXY = 2.6; // cm
780     maxDCAtoVertexZ  = 3.4; // cm
781     minPt=0.0;
782     maxPt=1.e10;
783
784     esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
785     esdTrackCuts->SetRequireTPCRefit(kFALSE);
786     esdTrackCuts->SetAcceptKinkDaughters(kFALSE);
787     esdTrackCuts->SetMinNClustersTPC(minNClustersTPC);
788     esdTrackCuts->SetMaxChi2PerClusterTPC(maxChi2PerClusterTPC);
789     esdTrackCuts->SetMaxDCAToVertexXY(maxDCAtoVertexXY);
790     esdTrackCuts->SetMaxDCAToVertexZ(maxDCAtoVertexZ);
791     esdTrackCuts->SetDCAToVertex2D(kTRUE);
792     esdTrackCuts->SetPtRange(minPt,maxPt);
793
794     TString tag = "TPC-only tracking";
795   }
796
797
798   if (cutMode == 32) 
799   {
800     // beta cuts (still under investigation)
801     minNClustersTPC = 50;
802     maxChi2PerClusterTPC = 4.0;
803     maxDCAtoVertexXY = 2.8; // cm
804     maxDCAtoVertexZ  = 3.6; // cm
805     minPt=0.0;
806     maxPt=1.e10;
807
808     esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
809     esdTrackCuts->SetRequireTPCRefit(kFALSE);
810     esdTrackCuts->SetAcceptKinkDaughters(kFALSE);
811     esdTrackCuts->SetMinNClustersTPC(minNClustersTPC);
812     esdTrackCuts->SetMaxChi2PerClusterTPC(maxChi2PerClusterTPC);
813     esdTrackCuts->SetMaxDCAToVertexXY(maxDCAtoVertexXY);
814     esdTrackCuts->SetMaxDCAToVertexZ(maxDCAtoVertexZ);
815     esdTrackCuts->SetDCAToVertex2D(kTRUE);
816     esdTrackCuts->SetPtRange(minPt,maxPt);
817
818     TString tag = "TPC-only tracking";
819   }
820
821   if (cutMode == 33) 
822   {
823     // beta cuts (still under investigation)
824     minNClustersTPC = 50;
825     maxChi2PerClusterTPC = 4.0;
826     maxDCAtoVertexXY = 3.0; // cm
827     maxDCAtoVertexZ  = 3.8; // cm
828     minPt=0.0;
829     maxPt=1.e10;
830
831     esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
832     esdTrackCuts->SetRequireTPCRefit(kFALSE);
833     esdTrackCuts->SetAcceptKinkDaughters(kFALSE);
834     esdTrackCuts->SetMinNClustersTPC(minNClustersTPC);
835     esdTrackCuts->SetMaxChi2PerClusterTPC(maxChi2PerClusterTPC);
836     esdTrackCuts->SetMaxDCAToVertexXY(maxDCAtoVertexXY);
837     esdTrackCuts->SetMaxDCAToVertexZ(maxDCAtoVertexZ);
838     esdTrackCuts->SetDCAToVertex2D(kTRUE);
839     esdTrackCuts->SetPtRange(minPt,maxPt);
840
841     TString tag = "TPC-only tracking";
842   }
843
844   if (cutMode == 34) 
845   {
846     // beta cuts (still under investigation)
847     minNClustersTPC = 50;
848     maxChi2PerClusterTPC = 4.0;
849     maxDCAtoVertexXY = 3.2; // cm
850     maxDCAtoVertexZ  = 4.0; // cm
851     minPt=0.0;
852     maxPt=1.e10;
853
854     esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
855     esdTrackCuts->SetRequireTPCRefit(kFALSE);
856     esdTrackCuts->SetAcceptKinkDaughters(kFALSE);
857     esdTrackCuts->SetMinNClustersTPC(minNClustersTPC);
858     esdTrackCuts->SetMaxChi2PerClusterTPC(maxChi2PerClusterTPC);
859     esdTrackCuts->SetMaxDCAToVertexXY(maxDCAtoVertexXY);
860     esdTrackCuts->SetMaxDCAToVertexZ(maxDCAtoVertexZ);
861     esdTrackCuts->SetDCAToVertex2D(kTRUE);
862     esdTrackCuts->SetPtRange(minPt,maxPt);
863
864     TString tag = "TPC-only tracking";
865   }
866
867   if (cutMode == 35) 
868   {
869     // beta cuts (still under investigation)
870     minNClustersTPC = 50;
871     maxChi2PerClusterTPC = 4.0;
872     maxDCAtoVertexXY = 3.4; // cm
873     maxDCAtoVertexZ  = 4.2; // cm
874     minPt=0.0;
875     maxPt=1.e10;
876
877     esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
878     esdTrackCuts->SetRequireTPCRefit(kFALSE);
879     esdTrackCuts->SetAcceptKinkDaughters(kFALSE);
880     esdTrackCuts->SetMinNClustersTPC(minNClustersTPC);
881     esdTrackCuts->SetMaxChi2PerClusterTPC(maxChi2PerClusterTPC);
882     esdTrackCuts->SetMaxDCAToVertexXY(maxDCAtoVertexXY);
883     esdTrackCuts->SetMaxDCAToVertexZ(maxDCAtoVertexZ);
884     esdTrackCuts->SetDCAToVertex2D(kTRUE);
885     esdTrackCuts->SetPtRange(minPt,maxPt);
886
887     TString tag = "TPC-only tracking";
888   }
889
890 //
891 // cut stability systematics
892 //
893
894   if (cutMode == 36) 
895   {
896     // beta cuts (still under investigation)
897     minNClustersTPC = 70;
898     maxChi2PerClusterTPC = 4.0;
899     maxDCAtoVertexXY = 2.4; // cm
900     maxDCAtoVertexZ  = 3.2; // cm
901     minPt=0.0;
902     maxPt=1.e10;
903
904     esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
905     esdTrackCuts->SetRequireTPCRefit(kFALSE);
906     esdTrackCuts->SetAcceptKinkDaughters(kFALSE);
907     esdTrackCuts->SetMinNClustersTPC(minNClustersTPC);
908     esdTrackCuts->SetMaxChi2PerClusterTPC(maxChi2PerClusterTPC);
909     esdTrackCuts->SetMaxDCAToVertexXY(maxDCAtoVertexXY);
910     esdTrackCuts->SetMaxDCAToVertexZ(maxDCAtoVertexZ);
911     esdTrackCuts->SetDCAToVertex2D(kTRUE);
912     esdTrackCuts->SetPtRange(minPt,maxPt);
913
914     TString tag = "TPC-only tracking";
915   }
916
917  if (cutMode == 37) 
918   {
919     // beta cuts (still under investigation)
920     minNClustersTPC = 90;
921     maxChi2PerClusterTPC = 4.0;
922     maxDCAtoVertexXY = 2.4; // cm
923     maxDCAtoVertexZ  = 3.2; // cm
924     minPt=0.0;
925     maxPt=1.e10;
926
927     esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
928     esdTrackCuts->SetRequireTPCRefit(kFALSE);
929     esdTrackCuts->SetAcceptKinkDaughters(kFALSE);
930     esdTrackCuts->SetMinNClustersTPC(minNClustersTPC);
931     esdTrackCuts->SetMaxChi2PerClusterTPC(maxChi2PerClusterTPC);
932     esdTrackCuts->SetMaxDCAToVertexXY(maxDCAtoVertexXY);
933     esdTrackCuts->SetMaxDCAToVertexZ(maxDCAtoVertexZ);
934     esdTrackCuts->SetDCAToVertex2D(kTRUE);
935     esdTrackCuts->SetPtRange(minPt,maxPt);
936
937     TString tag = "TPC-only tracking";
938   }
939
940   if (cutMode == 38) 
941   {
942     // beta cuts (still under investigation)
943     minNClustersTPC = 50;
944     maxChi2PerClusterTPC = 3.0;
945     maxDCAtoVertexXY = 2.4; // cm
946     maxDCAtoVertexZ  = 3.2; // cm
947     minPt=0.0;
948     maxPt=1.e10;
949
950     esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
951     esdTrackCuts->SetRequireTPCRefit(kFALSE);
952     esdTrackCuts->SetAcceptKinkDaughters(kFALSE);
953     esdTrackCuts->SetMinNClustersTPC(minNClustersTPC);
954     esdTrackCuts->SetMaxChi2PerClusterTPC(maxChi2PerClusterTPC);
955     esdTrackCuts->SetMaxDCAToVertexXY(maxDCAtoVertexXY);
956     esdTrackCuts->SetMaxDCAToVertexZ(maxDCAtoVertexZ);
957     esdTrackCuts->SetDCAToVertex2D(kTRUE);
958     esdTrackCuts->SetPtRange(minPt,maxPt);
959
960     TString tag = "TPC-only tracking";
961   }
962
963   if (cutMode == 39) 
964   {
965     // beta cuts (still under investigation)
966     minNClustersTPC = 50;
967     maxChi2PerClusterTPC = 5.0;
968     maxDCAtoVertexXY = 2.4; // cm
969     maxDCAtoVertexZ  = 3.2; // cm
970     minPt=0.0;
971     maxPt=1.e10;
972
973     esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
974     esdTrackCuts->SetRequireTPCRefit(kFALSE);
975     esdTrackCuts->SetAcceptKinkDaughters(kFALSE);
976     esdTrackCuts->SetMinNClustersTPC(minNClustersTPC);
977     esdTrackCuts->SetMaxChi2PerClusterTPC(maxChi2PerClusterTPC);
978     esdTrackCuts->SetMaxDCAToVertexXY(maxDCAtoVertexXY);
979     esdTrackCuts->SetMaxDCAToVertexZ(maxDCAtoVertexZ);
980     esdTrackCuts->SetDCAToVertex2D(kTRUE);
981     esdTrackCuts->SetPtRange(minPt,maxPt);
982
983     TString tag = "TPC-only tracking";
984   }
985
986   if (cutMode == 40) 
987   {
988     // beta cuts (still under investigation)
989     minNClustersTPC = 50;
990     maxChi2PerClusterTPC = 4.0;
991     maxDCAtoVertexXY = 1.4; // cm
992     maxDCAtoVertexZ  = 2.2; // cm
993     minPt=0.0;
994     maxPt=1.e10;
995
996     esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
997     esdTrackCuts->SetRequireTPCRefit(kFALSE);
998     esdTrackCuts->SetAcceptKinkDaughters(kFALSE);
999     esdTrackCuts->SetMinNClustersTPC(minNClustersTPC);
1000     esdTrackCuts->SetMaxChi2PerClusterTPC(maxChi2PerClusterTPC);
1001     esdTrackCuts->SetMaxDCAToVertexXY(maxDCAtoVertexXY);
1002     esdTrackCuts->SetMaxDCAToVertexZ(maxDCAtoVertexZ);
1003     esdTrackCuts->SetDCAToVertex2D(kTRUE);
1004     esdTrackCuts->SetPtRange(minPt,maxPt);
1005
1006     TString tag = "TPC-only tracking";
1007   }
1008
1009   if (cutMode == 41) 
1010   {
1011     // beta cuts (still under investigation)
1012     minNClustersTPC = 50;
1013     maxChi2PerClusterTPC = 4.0;
1014     maxDCAtoVertexXY = 3.4; // cm
1015     maxDCAtoVertexZ  = 4.2; // cm
1016     minPt=0.0;
1017     maxPt=1.e10;
1018
1019     esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
1020     esdTrackCuts->SetRequireTPCRefit(kFALSE);
1021     esdTrackCuts->SetAcceptKinkDaughters(kFALSE);
1022     esdTrackCuts->SetMinNClustersTPC(minNClustersTPC);
1023     esdTrackCuts->SetMaxChi2PerClusterTPC(maxChi2PerClusterTPC);
1024     esdTrackCuts->SetMaxDCAToVertexXY(maxDCAtoVertexXY);
1025     esdTrackCuts->SetMaxDCAToVertexZ(maxDCAtoVertexZ);
1026     esdTrackCuts->SetDCAToVertex2D(kTRUE);
1027     esdTrackCuts->SetPtRange(minPt,maxPt);
1028
1029     TString tag = "TPC-only tracking";
1030   }
1031
1032   if (cutMode == 42) 
1033   {
1034     // beta cuts (still under investigation)
1035     minNClustersTPC = 50;
1036     maxChi2PerClusterTPC = 4.0;
1037     maxDCAtoVertexXY = 2.4; // cm
1038     maxDCAtoVertexZ  = 3.2; // cm
1039     minPt=0.0;
1040     maxPt=1.e10;
1041
1042     esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
1043     esdTrackCuts->SetRequireTPCRefit(kFALSE);
1044     //esdTrackCuts->SetAcceptKinkDaughters(kFALSE);
1045     esdTrackCuts->SetAcceptKinkDaughters(kTRUE);
1046     esdTrackCuts->SetMinNClustersTPC(minNClustersTPC);
1047     esdTrackCuts->SetMaxChi2PerClusterTPC(maxChi2PerClusterTPC);
1048     esdTrackCuts->SetMaxDCAToVertexXY(maxDCAtoVertexXY);
1049     esdTrackCuts->SetMaxDCAToVertexZ(maxDCAtoVertexZ);
1050     esdTrackCuts->SetDCAToVertex2D(kTRUE);
1051     esdTrackCuts->SetPtRange(minPt,maxPt);
1052
1053     TString tag = "TPC-only tracking";
1054   }
1055   // test
1056   if (cutMode == 43) 
1057   {
1058     // beta cuts (still under investigation)
1059     minNClustersTPC = 50;
1060     maxChi2PerClusterTPC = 4.0;
1061     //maxDCAtoVertexXY = 2.4; // cm
1062     //maxDCAtoVertexZ  = 3.2; // cm
1063     //minPt=0.15;
1064     //maxPt=1.e10;
1065
1066     esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
1067     esdTrackCuts->SetRequireTPCRefit(kFALSE);
1068     esdTrackCuts->SetAcceptKinkDaughters(kFALSE);
1069     esdTrackCuts->SetMinNClustersTPC(minNClustersTPC);
1070     esdTrackCuts->SetMaxChi2PerClusterTPC(maxChi2PerClusterTPC);
1071     //esdTrackCuts->SetMaxDCAToVertexXY(maxDCAtoVertexXY);
1072     //esdTrackCuts->SetMaxDCAToVertexZ(maxDCAtoVertexZ);
1073     //esdTrackCuts->SetDCAToVertex2D(kTRUE);
1074     //esdTrackCuts->SetPtRange(minPt,maxPt);
1075     //esdTrackCuts->SetEtaRange(minEta,maxEta);
1076
1077     TString tag = "TPC-only tracking";
1078   }
1079
1080   // TPC-only + pt cut + eta cut 
1081   if (cutMode == 45) 
1082   {
1083     // beta cuts (still under investigation)
1084     //minNClustersTPC = 50;
1085     //maxChi2PerClusterTPC = 4.0;
1086     maxDCAtoVertexXY = 2.4; // cm
1087     maxDCAtoVertexZ  = 3.2; // cm
1088     //minPt=0.15;
1089     //maxPt=1.e10;
1090
1091     esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
1092     esdTrackCuts->SetRequireTPCRefit(kFALSE);
1093     esdTrackCuts->SetAcceptKinkDaughters(kFALSE);
1094     //esdTrackCuts->SetMinNClustersTPC(minNClustersTPC);
1095     //esdTrackCuts->SetMaxChi2PerClusterTPC(maxChi2PerClusterTPC);
1096     esdTrackCuts->SetMaxDCAToVertexXY(maxDCAtoVertexXY);
1097     esdTrackCuts->SetMaxDCAToVertexZ(maxDCAtoVertexZ);
1098     esdTrackCuts->SetDCAToVertex2D(kTRUE);
1099     //esdTrackCuts->SetPtRange(minPt,maxPt);
1100     //esdTrackCuts->SetEtaRange(minEta,maxEta);
1101
1102     TString tag = "TPC-only tracking";
1103   }
1104
1105   // TPC-tracks + SPD point + ITS refit
1106   if (cutMode == 50) 
1107   {
1108     Int_t    minclsTPC=70;
1109     Double_t maxchi2perTPCcl=4.;
1110     //Double_t maxEtaInAcc=0.8;
1111     Double_t maxdcaxyITSTPC=0.2;
1112     Double_t maxdcazITSTPC=1.e9;
1113
1114     esdTrackCuts->SetMaxDCAToVertexXY(maxdcaxyITSTPC);
1115     esdTrackCuts->SetMaxDCAToVertexZ(maxdcazITSTPC);
1116     esdTrackCuts->SetDCAToVertex2D(kFALSE);
1117     esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
1118     esdTrackCuts->SetRequireITSRefit(kTRUE);
1119     esdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD,AliESDtrackCuts::kAny);
1120     esdTrackCuts->SetRequireTPCStandAlone(kTRUE);
1121     esdTrackCuts->SetAcceptKinkDaughters(kFALSE);
1122     esdTrackCuts->SetMinNClustersTPC(minclsTPC);
1123     esdTrackCuts->SetMaxChi2PerClusterTPC(maxchi2perTPCcl);
1124     //esdTrackCuts->SetEtaRange(-maxEtaInAcc,maxEtaInAcc);
1125
1126     TString tag = "TPC-tracks + ITS refit + >1 SPD cluster";
1127   }
1128
1129   // TPC-tracks + SPD point + ITS refit
1130   if (cutMode == 60) 
1131   {
1132     Int_t    minclsITS=4;
1133     Int_t    minclsTPC=70;
1134     Double_t maxchi2perTPCcl=4.;
1135     Double_t maxdcaxyITSTPC=0.2;
1136     Double_t maxdcazITSTPC=1.e9;
1137
1138     esdTrackCuts->SetMaxDCAToVertexXY(maxdcaxyITSTPC);
1139     esdTrackCuts->SetMaxDCAToVertexZ(maxdcazITSTPC);
1140     esdTrackCuts->SetDCAToVertex2D(kFALSE);
1141     esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
1142     esdTrackCuts->SetRequireITSRefit(kTRUE);
1143     esdTrackCuts->SetMinNClustersITS(minclsITS);
1144     esdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD,AliESDtrackCuts::kAny);
1145     //esdTrackCuts->SetRequireTPCStandAlone(kTRUE);
1146     esdTrackCuts->SetRequireTPCRefit(kTRUE);
1147     esdTrackCuts->SetAcceptKinkDaughters(kFALSE);
1148     esdTrackCuts->SetMinNClustersTPC(minclsTPC);
1149     esdTrackCuts->SetMaxChi2PerClusterTPC(maxchi2perTPCcl);
1150
1151     TString tag = "Global tracking: TPC refit + ITS refit + >3 ITS clusters + >=1 SPD cluster";
1152   }
1153
1154   /*
1155   // TPC-tracks + SPD point + ITS refit + DCAr(pt)
1156   if (cutMode == 70) 
1157   {
1158     Int_t    minclsTPC=70;
1159     Double_t maxchi2perTPCcl=4.;
1160     Double_t maxdcaxyITSTPC=1.e9;
1161     Double_t maxdcazITSTPC=1.e9;
1162
1163     esdTrackCuts->SetMaxDCAToVertexXY(maxdcaxyITSTPC);
1164     esdTrackCuts->SetMaxDCAToVertexZ(maxdcazITSTPC);
1165     esdTrackCuts->SetDCAToVertex2D(kFALSE);
1166     esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
1167     esdTrackCuts->SetRequireITSRefit(kTRUE);
1168     esdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD,AliESDtrackCuts::kAny);
1169     esdTrackCuts->SetRequireTPCStandAlone(kTRUE);
1170     esdTrackCuts->SetAcceptKinkDaughters(kFALSE);
1171     esdTrackCuts->SetMinNClustersTPC(minclsTPC);
1172     esdTrackCuts->SetMaxChi2PerClusterTPC(maxchi2perTPCcl);
1173
1174     TString tag = "TPC-tracks + ITS refit + >1 SPD cluster + DCAr(Pt)";
1175   }
1176   */
1177
1178   // TPC-tracks + SPD point + ITS refit + DCAr(pt)
1179   if (cutMode == 70) 
1180   {
1181     Int_t    minclsTPC=70;
1182     Double_t maxchi2perTPCcl=4.;
1183     Double_t maxdcazITSTPC=1.e9;
1184
1185     //
1186     // TPC
1187     //
1188     esdTrackCuts->SetRequireTPCStandAlone(kTRUE);
1189     esdTrackCuts->SetAcceptKinkDaughters(kFALSE);
1190     esdTrackCuts->SetMinNClustersTPC(minclsTPC);
1191     esdTrackCuts->SetMaxChi2PerClusterTPC(maxchi2perTPCcl);
1192     //
1193     // ITS
1194     //
1195     esdTrackCuts->SetRequireITSRefit(kTRUE);
1196     esdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD,AliESDtrackCuts::kAny);
1197     //
1198     // primary selection
1199     //
1200     esdTrackCuts->SetDCAToVertex2D(kFALSE);
1201     esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
1202     esdTrackCuts->SetMaxDCAToVertexZ(maxdcazITSTPC);
1203
1204     // 7*(0.0050+0.0060/pt^0.9)
1205     esdTrackCuts->SetMaxDCAToVertexXYPtDep("0.0350+0.0420/pt^0.9");
1206
1207     TString tag = "TPC-tracks + ITS refit + >1 SPD cluster + DCAr(Pt)";
1208   }
1209
1210   // TPC+ITS combine tracking + DCAr(pt) + DCAz(pt)
1211   if (cutMode == 71) 
1212   {
1213     Int_t    minclsTPC=70;
1214     Double_t maxchi2perTPCcl=4.;
1215     Double_t maxdcazITSTPC=1.e9;
1216
1217     //
1218     // TPC
1219     //
1220     esdTrackCuts->SetRequireTPCRefit(kTRUE);
1221     esdTrackCuts->SetAcceptKinkDaughters(kFALSE);
1222     esdTrackCuts->SetMinNClustersTPC(minclsTPC);
1223     esdTrackCuts->SetMaxChi2PerClusterTPC(maxchi2perTPCcl);
1224     //
1225     // ITS
1226     //
1227     esdTrackCuts->SetRequireITSRefit(kTRUE);
1228     esdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD,AliESDtrackCuts::kAny);
1229     //
1230     // primary selection
1231     //
1232     esdTrackCuts->SetDCAToVertex2D(kFALSE);
1233     esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
1234     esdTrackCuts->SetMaxDCAToVertexZ(maxdcazITSTPC);
1235
1236     // DCArphi parametrization (LHC10c pass2)
1237     // 7*(0.0026+0.0050/pt^1.01)
1238     esdTrackCuts->SetMaxDCAToVertexXYPtDep("0.0182+0.0350/pt^1.01");
1239
1240     // DCArphi parametrization (LHC10c pass2)
1241     // 7*(0.01+0.011/pt^0.72)
1242     esdTrackCuts->SetMaxDCAToVertexZPtDep("0.07+0.077/pt^0.72");
1243
1244     TString tag = "TPC+ITS combine tracking + DCAr(pt) + DCAz(pt)";
1245   }
1246
1247   // TPC+ITS combine tracking + DCAr(pt) (2010)
1248   if (cutMode == 72) 
1249   {
1250     Int_t    minclsTPC=70;
1251     Double_t maxchi2perTPCcl=4.;
1252     Double_t maxdcazITSTPC=2.0;
1253
1254     //
1255     // TPC
1256     //
1257     esdTrackCuts->SetRequireTPCRefit(kTRUE);
1258     esdTrackCuts->SetAcceptKinkDaughters(kFALSE);
1259     esdTrackCuts->SetMinNClustersTPC(minclsTPC);
1260     esdTrackCuts->SetMaxChi2PerClusterTPC(maxchi2perTPCcl);
1261     //
1262     // ITS
1263     //
1264     esdTrackCuts->SetRequireITSRefit(kTRUE);
1265     esdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD,AliESDtrackCuts::kAny);
1266     //
1267     // primary selection
1268     //
1269     esdTrackCuts->SetDCAToVertex2D(kFALSE);
1270     esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
1271     esdTrackCuts->SetMaxDCAToVertexZ(maxdcazITSTPC);
1272
1273     // DCArphi parametrization (LHC10c pass2)
1274     // 7*(0.0026+0.0050/pt^1.01)
1275     esdTrackCuts->SetMaxDCAToVertexXYPtDep("0.0182+0.0350/pt^1.01");
1276
1277     TString tag = "TPC+ITS combine tracking + DCAr(pt) (2010)";
1278   }
1279
1280   // TPC+ITS combine tracking + DCAr(pt) (2011)
1281   if (cutMode == 200) 
1282   {
1283     //Int_t    minclsTPC=70;
1284     Float_t minNCrossedRowsTPC = 120; 
1285     Float_t minRatioCrossedRowsOverFindableClustersTPC = 0.8; 
1286     Float_t maxFractionSharedTPCCluster = 0.4;
1287     Double_t maxchi2perTPCcl=4.;
1288     Double_t maxdcazITSTPC=2.0;
1289
1290     //
1291     // TPC
1292     //
1293     esdTrackCuts->SetRequireTPCRefit(kTRUE);
1294     esdTrackCuts->SetAcceptKinkDaughters(kFALSE);
1295     
1296     //esdTrackCuts->SetMinNClustersTPC(minclsTPC);
1297     esdTrackCuts->SetMinNCrossedRowsTPC(minNCrossedRowsTPC);
1298     esdTrackCuts->SetMinRatioCrossedRowsOverFindableClustersTPC(minRatioCrossedRowsOverFindableClustersTPC);
1299     esdTrackCuts->SetMaxChi2PerClusterTPC(maxchi2perTPCcl);
1300     esdTrackCuts->SetMaxFractionSharedTPCClusters(maxFractionSharedTPCCluster);
1301     //
1302     // ITS
1303     //
1304     esdTrackCuts->SetRequireITSRefit(kTRUE);
1305     esdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD,AliESDtrackCuts::kAny);
1306     //
1307     // primary selection
1308     //
1309     esdTrackCuts->SetDCAToVertex2D(kFALSE);
1310     esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
1311     esdTrackCuts->SetMaxDCAToVertexZ(maxdcazITSTPC);
1312
1313     // DCArphi parametrization (LHC10c pass2)
1314     // 7*(0.0026+0.0050/pt^1.01)
1315     esdTrackCuts->SetMaxDCAToVertexXYPtDep("0.0182+0.0350/pt^1.01");
1316
1317     TString tag = "TPC+ITS combine tracking + DCAr(pt) (2011)";
1318   }
1319
1320   // TPC-tracks + SPD point + ITS refit + DCAr(pt) 4-sigma
1321   if (cutMode == 75) 
1322   {
1323     Int_t    minclsTPC=70;
1324     Double_t maxchi2perTPCcl=4.;
1325     Double_t maxdcazITSTPC=1.e9;
1326
1327     //
1328     // TPC
1329     //
1330     esdTrackCuts->SetRequireTPCStandAlone(kTRUE);
1331     esdTrackCuts->SetAcceptKinkDaughters(kFALSE);
1332     esdTrackCuts->SetMinNClustersTPC(minclsTPC);
1333     esdTrackCuts->SetMaxChi2PerClusterTPC(maxchi2perTPCcl);
1334     //
1335     // ITS
1336     //
1337     esdTrackCuts->SetRequireITSRefit(kTRUE);
1338     esdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD,AliESDtrackCuts::kAny);
1339     //
1340     // primary selection
1341     //
1342     esdTrackCuts->SetDCAToVertex2D(kFALSE);
1343     esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
1344     esdTrackCuts->SetMaxDCAToVertexZ(maxdcazITSTPC);
1345
1346     // 4*(0.0050+0.0060/pt^0.9)
1347     esdTrackCuts->SetMaxDCAToVertexXYPtDep("0.02+0.024/pt^0.9");
1348
1349     TString tag = "TPC-tracks + ITS refit + >1 SPD cluster + DCAr(Pt) 4-sigma";
1350   }
1351
1352   // TPC-tracks + SPD point + ITS refit + DCAr(pt) 10-sigma
1353   if (cutMode == 80) 
1354   {
1355     Int_t    minclsTPC=70;
1356     Double_t maxchi2perTPCcl=4.;
1357     Double_t maxdcazITSTPC=1.e9;
1358
1359     //
1360     // TPC
1361     //
1362     esdTrackCuts->SetRequireTPCStandAlone(kTRUE);
1363     esdTrackCuts->SetAcceptKinkDaughters(kFALSE);
1364     esdTrackCuts->SetMinNClustersTPC(minclsTPC);
1365     esdTrackCuts->SetMaxChi2PerClusterTPC(maxchi2perTPCcl);
1366     //
1367     // ITS
1368     //
1369     esdTrackCuts->SetRequireITSRefit(kTRUE);
1370     esdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD,AliESDtrackCuts::kAny);
1371     //
1372     // primary selection
1373     //
1374     esdTrackCuts->SetDCAToVertex2D(kFALSE);
1375     esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
1376     esdTrackCuts->SetMaxDCAToVertexZ(maxdcazITSTPC);
1377
1378     // 10*(0.0050+0.0060/pt^0.9)
1379     esdTrackCuts->SetMaxDCAToVertexXYPtDep("0.05+0.06/pt^0.9");
1380
1381     TString tag = "TPC-tracks + ITS refit + >1 SPD cluster + DCAr(Pt) 10 sigma";
1382   }
1383
1384   // TPC-tracks + SPD point + ITS refit + DCAr(pt) + 60 TPCclust
1385   if (cutMode == 85) 
1386   {
1387     Int_t    minclsTPC=60;
1388     Double_t maxchi2perTPCcl=4.;
1389     Double_t maxdcazITSTPC=1.e9;
1390
1391     //
1392     // TPC
1393     //
1394     esdTrackCuts->SetRequireTPCStandAlone(kTRUE);
1395     esdTrackCuts->SetAcceptKinkDaughters(kFALSE);
1396     esdTrackCuts->SetMinNClustersTPC(minclsTPC);
1397     esdTrackCuts->SetMaxChi2PerClusterTPC(maxchi2perTPCcl);
1398     //
1399     // ITS
1400     //
1401     esdTrackCuts->SetRequireITSRefit(kTRUE);
1402     esdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD,AliESDtrackCuts::kAny);
1403     //
1404     // primary selection
1405     //
1406     esdTrackCuts->SetDCAToVertex2D(kFALSE);
1407     esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
1408     esdTrackCuts->SetMaxDCAToVertexZ(maxdcazITSTPC);
1409
1410     // 7*(0.0050+0.0060/pt^0.9)
1411     esdTrackCuts->SetMaxDCAToVertexXYPtDep("0.0350+0.0420/pt^0.9");
1412
1413     TString tag = "TPC-tracks + ITS refit + >1 SPD cluster + DCAr(Pt) + 60 TPCclust";
1414   }
1415
1416   // TPC-tracks + SPD point + ITS refit + DCAr(pt) + 80 clusters
1417   if (cutMode == 90) 
1418   {
1419     Int_t    minclsTPC=80;
1420     Double_t maxchi2perTPCcl=4.;
1421     Double_t maxdcazITSTPC=1.e9;
1422
1423     //
1424     // TPC
1425     //
1426     esdTrackCuts->SetRequireTPCStandAlone(kTRUE);
1427     esdTrackCuts->SetAcceptKinkDaughters(kFALSE);
1428     esdTrackCuts->SetMinNClustersTPC(minclsTPC);
1429     esdTrackCuts->SetMaxChi2PerClusterTPC(maxchi2perTPCcl);
1430     //
1431     // ITS
1432     //
1433     esdTrackCuts->SetRequireITSRefit(kTRUE);
1434     esdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD,AliESDtrackCuts::kAny);
1435     //
1436     // primary selection
1437     //
1438     esdTrackCuts->SetDCAToVertex2D(kFALSE);
1439     esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
1440     esdTrackCuts->SetMaxDCAToVertexZ(maxdcazITSTPC);
1441
1442     // 7*(0.0050+0.0060/pt^0.9)
1443     esdTrackCuts->SetMaxDCAToVertexXYPtDep("0.0350+0.0420/pt^0.9");
1444
1445     TString tag = "TPC-tracks + ITS refit + >1 SPD cluster + DCAr(Pt) + 80 TPCclust";
1446   }
1447
1448   // TPC-tracks + SPD point + ITS refit + DCAr(pt) + TPCchi2=3.5
1449   if (cutMode == 95) 
1450   {
1451     Int_t    minclsTPC=80;
1452     Double_t maxchi2perTPCcl=3.5;
1453     Double_t maxdcazITSTPC=1.e9;
1454
1455     //
1456     // TPC
1457     //
1458     esdTrackCuts->SetRequireTPCStandAlone(kTRUE);
1459     esdTrackCuts->SetAcceptKinkDaughters(kFALSE);
1460     esdTrackCuts->SetMinNClustersTPC(minclsTPC);
1461     esdTrackCuts->SetMaxChi2PerClusterTPC(maxchi2perTPCcl);
1462     //
1463     // ITS
1464     //
1465     esdTrackCuts->SetRequireITSRefit(kTRUE);
1466     esdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD,AliESDtrackCuts::kAny);
1467     //
1468     // primary selection
1469     //
1470     esdTrackCuts->SetDCAToVertex2D(kFALSE);
1471     esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
1472     esdTrackCuts->SetMaxDCAToVertexZ(maxdcazITSTPC);
1473
1474     // 7*(0.0050+0.0060/pt^0.9)
1475     esdTrackCuts->SetMaxDCAToVertexXYPtDep("0.0350+0.0420/pt^0.9");
1476
1477     TString tag = "TPC-tracks + ITS refit + >1 SPD cluster + DCAr(Pt) + TPCchi2 3.5";
1478   }
1479
1480   // TPC-tracks + SPD point + ITS refit + DCAr(pt) + TPCchi2=4.5
1481   if (cutMode == 100) 
1482   {
1483     Int_t    minclsTPC=80;
1484     Double_t maxchi2perTPCcl=4.5;
1485     Double_t maxdcazITSTPC=1.e9;
1486
1487     //
1488     // TPC
1489     //
1490     esdTrackCuts->SetRequireTPCStandAlone(kTRUE);
1491     esdTrackCuts->SetAcceptKinkDaughters(kFALSE);
1492     esdTrackCuts->SetMinNClustersTPC(minclsTPC);
1493     esdTrackCuts->SetMaxChi2PerClusterTPC(maxchi2perTPCcl);
1494     //
1495     // ITS
1496     //
1497     esdTrackCuts->SetRequireITSRefit(kTRUE);
1498     esdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD,AliESDtrackCuts::kAny);
1499     //
1500     // primary selection
1501     //
1502     esdTrackCuts->SetDCAToVertex2D(kFALSE);
1503     esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
1504     esdTrackCuts->SetMaxDCAToVertexZ(maxdcazITSTPC);
1505
1506     // 7*(0.0050+0.0060/pt^0.9)
1507     esdTrackCuts->SetMaxDCAToVertexXYPtDep("0.0350+0.0420/pt^0.9");
1508
1509     TString tag = "TPC-tracks + ITS refit + >1 SPD cluster + DCAr(Pt) + TPCchi2 4.5";
1510   }
1511
1512   // TPC-tracks
1513   if (cutMode == 110) 
1514   {
1515
1516     minNClustersTPC = 70;
1517     maxChi2PerClusterTPC = 4.0;
1518     maxDCAtoVertexXY = 1.e9; // cm
1519     maxDCAtoVertexZ  = 1.e9; // cm
1520
1521     esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
1522     esdTrackCuts->SetRequireTPCRefit(kFALSE);
1523     esdTrackCuts->SetRequireTPCStandAlone(kTRUE);
1524     esdTrackCuts->SetAcceptKinkDaughters(kFALSE);
1525     esdTrackCuts->SetMinNClustersTPC(minNClustersTPC);
1526     esdTrackCuts->SetMaxChi2PerClusterTPC(maxChi2PerClusterTPC);
1527     esdTrackCuts->SetMaxDCAToVertexXY(maxDCAtoVertexXY);
1528     esdTrackCuts->SetMaxDCAToVertexZ(maxDCAtoVertexZ);
1529     esdTrackCuts->SetDCAToVertex2D(kTRUE);
1530
1531     TString tag = "TPC-tracks loose criteria";
1532   }
1533
1534
1535   // TPC-tracks + SPD point + ITS refit + DCAr(pt) + 50 TPCclust
1536   if (cutMode == 120) 
1537   {
1538     Int_t    minclsTPC=50;
1539     Double_t maxchi2perTPCcl=4.;
1540     Double_t maxdcazITSTPC=1.e9;
1541
1542     //
1543     // TPC
1544     //
1545     esdTrackCuts->SetRequireTPCStandAlone(kTRUE);
1546     esdTrackCuts->SetAcceptKinkDaughters(kFALSE);
1547     esdTrackCuts->SetMinNClustersTPC(minclsTPC);
1548     esdTrackCuts->SetMaxChi2PerClusterTPC(maxchi2perTPCcl);
1549     //
1550     // ITS
1551     //
1552     esdTrackCuts->SetRequireITSRefit(kTRUE);
1553     esdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD,AliESDtrackCuts::kAny);
1554     //
1555     // primary selection
1556     //
1557     esdTrackCuts->SetDCAToVertex2D(kFALSE);
1558     esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
1559     esdTrackCuts->SetMaxDCAToVertexZ(maxdcazITSTPC);
1560
1561     // 7*(0.0050+0.0060/pt^0.9)
1562     esdTrackCuts->SetMaxDCAToVertexXYPtDep("0.0350+0.0420/pt^0.9");
1563
1564     TString tag = "TPC-tracks + ITS refit + >1 SPD cluster + DCAr(Pt) + 60 TPCclust";
1565   }
1566
1567   // TPC-tracks + SPD point + ITS refit + DCAr(pt) + 70 TPCclust + accept kink daughters
1568   if (cutMode == 130) 
1569   {
1570     Int_t    minclsTPC=70;
1571     Double_t maxchi2perTPCcl=4.;
1572     Double_t maxdcazITSTPC=1.e9;
1573
1574     //
1575     // TPC
1576     //
1577     esdTrackCuts->SetRequireTPCStandAlone(kTRUE);
1578     esdTrackCuts->SetAcceptKinkDaughters(kTRUE);
1579     esdTrackCuts->SetMinNClustersTPC(minclsTPC);
1580     esdTrackCuts->SetMaxChi2PerClusterTPC(maxchi2perTPCcl);
1581     //
1582     // ITS
1583     //
1584     esdTrackCuts->SetRequireITSRefit(kTRUE);
1585     esdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD,AliESDtrackCuts::kAny);
1586     //
1587     // primary selection
1588     //
1589     esdTrackCuts->SetDCAToVertex2D(kFALSE);
1590     esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
1591     esdTrackCuts->SetMaxDCAToVertexZ(maxdcazITSTPC);
1592
1593     // 7*(0.0050+0.0060/pt^0.9)
1594     esdTrackCuts->SetMaxDCAToVertexXYPtDep("0.0350+0.0420/pt^0.9");
1595
1596     TString tag = "TPC-tracks + ITS refit + >1 SPD cluster + DCAr(Pt) + 60 TPCclust";
1597   }
1598
1599   // TPC-tracks + SPD point + ITS refit + DCAr(pt) + 30 TPCclust + accept kink daughters
1600   if (cutMode == 140) 
1601   {
1602     Int_t    minclsTPC=30;
1603     Double_t maxchi2perTPCcl=4.;
1604     Double_t maxdcazITSTPC=1.e9;
1605
1606     //
1607     // TPC
1608     //
1609     esdTrackCuts->SetRequireTPCStandAlone(kTRUE);
1610     esdTrackCuts->SetAcceptKinkDaughters(kTRUE);
1611     esdTrackCuts->SetMinNClustersTPC(minclsTPC);
1612     esdTrackCuts->SetMaxChi2PerClusterTPC(maxchi2perTPCcl);
1613     //
1614     // ITS
1615     //
1616     esdTrackCuts->SetRequireITSRefit(kTRUE);
1617     esdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD,AliESDtrackCuts::kAny);
1618     //
1619     // primary selection
1620     //
1621     esdTrackCuts->SetDCAToVertex2D(kFALSE);
1622     esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
1623     esdTrackCuts->SetMaxDCAToVertexZ(maxdcazITSTPC);
1624
1625     // 7*(0.0050+0.0060/pt^0.9)
1626     esdTrackCuts->SetMaxDCAToVertexXYPtDep("0.0350+0.0420/pt^0.9");
1627
1628     TString tag = "TPC-tracks + ITS refit + >1 SPD cluster + DCAr(Pt) + 60 TPCclust";
1629   }
1630
1631   // Adam Kisiel track selectiion
1632   if (cutMode == 150) 
1633   {
1634     Int_t    minclsTPC=70;
1635     Double_t maxchi2perTPCcl=4.;
1636     Double_t maxdcazITSTPC=0.25;
1637     Double_t maxdcaxyITSTPC=0.2;
1638
1639     //
1640     // TPC
1641     //
1642     //esdTrackCuts->SetRequireTPCStandAlone(kTRUE);
1643     esdTrackCuts->SetAcceptKinkDaughters(kFALSE);
1644     esdTrackCuts->SetMinNClustersTPC(minclsTPC);
1645     esdTrackCuts->SetMaxChi2PerClusterTPC(maxchi2perTPCcl);
1646     //
1647     // ITS
1648     //
1649     esdTrackCuts->SetRequireITSRefit(kTRUE);
1650     //esdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD,AliESDtrackCuts::kAny);
1651     //
1652     // primary selection
1653     //
1654     //esdTrackCuts->SetDCAToVertex2D(kFALSE);
1655     esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
1656     esdTrackCuts->SetMaxDCAToVertexZ(maxdcazITSTPC);
1657     esdTrackCuts->SetMaxDCAToVertexXY(maxdcaxyITSTPC);
1658
1659     // 7*(0.0050+0.0060/pt^0.9)
1660     //esdTrackCuts->SetMaxDCAToVertexXYPtDep("0.0350+0.0420/pt^0.9");
1661
1662     TString tag = "Adam Kisiel track selection";
1663   }
1664
1665   // TPC+ITS refit + SPD any
1666   // for cut studies
1667   if (cutMode == 151) 
1668   {
1669     //
1670     // TPC
1671     //
1672     esdTrackCuts->SetRequireTPCRefit(kTRUE);
1673     esdTrackCuts->SetAcceptKinkDaughters(kFALSE);
1674     //
1675     // ITS
1676     //
1677     esdTrackCuts->SetRequireITSRefit(kTRUE);
1678     esdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD,AliESDtrackCuts::kAny);
1679     //
1680
1681     TString tag = "TPC+ITS refit required - for cut studies";
1682   }
1683
1684   // TPC refit
1685   // for cut studies
1686   if (cutMode == 152) 
1687   {
1688     //
1689     // TPC
1690     //
1691     esdTrackCuts->SetRequireTPCRefit(kTRUE);
1692     esdTrackCuts->SetAcceptKinkDaughters(kFALSE);
1693     //
1694     // ITS
1695     //
1696     //esdTrackCuts->SetRequireITSRefit(kTRUE);
1697     //esdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD,AliESDtrackCuts::kAny);
1698     //
1699     
1700     TString tag = "TPC refit required - for cut studies";
1701   }
1702
1703   // TPC
1704   // for cut studies
1705   if (cutMode == 153) 
1706   {
1707     //
1708     // TPC
1709     //
1710     esdTrackCuts->SetRequireTPCRefit(kFALSE);
1711     esdTrackCuts->SetRequireITSRefit(kFALSE);
1712     esdTrackCuts->SetRequireTPCStandAlone(kTRUE);
1713     esdTrackCuts->SetAcceptKinkDaughters(kFALSE);
1714     //
1715     // ITS
1716     //
1717     //esdTrackCuts->SetRequireITSRefit(kTRUE);
1718     //esdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD,AliESDtrackCuts::kAny);
1719     //
1720     
1721     TString tag = "TPC stand alone - for cut studies";
1722   }
1723
1724   // TPC+ITS refit 
1725   // for cut studies
1726   if (cutMode == 154) 
1727   {
1728     //
1729     // TPC
1730     //
1731     esdTrackCuts->SetRequireTPCRefit(kTRUE);
1732     esdTrackCuts->SetAcceptKinkDaughters(kFALSE);
1733     //
1734     // ITS
1735     //
1736     esdTrackCuts->SetRequireITSRefit(kTRUE);
1737     //esdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD,AliESDtrackCuts::kAny);
1738     //
1739
1740     TString tag = "TPC+ITS refit required - for cut studies";
1741   }
1742
1743   // TPC+ITS refit  + TPC DCA rough cuts
1744   // for cut studies
1745   if (cutMode == 155) 
1746   {
1747     //
1748     // TPC
1749     //
1750     maxDCAtoVertexXY = 5.0; // cm
1751     maxDCAtoVertexZ  = 5.0; // cm
1752
1753     esdTrackCuts->SetRequireTPCRefit(kTRUE);
1754     esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
1755     esdTrackCuts->SetDCAToVertex2D(kTRUE);
1756     esdTrackCuts->SetMaxDCAToVertexXY(maxDCAtoVertexXY);
1757     esdTrackCuts->SetMaxDCAToVertexZ(maxDCAtoVertexZ);
1758
1759     // ITS
1760     esdTrackCuts->SetRequireITSRefit(kTRUE);
1761   }
1762
1763   // cuts for data without field
1764   if (!fieldOn)
1765   {
1766     cov5 = 1e10;
1767     tag += " without field";
1768   }
1769
1770   Printf("Created track cuts for: %s", tag.Data());
1771
1772   return esdTrackCuts;
1773 }