AliPhysics  fde8a9f (fde8a9f)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliEmcalESDTrackCutsGenerator.cxx
Go to the documentation of this file.
1 /**************************************************************************
2  * Copyright(c) 1998-2016, ALICE Experiment at CERN, All rights reserved. *
3  * *
4  * Author: The ALICE Off-line Project. *
5  * Contributors are mentioned in the code where appropriate. *
6  * *
7  * Permission to use, copy, modify and distribute this software and its *
8  * documentation strictly for non-commercial purposes is hereby granted *
9  * without fee, provided that the above copyright notice appears in all *
10  * copies and that both the copyright notice and this permission notice *
11  * appear in the supporting documentation. The authors make no claims *
12  * about the suitability of this software for any purpose. It is *
13  * provided "as is" without express or implied warranty. *
14  **************************************************************************/
15 
16 #include <TString.h>
17 #include <TFormula.h>
18 
19 #include "AliEmcalTrackSelection.h"
21 
22 #include "AliESDtrackCuts.h"
23 
24 #include "TError.h"
25 
27 
39 {
40  //Get standard cuts: last 4 digits of cutMode
41  Int_t stdCutMode = cutMode % fgkAddCutFactor;
42 
43  //Get additional cut mode: first 4 digits of cutMode
44  Int_t addCutMode = (int)((float)cutMode/(float)fgkAddCutFactor);
45 
46  return CreateTrackCutsPWGJE(stdCutMode, addCutMode);
47 }
48 
58 AliESDtrackCuts* AliEmcalESDTrackCutsGenerator::CreateTrackCutsPWGJE(Int_t stdCutMode, Int_t addCutMode)
59 {
60  AliESDtrackCuts* trackCuts = 0;
61 
62  TString tag;
63 
64  tag = SetStandardCuts(trackCuts, stdCutMode);
65  tag += SetAdditionalCuts(trackCuts, addCutMode);
66 
67  ::Info("AliEmcalESDTrackCutsGenerator::CreateTrackCutsPWGJE", "Created track cuts for: %s", tag.Data());
68 
69  return trackCuts;
70 }
71 
82 AliESDtrackCuts* AliEmcalESDTrackCutsGenerator::CreateTrackCutsPWGJE(Int_t stdCutMode, Int_t addCutMode1, Int_t addCutMode2)
83 {
84  AliESDtrackCuts* trackCuts = 0;
85 
86  TString tag;
87 
88  tag = SetStandardCuts(trackCuts, stdCutMode);
89  tag += SetAdditionalCuts(trackCuts, addCutMode1);
90  tag += SetAdditionalCuts(trackCuts, addCutMode2);
91 
92  ::Info("AliEmcalESDTrackCutsGenerator::CreateTrackCutsPWGJE", "Created track cuts for: %s", tag.Data());
93 
94  return trackCuts;
95 }
96 
106 TString AliEmcalESDTrackCutsGenerator::SetStandardCuts(AliESDtrackCuts*& trackCuts, Int_t stdCutMode)
107 {
108  TString tag;
109 
110  if (trackCuts) {
111  delete trackCuts;
112  trackCuts = 0;
113  }
114 
115  switch (stdCutMode) {
116  case kRAA2011:
117  {
118  trackCuts = AliESDtrackCuts::GetStandardITSTPCTrackCuts2010(kTRUE,1);
119  trackCuts->SetMinNCrossedRowsTPC(120);
120  trackCuts->SetMinRatioCrossedRowsOverFindableClustersTPC(0.8);
121  trackCuts->SetMaxChi2PerClusterITS(36);
122  trackCuts->SetMaxFractionSharedTPCClusters(0.4);
123  trackCuts->SetMaxChi2TPCConstrainedGlobal(36);
124 
125  trackCuts->SetEtaRange(-0.9,0.9);
126  trackCuts->SetPtRange(0.15, 1e10);
127 
128  tag = "Global track RAA analysis QM2011 + Chi2ITS<36";
129 
130  break;
131  }
132 
134  {
135  trackCuts = new AliESDtrackCuts("AliESDtrackCuts");
136  // TPC
137  trackCuts->SetMinNClustersTPC(90);
138  trackCuts->SetMaxChi2PerClusterTPC(4);
139  trackCuts->SetRequireTPCStandAlone(kTRUE); //cut on NClustersTPC and chi2TPC Iter1
140  trackCuts->SetAcceptKinkDaughters(kFALSE);
141  trackCuts->SetRequireTPCRefit(kTRUE);
142  trackCuts->SetMaxFractionSharedTPCClusters(0.4);
143  // ITS
144  trackCuts->SetRequireITSRefit(kTRUE);
145  //accept secondaries
146  trackCuts->SetMaxDCAToVertexXY(2.4);
147  trackCuts->SetMaxDCAToVertexZ(3.2);
148  trackCuts->SetDCAToVertex2D(kTRUE);
149  //reject fakes
150  trackCuts->SetMaxChi2PerClusterITS(36);
151 
152  trackCuts->SetRequireSigmaToVertex(kFALSE);
153 
154  trackCuts->SetEtaRange(-0.9,0.9);
155  trackCuts->SetPtRange(0.15, 100.);
156 
157  tag = "Global tracks jet analysis with ITSrefit and NclsIter1=90, noSPD requirement";
158 
159  break;
160  }
161 
163  {
164  trackCuts = new AliESDtrackCuts("AliESDtrackCuts");
165  // TPC
166  trackCuts->SetMinNClustersTPC(80);
167  trackCuts->SetMaxChi2PerClusterTPC(4);
168  trackCuts->SetAcceptKinkDaughters(kFALSE);
169  trackCuts->SetRequireTPCRefit(kTRUE);
170  trackCuts->SetMaxFractionSharedTPCClusters(0.4);
171  // ITS
172  trackCuts->SetRequireITSRefit(kTRUE);
173  //accept secondaries
174  trackCuts->SetMaxDCAToVertexXY(2.4);
175  trackCuts->SetMaxDCAToVertexZ(3.2);
176  trackCuts->SetDCAToVertex2D(kTRUE);
177  //reject fakes
178  trackCuts->SetMaxChi2PerClusterITS(36);
179 
180  trackCuts->SetRequireSigmaToVertex(kFALSE);
181 
182  trackCuts->SetEtaRange(-0.9,0.9);
183  trackCuts->SetPtRange(0.15, 100.);
184 
185  tag = "Global tracks jet analysis with ITSrefit and Ncls=80, noSPD requirement";
186 
187  break;
188  }
189 
191  {
192  trackCuts = new AliESDtrackCuts("AliESDtrackCuts");
193  // tight global tracks
194  trackCuts = AliESDtrackCuts::GetStandardITSTPCTrackCuts2010(kFALSE,1);
195  trackCuts->SetMinNClustersTPC(0);
196  trackCuts->SetMinNCrossedRowsTPC(120);
197  trackCuts->SetMinRatioCrossedRowsOverFindableClustersTPC(0.1);// essentially switches it off
198  trackCuts->SetMaxDCAToVertexXY(2.4);
199  trackCuts->SetMaxDCAToVertexZ(3.2);
200  trackCuts->SetDCAToVertex2D(kTRUE);
201  trackCuts->SetMaxChi2PerClusterITS(36);
202  trackCuts->SetMaxFractionSharedTPCClusters(0.4);
203 
204  tag = "Global tracks ITSTPC2010 + NCrossedRows + loose ITS";
205 
206  break;
207  }
208 
210  {
211  trackCuts = new AliESDtrackCuts("AliESDtrackCuts");
212  // TPC
213  trackCuts->SetMinNClustersTPC(70);
214  trackCuts->SetMaxChi2PerClusterTPC(4);
215  trackCuts->SetRequireTPCStandAlone(kTRUE); //cut on NClustersTPC and chi2TPC Iter1
216  trackCuts->SetAcceptKinkDaughters(kFALSE);
217  trackCuts->SetRequireTPCRefit(kTRUE);
218  trackCuts->SetMaxFractionSharedTPCClusters(0.4);
219  // ITS
220  trackCuts->SetRequireITSRefit(kTRUE);
221  //accept secondaries
222  trackCuts->SetMaxDCAToVertexXY(2.4);
223  trackCuts->SetMaxDCAToVertexZ(3.2);
224  trackCuts->SetDCAToVertex2D(kTRUE);
225  //reject fakes
226  trackCuts->SetMaxChi2PerClusterITS(36);
227 
228  trackCuts->SetRequireSigmaToVertex(kFALSE);
229 
230  trackCuts->SetEtaRange(-0.9,0.9);
231  trackCuts->SetPtRange(0.15, 100.);
232 
233  tag = "Global tracks jet analysis with ITSrefit and NclsIter1=70, noSPD requirement";
234 
235  break;
236  }
237 
239  {
240  trackCuts = new AliESDtrackCuts("AliESDtrackCuts");
241  // TPC
242  trackCuts->SetMinNClustersTPC(70);
243  trackCuts->SetMaxChi2PerClusterTPC(4);
244  trackCuts->SetRequireTPCStandAlone(kTRUE); //cut on NClustersTPC and chi2TPC Iter1
245  trackCuts->SetAcceptKinkDaughters(kFALSE);
246  trackCuts->SetRequireTPCRefit(kTRUE);
247  trackCuts->SetMaxFractionSharedTPCClusters(0.4);
248  // ITS
249  trackCuts->SetRequireITSRefit(kTRUE);
250  //accept secondaries
251  trackCuts->SetMaxDCAToVertexXY(2.4);
252  trackCuts->SetMaxDCAToVertexZ(3.2);
253  trackCuts->SetDCAToVertex2D(kTRUE);
254  //reject fakes
255  trackCuts->SetMaxChi2PerClusterITS(36);
256 
257  trackCuts->SetRequireSigmaToVertex(kFALSE);
258 
259  trackCuts->SetEtaRange(-0.9,0.9);
260  trackCuts->SetPtRange(0.15, 1E+15);
261 
262  tag = "Global tracks jet analysis with ITSrefit and NclsIter1=70, noSPD requirement, no upper pt cut";
263 
264  break;
265  }
266 
268  {
269  trackCuts = new AliESDtrackCuts("AliESDtrackCuts");
270  // TPC
271  TFormula *f1NClustersTPCLinearPtDep = new TFormula("f1NClustersTPCLinearPtDep","70.+30./20.*x");
272  trackCuts->SetMinNClustersTPCPtDep(f1NClustersTPCLinearPtDep,20.);
273  trackCuts->SetMinNClustersTPC(70);
274  trackCuts->SetMaxChi2PerClusterTPC(4);
275  trackCuts->SetRequireTPCStandAlone(kTRUE); //cut on NClustersTPC and chi2TPC Iter1
276  trackCuts->SetAcceptKinkDaughters(kFALSE);
277  trackCuts->SetRequireTPCRefit(kTRUE);
278  trackCuts->SetMaxFractionSharedTPCClusters(0.4);
279  // ITS
280  trackCuts->SetRequireITSRefit(kTRUE);
281  //accept secondaries
282  trackCuts->SetMaxDCAToVertexXY(2.4);
283  trackCuts->SetMaxDCAToVertexZ(3.2);
284  trackCuts->SetDCAToVertex2D(kTRUE);
285  //reject fakes
286  trackCuts->SetMaxChi2PerClusterITS(36);
287  trackCuts->SetMaxChi2TPCConstrainedGlobal(36);
288 
289  trackCuts->SetRequireSigmaToVertex(kFALSE);
290 
291  trackCuts->SetEtaRange(-0.9,0.9);
292  trackCuts->SetPtRange(0.15, 1E+15);
293 
294  tag = "Global tracks jet analysis with ITSrefit and NclsIter1=PtDep, noSPD requirement, no upper pt cut, golden chi2";
295 
296  break;
297  }
298 
299  case kGlobalTracks2011:
300  {
301  trackCuts = AliESDtrackCuts::GetStandardITSTPCTrackCuts2011(kFALSE,1);
302  //accept secondaries
303  trackCuts->SetMaxDCAToVertexXY(2.4);
304  trackCuts->SetMaxDCAToVertexZ(3.2);
305  trackCuts->SetDCAToVertex2D(kTRUE);
306 
307  trackCuts->SetMaxChi2TPCConstrainedGlobal(36);
308 
309  trackCuts->SetEtaRange(-0.9,0.9);
310  trackCuts->SetPtRange(0.15, 1E+15);
311 
312  tag = "Global tracks with AliESDtrackCuts::GetStandardITSTPCTrackCuts2011(kFALSE)";
313 
314  break;
315  }
316 
318  {
319  trackCuts = AliESDtrackCuts::GetStandardITSTPCTrackCuts2011(kFALSE,1);
320  //accept secondaries
321  trackCuts->SetMaxDCAToVertexXY(2.4);
322  trackCuts->SetMaxDCAToVertexZ(3.2);
323  trackCuts->SetDCAToVertex2D(kTRUE);
324 
325  trackCuts->SetMaxChi2TPCConstrainedGlobal(36);
326  trackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD, AliESDtrackCuts::kNone);
327 
328  trackCuts->SetMaxFractionSharedTPCClusters(0.4);
329 
330  tag = "Global tracks 2011 with AliESDtrackCuts::GetStandardITSTPCTrackCuts2011(kFALSE) and no SPD requirement";
331 
332  break;
333  }
334 
336  {
337  trackCuts = new AliESDtrackCuts("AliESDtrackCuts");
338  // TPC
339  trackCuts->SetMinNClustersTPC(90);
340  trackCuts->SetMaxChi2PerClusterTPC(4);
341  trackCuts->SetRequireTPCStandAlone(kTRUE); //cut on NClustersTPC and chi2TPC Iter1
342  trackCuts->SetAcceptKinkDaughters(kFALSE);
343  trackCuts->SetRequireTPCRefit(kTRUE);
344  trackCuts->SetMaxFractionSharedTPCClusters(0.4);
345  //accept secondaries
346  trackCuts->SetMaxDCAToVertexXY(2.4);
347  trackCuts->SetMaxDCAToVertexZ(3.2);
348  trackCuts->SetDCAToVertex2D(kTRUE);
349 
350  trackCuts->SetRequireSigmaToVertex(kFALSE);
351 
352  trackCuts->SetEtaRange(-0.9,0.9);
353  trackCuts->SetPtRange(0.15, 100.);
354 
355  tag = "Global tracks jet analysis, loose cuts, NClsIter1=90, no ITS requirements";
356 
357  break;
358  }
359 
361  {
362  trackCuts = AliESDtrackCuts::GetStandardTPCOnlyTrackCuts();
363  // trackCuts->SetRequireTPCRefit(kTRUE);
364  trackCuts->SetMinNClustersTPC(70);
365 
366  trackCuts->SetEtaRange(-0.9,0.9);
367  trackCuts->SetPtRange(0.15, 100.);
368 
369 
370  tag = "TPConly track cuts, loose cuts, NCls=70, no ITS requirements";
371 
372  break;
373  }
374 
376  {
377  trackCuts = AliESDtrackCuts::GetStandardTPCOnlyTrackCuts();
378  trackCuts->SetMinNClustersTPC(0);
379  trackCuts->SetMinNCrossedRowsTPC(120);
380  trackCuts->SetMinRatioCrossedRowsOverFindableClustersTPC(0.1);// essentially switches it off
381 
382  trackCuts->SetEtaRange(-0.9,0.9);
383  trackCuts->SetPtRange(0.15, 100.);
384 
385  tag = "TPConly track cuts, loose cuts, NCrossRows=120, no ITS requirements";
386 
387  break;
388  }
389 
390  default:
391  {
392  Printf("AliEmcalESDTrackCutsGenerator: standard cuts not recognized.");
393  break;
394  }
395  }
396 
397  return tag;
398 }
399 
409 TString AliEmcalESDTrackCutsGenerator::SetAdditionalCuts(AliESDtrackCuts*& trackCuts, Int_t addCutMode)
410 {
411  TString tag;
412 
413  switch (addCutMode) {
414  case kSPDAny:
415  {
416  trackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD, AliESDtrackCuts::kAny);
417 
418  tag += " + additonal: SPD any requirement";
419 
420  break;
421  }
422 
423  case kSPDNone:
424  {
425  trackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD, AliESDtrackCuts::kNone);
426 
427  tag += " + additional: w/o hits in SPD";
428 
429  break;
430  }
431 
432  case kNoITSChi2:
433  {
434  trackCuts->SetMaxChi2PerClusterITS(1E10);
435 
436  tag += " + additional: maxITSChi2=1e10";
437 
438  break;
439  }
440 
441  case kNoMinTPCCls:
442  {
443  trackCuts->SetMinNClustersTPC(0);
444  trackCuts->SetMinNCrossedRowsTPC(0);
445  trackCuts->SetMinRatioCrossedRowsOverFindableClustersTPC(0.);
446 
447  tag += " + additional: minClusters=0 minCrossedRows=0 minCrossedRowsOverFindable=0";
448 
449  break;
450  }
451 
452  case kNoITSRefit:
453  {
454  trackCuts->SetRequireITSRefit(kFALSE);
455 
456  tag += " + additional: ITSrefit=kFALSE";
457 
458  break;
459  }
460 
461  case kSPDOff:
462  {
463  trackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD, AliESDtrackCuts::kOff);
464 
465  tag += " + additional: no SPD requirement (kOff)";
466 
467  break;
468  }
469  }
470 
471  return tag;
472 }
473 
482 {
483  EDataSet_t dataSet = kUnknown;
484 
485  TString strPeriod(period);
486  strPeriod.ToLower();
487 
488  if (strPeriod == "lhc10h") {
489  dataSet = kLHC10h;
490  } else if (strPeriod == "lhc11a" || strPeriod == "lhc12a15a") {
491  dataSet = kLHC11a;
492  } else if (strPeriod == "lhc10b" || strPeriod == "lhc10c" ||
493  strPeriod == "lhc10d" || strPeriod == "lhc10e") {
494  dataSet = kLHC10bcde;
495  } else if (strPeriod == "lhc11a1a" || strPeriod == "lhc11a1b" ||
496  strPeriod == "lhc11a1c" || strPeriod == "lhc11a1d" ||
497  strPeriod == "lhc11a1e" || strPeriod == "lhc11a1f" ||
498  strPeriod == "lhc11a1g" || strPeriod == "lhc11a1h" ||
499  strPeriod == "lhc11a1i" || strPeriod == "lhc11a1j") {
500  dataSet = kLHC11a;
501  } else if (strPeriod == "lhc11c") {
502  dataSet = kLHC11c;
503  } else if (strPeriod == "lhc11d") {
504  dataSet = kLHC11d;
505  } else if (strPeriod == "lhc11h" || strPeriod == "lhc12a15e") {
506  dataSet = kLHC11h;
507  } else if (strPeriod == "lhc12g") {
508  dataSet = kLHC11h;
509  } else if (strPeriod == "lhc12") {
510  dataSet = kLHC11h;
511  } else if (strPeriod == "lhc13b") {
512  dataSet = kLHC11h;
513  } else if (strPeriod == "lhc13c") {
514  dataSet = kLHC11h;
515  } else if (strPeriod == "lhc13d") {
516  dataSet = kLHC11h;
517  } else if (strPeriod == "lhc13e") {
518  dataSet = kLHC11h;
519  } else if (strPeriod == "lhc13f") {
520  dataSet = kLHC11h;
521  } else if (strPeriod == "lhc13g") {
522  dataSet = kLHC11h;
523  } else if (strPeriod == "lhc12a15f") {
524  dataSet = kLHC11h;
525  } else if (strPeriod == "lhc13b4") {
526  dataSet = kLHC11h;
527  } else if (strPeriod == "lhc12a15g") {
528  dataSet = kLHC11d;
529  } else if (strPeriod == "lhc12f2a") {
530  dataSet = kLHC11d;
531  } else if (strPeriod.BeginsWith("lhc12a17")) {
532  dataSet = kLHC11h;
533  } else if (strPeriod == "lhc14a1") {
534  dataSet = kLHC11h;
535  } else if (strPeriod.BeginsWith("lhc15g6")) {
536  dataSet = kLHC10bcde;
537  } else {
538  ::Error("AliEmcalESDTrackCutsGenerator::SteerDataSetFromString", "Dataset %s not recognized!", period.Data());
539  }
540 
541  return dataSet;
542 }
543 
551 {
552  switch (period) {
553  case kLHC11c:
554  case kLHC11d:
555  case kLHC11h:
556  {
557  AliESDtrackCuts *cutsp = CreateTrackCutsPWGJE(kGlobalTracks2011NoSPD, kSPDAny);
558  trkSel->AddTrackCuts(cutsp);
559  AliESDtrackCuts *hybsp = CreateTrackCutsPWGJE(kGlobalTracks2011NoSPD, kSPDOff);
560  trkSel->AddTrackCuts(hybsp);
561 
562  break;
563  }
564  case kLHC10h:
565  case kLHC11a:
566  case kLHC10bcde:
567  {
568  /* hybrid track cuts*/
570  trkSel->AddTrackCuts(cutsp);
572  trkSel->AddTrackCuts(hybsp);
573  break;
574  }
575  default:
576  {
577  ::Error("AliEmcalESDTrackCutsGenerator::AddHybridTrackCuts", "Hybrid track cuts not available for dataset %d", period);
578  break;
579  }
580  }
581 }
582 
590 {
591  switch (period) {
592  case kLHC11c:
593  case kLHC11d:
594  case kLHC11h:
595  {
596  AliESDtrackCuts *cutsp = CreateTrackCutsPWGJE(kTPCOnlyTracksNCls70);
597  trkSel->AddTrackCuts(cutsp);
598  break;
599  }
600  default:
601  {
602  Printf("AliEmcalESDTrackCutsGenerator::AddTPCOnlyTrackCuts: TPC only track cuts not available for dataset %d", period);
603  break;
604  }
605  }
606 }
Interface for virtual track selection.
static EDataSet_t SteerDataSetFromString(TString period)
static void AddHybridTrackCuts(AliEmcalTrackSelection *trkSel, TString period)
static TString SetStandardCuts(AliESDtrackCuts *&trackCuts, Int_t stdCutMode)
int Int_t
Definition: External.C:63
static TString SetAdditionalCuts(AliESDtrackCuts *&trackCuts, Int_t addCutMode)
Declaration of class AliEmcalESDTrackCutsGenerator.
static AliESDtrackCuts * CreateTrackCutsPWGJE(Int_t cutMode)
void AddTrackCuts(AliVCuts *cuts)
static void AddTPCOnlyTrackCuts(AliEmcalTrackSelection *trkSel, TString period)