Bug fix in the order of the Ds cuts (Sadhana, Francesco)
[u/mrichter/AliRoot.git] / PWG0 / CreateStandardCuts.C
CommitLineData
770a1f1d 1/* $Id: CreateCuts.C,v 1.5 2008/01/11 08:28:52 jgrosseo Exp $ */
2
18d21f09 3// this macro creates the track cuts used in this analysis
770a1f1d 4
a7f69e56 5AliESDtrackCuts* CreateTrackCuts(AliPWG0Helper::AnalysisMode analysisMode, Bool_t hists = kTRUE)
770a1f1d 6{
18d21f09 7 AliESDtrackCuts* esdTrackCuts = 0;
a7f69e56 8
18d21f09 9 // see https://twiki.cern.ch/twiki/bin/view/ALICE/SelectionOfPrimaryTracksForPp2009DataAnalysis
10
11 if (analysisMode & AliPWG0Helper::kTPC)
770a1f1d 12 {
18d21f09 13 esdTrackCuts = new AliESDtrackCuts("AliESDtrackCuts");
65f11d60 14
18d21f09 15 TString tag("TPC-only tracking");
770a1f1d 16
69b09e3b 17 esdTrackCuts->SetMaxDCAToVertexZ(3.2);
18 esdTrackCuts->SetMaxDCAToVertexXY(2.4);
19 esdTrackCuts->SetDCAToVertex2D(kTRUE);
18d21f09 20
21 esdTrackCuts->SetRequireTPCRefit(kTRUE);
22 esdTrackCuts->SetAcceptKinkDaughters(kFALSE);
23 esdTrackCuts->SetMinNClustersTPC(70);
24 esdTrackCuts->SetMaxChi2PerClusterTPC(4);
65f11d60 25 }
26
18d21f09 27 if (analysisMode & AliPWG0Helper::kTPCITS)
28 {
29 esdTrackCuts = AliESDtrackCuts::GetStandardITSTPCTrackCuts2009(kTRUE);
30
31 TString tag("Global tracking");
32 }
770a1f1d 33
18d21f09 34 if (hists)
35 esdTrackCuts->DefineHistograms(1);
36
37 // cuts for data without field
38 if (!(analysisMode & AliPWG0Helper::kFieldOn))
39 {
40 tag += " without field";
41 }
770a1f1d 42
43 Printf("Created track cuts for: %s", tag.Data());
44
45 return esdTrackCuts;
46}
a7f69e56 47