]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGJE/macros/CreateTrackCutsPWGJE.C
removed printout
[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)
8 // Numbering starts from 1000 for standard and additional cut numbers
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 }
46a305f3 177 if(stdCutMode == 1006) {
178
179 bStdCutsDefined = kTRUE;
180
181 // TPC
182 TFormula *f1NClustersTPCLinearPtDep = new TFormula("f1NClustersTPCLinearPtDep","70.+30./20.*x");
183 trackCuts->SetMinNClustersTPCPtDep(f1NClustersTPCLinearPtDep,20.);
184 trackCuts->SetMinNClustersTPC(70);
185 trackCuts->SetMaxChi2PerClusterTPC(4);
186 trackCuts->SetRequireTPCStandAlone(kTRUE); //cut on NClustersTPC and chi2TPC Iter1
187 trackCuts->SetAcceptKinkDaughters(kFALSE);
188 trackCuts->SetRequireTPCRefit(kTRUE);
189 trackCuts->SetMaxFractionSharedTPCClusters(0.4);
190 // ITS
191 trackCuts->SetRequireITSRefit(kTRUE);
192 //accept secondaries
193 trackCuts->SetMaxDCAToVertexXY(2.4);
194 trackCuts->SetMaxDCAToVertexZ(3.2);
195 trackCuts->SetDCAToVertex2D(kTRUE);
196 //reject fakes
197 trackCuts->SetMaxChi2PerClusterITS(36);
198 trackCuts->SetMaxChi2TPCConstrainedGlobal(36);
199
200 trackCuts->SetRequireSigmaToVertex(kFALSE);
201
202 trackCuts->SetEtaRange(-0.9,0.9);
203 trackCuts->SetPtRange(0.15, 1E+15.);
204
205 tag = "Global tracks jet analysis with ITSrefit and NclsIter1=PtDep, noSPD requirement, no upper pt cut, golden chi2";
206
207 }
dc6bbd38 208
209
d3a3f33d 210
e35f09aa 211 if(stdCutMode == 2000) {
212
213 bStdCutsDefined = kTRUE;
214
215 // TPC
216 trackCuts->SetMinNClustersTPC(90);
217 trackCuts->SetMaxChi2PerClusterTPC(4);
218 trackCuts->SetRequireTPCStandAlone(kTRUE); //cut on NClustersTPC and chi2TPC Iter1
219 trackCuts->SetAcceptKinkDaughters(kFALSE);
220 trackCuts->SetRequireTPCRefit(kTRUE);
221 trackCuts->SetMaxFractionSharedTPCClusters(0.4);
222 //accept secondaries
223 trackCuts->SetMaxDCAToVertexXY(2.4);
224 trackCuts->SetMaxDCAToVertexZ(3.2);
225 trackCuts->SetDCAToVertex2D(kTRUE);
226
227 trackCuts->SetRequireSigmaToVertex(kFALSE);
228
229 trackCuts->SetEtaRange(-0.9,0.9);
230 trackCuts->SetPtRange(0.15, 100.);
231
232
233 tag = "Global tracks jet analysis, loose cuts, NClsIter1=90, no ITS requirements";
234
235 }
236
237 if(stdCutMode == 2001) {
238
239 bStdCutsDefined = kTRUE;
240
241 trackCuts = AliESDtrackCuts::GetStandardTPCOnlyTrackCuts();
53ef50a2 242 trackCuts->SetRequireTPCRefit(kTRUE);
e35f09aa 243 trackCuts->SetMinNClustersTPC(70);
244
245 trackCuts->SetEtaRange(-0.9,0.9);
246 trackCuts->SetPtRange(0.15, 100.);
247
248
249 tag = "TPConly track cuts, loose cuts, NCls=70, no ITS requirements";
250
251 }
252
d3a3f33d 253 if(stdCutMode == 2002) {
254
255 bStdCutsDefined = kTRUE;
256
257 trackCuts = AliESDtrackCuts::GetStandardTPCOnlyTrackCuts();
68216590 258 trackCuts->SetRequireTPCRefit(kTRUE);
d3a3f33d 259 trackCuts->SetMinNClustersTPC(0);
260 trackCuts->SetMinNCrossedRowsTPC(120);
261 trackCuts->SetMinRatioCrossedRowsOverFindableClustersTPC(0.1);// essentially switches it off
262
263 trackCuts->SetEtaRange(-0.9,0.9);
264 trackCuts->SetPtRange(0.15, 100.);
265
266
267 tag = "TPConly track cuts, loose cuts, NCls=70, no ITS requirements";
268
269 }
270
e35f09aa 271 if(!bStdCutsDefined) {
272 printf("last 4 digits do not represent a predefined set of standard cuts. Returning 0\n");
273 return 0;
274
275 }
276
277
278 //_____________________________________________________________________
279 // ADDITIONAL CUTS
280
281 //Get additional cut mode: first 4 digits of cutMode
282 Int_t addCutMode = (int)((float)cutMode/(float)mod);
283
284 if(addCutMode == 1000) {
285
286 trackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD, AliESDtrackCuts::kAny);
287
288 tag += " + additonal: SPD any requirement";
289
290 }
291
292 if(addCutMode == 1001) {
293
294 trackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD, AliESDtrackCuts::kNone);
295
296 tag += " + additional: w/o hits in SPD";
297
298 }
299
300 if(addCutMode == 1002) {
301
302 trackCuts->SetMaxChi2PerClusterITS(1E10);
303
304 tag += " + additional: maxITSChi2=1e10";
305
306 }
307
308 if(addCutMode == 1003) {
309
310 trackCuts->SetMinNClustersTPC(0);
311 trackCuts->SetMinNCrossedRowsTPC(0);
312 trackCuts->SetMinRatioCrossedRowsOverFindableClustersTPC(0.);
313
314 tag += " + additional: minClusters=0 minCrossedRows=0 minCrossedRowsOverFindable=0";
315
316 }
317
d3a3f33d 318 if(addCutMode == 1004) {
319
320 trackCuts->SetRequireITSRefit(kFALSE);
321
322 tag += " + additional: ITSrefit=kFALSE";
323
324 }
325
e35f09aa 326 Printf("Created track cuts for: %s", tag.Data());
327
328 return trackCuts;
329
330}