]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG0/CreateStandardCuts.C
A modification was recently introduced in ANALYSIS trunk that automatically creates...
[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
3// this macro creates the track and event cuts used in this analysis
4
5AliESDtrackCuts* CreateTrackCuts(AliPWG0Helper::AnalysisMode analysisMode, Bool_t fieldOn = kTRUE, Bool_t hists = kTRUE)
6{
7 AliESDtrackCuts* esdTrackCuts = new AliESDtrackCuts("AliESDtrackCuts");
8
9 if (hists)
10 esdTrackCuts->DefineHistograms(1);
11
12 // default cuts for ITS+TPC
13 Double_t cov1 = 2;
14 Double_t cov2 = 2;
15 Double_t cov3 = 0.5;
16 Double_t cov4 = 0.5;
17 Double_t cov5 = 2;
1c15d51a 18 Double_t nSigma = 4;
19
20 Bool_t tpcRefit = kTRUE;
65f11d60 21 Bool_t sigmaToVertex = kTRUE;
770a1f1d 22
23 TString tag("Global tracking");
24
25 // TPC-only cuts
1c15d51a 26 if (analysisMode == AliPWG0Helper::kTPC)
770a1f1d 27 {
1c15d51a 28 tpcRefit = kFALSE;
65f11d60 29 sigmaToVertex = kFALSE;
30
770a1f1d 31 tag = "TPC-only tracking";
32 }
33
34 // cuts for data without field
35 if (!fieldOn)
36 {
37 cov5 = 1e10;
38 tag += " without field";
39 }
65f11d60 40
770a1f1d 41 esdTrackCuts->SetMaxCovDiagonalElements(cov1, cov2, cov3, cov4, cov5);
42
65f11d60 43 esdTrackCuts->SetRequireSigmaToVertex(sigmaToVertex);
44
45 if (sigmaToVertex) {
46 esdTrackCuts->SetMinNsigmaToVertex(nSigma);
47 }
48 else{
49 // esdTrackCuts->SetDCAToVertex(3.0);
50 esdTrackCuts->SetDCAToVertexZ(3.0);
51 esdTrackCuts->SetDCAToVertexXY(3.0);
52 }
53
1c15d51a 54 esdTrackCuts->SetRequireTPCRefit(tpcRefit);
770a1f1d 55 esdTrackCuts->SetAcceptKingDaughters(kFALSE);
56
57 esdTrackCuts->SetMinNClustersTPC(50);
58 esdTrackCuts->SetMaxChi2PerClusterTPC(3.5);
59
60 Printf("Created track cuts for: %s", tag.Data());
61
62 return esdTrackCuts;
63}