]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG0/CreateStandardCuts.C
Filling residuals (GlobalQA) only for tracks with kTPCin
[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 {
69b09e3b 28 cov1 = 9;
29 cov2 = 9;
30 cov3 = 1e10;
31 cov4 = 1e10;
32 cov5 = 1e10;
33
1c15d51a 34 tpcRefit = kFALSE;
65f11d60 35 sigmaToVertex = kFALSE;
69b09e3b 36
770a1f1d 37 tag = "TPC-only tracking";
38 }
39
40 // cuts for data without field
41 if (!fieldOn)
42 {
43 cov5 = 1e10;
44 tag += " without field";
45 }
65f11d60 46
770a1f1d 47 esdTrackCuts->SetMaxCovDiagonalElements(cov1, cov2, cov3, cov4, cov5);
48
65f11d60 49 esdTrackCuts->SetRequireSigmaToVertex(sigmaToVertex);
50
51 if (sigmaToVertex) {
69b09e3b 52 esdTrackCuts->SetMaxNsigmaToVertex(nSigma);
65f11d60 53 }
54 else{
69b09e3b 55
56 esdTrackCuts->SetMaxDCAToVertexZ(3.2);
57 esdTrackCuts->SetMaxDCAToVertexXY(2.4);
58 esdTrackCuts->SetDCAToVertex2D(kTRUE);
65f11d60 59 }
60
1c15d51a 61 esdTrackCuts->SetRequireTPCRefit(tpcRefit);
58c4f3fb 62 esdTrackCuts->SetAcceptKinkDaughters(kFALSE);
770a1f1d 63
64 esdTrackCuts->SetMinNClustersTPC(50);
65 esdTrackCuts->SetMaxChi2PerClusterTPC(3.5);
66
67 Printf("Created track cuts for: %s", tag.Data());
68
69 return esdTrackCuts;
70}