Coverity
[u/mrichter/AliRoot.git] / PWG3 / vertexingHF / ConfigVertexingHF_highmult.C
1 AliAnalysisVertexingHF* ConfigVertexingHF() {
2
3   printf("Call to AliAnalysisVertexingHF parameters setting :\n");
4   vHF = new AliAnalysisVertexingHF();
5  
6   //--- switch-off candidates finding (default: all on)
7   //vHF->SetD0toKpiOff();
8   vHF->SetJPSItoEleOff();
9   //vHF->Set3ProngOff();
10   vHF->SetLikeSignOn(); // like-sign pairs and triplets
11   vHF->Set4ProngOff();
12   //vHF->SetDstarOff();
13   vHF->SetFindVertexForDstar(kFALSE);
14   //--- secondary vertex with KF?
15   //vHF->SetSecVtxWithKF();
16   vHF->SetCascadesOff();
17   vHF->SetFindVertexForCascades(kFALSE);
18   vHF->SetMassCutBeforeVertexing(kTRUE); // PbPb
19
20   //--- set cuts for single-track selection  
21   //     displaced tracks
22   AliESDtrackCuts *esdTrackCuts = new AliESDtrackCuts("AliESDtrackCuts","default");
23   esdTrackCuts->SetRequireTPCRefit(kTRUE);
24   esdTrackCuts->SetMinNClustersTPC(70);
25   esdTrackCuts->SetRequireITSRefit(kTRUE);
26   //esdTrackCuts->SetMinNClustersITS(4);
27   esdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD,
28                                          AliESDtrackCuts::kAny);
29   // |d0|>75 micron for pt<2GeV, no cut above 2
30   esdTrackCuts->SetMinDCAToVertexXYPtDep("0.0075*TMath::Max(0.,(1-TMath::Floor(TMath::Abs(pt)/2.)))");
31   esdTrackCuts->SetMaxDCAToVertexXY(1.);  
32   esdTrackCuts->SetMaxDCAToVertexZ(1.);
33   esdTrackCuts->SetPtRange(0.7,1.e10);
34   esdTrackCuts->SetEtaRange(-0.8,+0.8);
35   AliAnalysisFilter *trkFilter = new AliAnalysisFilter("trackFilter");
36   trkFilter->AddCuts(esdTrackCuts);
37   vHF->SetTrackFilter(trkFilter);
38   //     D* soft pion tracks
39   AliESDtrackCuts *esdTrackCutsSoftPi = new AliESDtrackCuts("AliESDtrackCuts","default");
40   esdTrackCutsSoftPi->SetMinNClustersITS(4);
41   esdTrackCutsSoftPi->SetMaxDCAToVertexXY(1.);  
42   esdTrackCutsSoftPi->SetMaxDCAToVertexZ(1.);
43   esdTrackCutsSoftPi->SetPtRange(0.2,1.e10);
44   esdTrackCutsSoftPi->SetEtaRange(-0.8,+0.8);
45   AliAnalysisFilter *trkFilterSoftPi = new AliAnalysisFilter("trackFilterSoftPi");
46   trkFilterSoftPi->AddCuts(esdTrackCutsSoftPi);
47   vHF->SetTrackFilterSoftPi(trkFilterSoftPi);
48   //--- set cuts for candidates selection
49   Int_t nptbins=2; Float_t ptlimits[2]={0.,1000000.};
50   AliRDHFCutsD0toKpi *cutsD0toKpi = new AliRDHFCutsD0toKpi("CutsD0toKpi");
51   cutsD0toKpi->SetStandardCutsPbPb2010();
52   cutsD0toKpi->SetMinPtCandidate(0.);
53   cutsD0toKpi->SetUsePID(kFALSE);
54   cutsD0toKpi->SetUsePhysicsSelection(kFALSE);
55   cutsD0toKpi->SetMaxVtxZ(1.e6);
56   cutsD0toKpi->SetTriggerClass("");
57   Float_t cutsArrayD0toKpi[11]={0.2,999999.,1.1,0.,0.,999999.,999999.,0.,0.5,-1,0.};
58   cutsD0toKpi->SetPtBins(nptbins,ptlimits);
59   cutsD0toKpi->SetCuts(11,cutsArrayD0toKpi);
60   cutsD0toKpi->AddTrackCuts(esdTrackCuts);
61   vHF->SetCutsD0toKpi(cutsD0toKpi);
62   AliRDHFCutsJpsitoee *cutsJpsitoee = new AliRDHFCutsJpsitoee("CutsJpsitoee");
63   Float_t cutsArrayJpsitoee[9]={0.350,100000.,1.1,0.,0.,100000.,100000.,100000000.,-1.1};
64   cutsJpsitoee->SetCuts(9,cutsArrayJpsitoee);
65   cutsJpsitoee->AddTrackCuts(esdTrackCuts);
66   vHF->SetCutsJpsitoee(cutsJpsitoee);
67   AliRDHFCutsDplustoKpipi *cutsDplustoKpipi = new AliRDHFCutsDplustoKpipi("CutsDplustoKpipi");
68   cutsDplustoKpipi->SetStandardCutsPbPb2010();
69   cutsDplustoKpipi->SetUsePID(kFALSE);
70   Float_t cutsArrayDplustoKpipi[14]={0.2,0.3,0.3,0.,0.,0.01,0.06,0.05,1.,0.85,0.,10000000000.,0.,0.};
71   cutsDplustoKpipi->SetPtBins(nptbins,ptlimits);
72   cutsDplustoKpipi->SetCuts(14,cutsArrayDplustoKpipi);
73   cutsDplustoKpipi->AddTrackCuts(esdTrackCuts);
74   cutsDplustoKpipi->SetMinPtCandidate(3.);
75   vHF->SetCutsDplustoKpipi(cutsDplustoKpipi);
76   AliRDHFCutsDstoKKpi *cutsDstoKKpi = new AliRDHFCutsDstoKKpi("CutsDstoKKpi");
77   cutsDstoKKpi->SetStandardCutsPbPb2010();
78   cutsDstoKKpi->SetUsePID(kFALSE);
79   Float_t cutsArrayDstoKKpi[16]={0.2,0.4,0.4,0.,0.,0.005,0.045,0.,0.,0.9,0.,100000.,0.035,0.05,-1.,1.};
80   cutsDstoKKpi->SetPtBins(nptbins,ptlimits);
81   cutsDstoKKpi->SetCuts(16,cutsArrayDstoKKpi);
82   cutsDstoKKpi->AddTrackCuts(esdTrackCuts);
83   cutsDstoKKpi->SetMinPtCandidate(4.);
84   vHF->SetCutsDstoKKpi(cutsDstoKKpi);
85   AliRDHFCutsLctopKpi *cutsLctopKpi = new AliRDHFCutsLctopKpi("CutsLctopKpi");
86   cutsLctopKpi->SetStandardCutsPbPb2010();
87   cutsLctopKpi->SetUsePID(kFALSE);
88   Float_t cutsArrayLctopKpi[13]={0.13,0.9,1.,0.,0.,0.01,0.04,0.006,1.,0.5,0.,0.05,0.4};
89   cutsLctopKpi->SetPtBins(nptbins,ptlimits);
90   cutsLctopKpi->SetCuts(13,cutsArrayLctopKpi);
91   cutsLctopKpi->AddTrackCuts(esdTrackCuts);
92   cutsLctopKpi->SetMinPtCandidate(4.);
93   vHF->SetCutsLctopKpi(cutsLctopKpi);
94   AliRDHFCutsD0toKpipipi *cutsD0toKpipipi = new AliRDHFCutsD0toKpipipi("CutsD0toKpipipi");
95   Float_t cutsArrayD0toKpipipi[9]={0.2,0.04,0.00,0.01,0.02,0.8,0.,0.1,0.};
96   cutsD0toKpipipi->SetCuts(9,cutsArrayD0toKpipipi);
97   cutsD0toKpipipi->AddTrackCuts(esdTrackCuts);
98   vHF->SetCutsD0toKpipipi(cutsD0toKpipipi);
99   AliRDHFCutsDStartoKpipi *cutsDStartoKpipi = new AliRDHFCutsDStartoKpipi("CutsDStartoKpipi");
100   cutsDStartoKpipi->SetStandardCutsPbPb2010();
101   cutsDStartoKpipi->SetUsePID(kFALSE);
102
103
104  // D* pt dependent cuts ------------------------------------------
105
106   AliRDHFCutsDStartoKpipi *cutsDStartoKpipi = new AliRDHFCutsDStartoKpipi("CutsDStartoKpipi");
107   
108   const Int_t nvars=16;
109   const Int_t nptbins=2;
110   
111   Float_t* ptbins;
112   ptbins=new Float_t[nptbins+1];
113   ptbins[0]=0.;
114   ptbins[1]=4.;
115   ptbins[2]=999.;
116   
117   cutsDStartoKpipi->SetPtBins(nptbins+1,ptbins);
118   
119   Float_t** rdcutsvalmine;
120   rdcutsvalmine=new Float_t*[nvars];
121   for(Int_t iv=0;iv<nvars;iv++){
122     rdcutsvalmine[iv]=new Float_t[nptbins];
123   }
124   //0-4
125   rdcutsvalmine[0][0]=0.15;
126   rdcutsvalmine[1][0]=0.07;
127   rdcutsvalmine[2][0]=0.8;
128   rdcutsvalmine[3][0]=0.8;
129   rdcutsvalmine[4][0]=0.8;
130   rdcutsvalmine[5][0]=0.08;
131   rdcutsvalmine[6][0]=0.08;
132   rdcutsvalmine[7][0]=-0.00002;
133   rdcutsvalmine[8][0]=0.72;
134   rdcutsvalmine[9][0]=0.15;
135   rdcutsvalmine[10][0]=0.03;
136   rdcutsvalmine[11][0]=0.2;
137   rdcutsvalmine[12][0]=100.;
138   rdcutsvalmine[13][0]=0.5;
139   rdcutsvalmine[14][0]=-1.;
140   rdcutsvalmine[15][0]=0.;
141   //4-999
142   rdcutsvalmine[0][1]=0.24;
143   rdcutsvalmine[1][1]=0.07;
144   rdcutsvalmine[2][1]=0.8;
145   rdcutsvalmine[3][1]=0.8;
146   rdcutsvalmine[4][1]=0.8;
147   rdcutsvalmine[5][1]=0.1;
148   rdcutsvalmine[6][1]=0.1;
149   rdcutsvalmine[7][1]=0.00001;
150   rdcutsvalmine[8][1]=0.72;
151   rdcutsvalmine[9][1]=0.15;
152   rdcutsvalmine[10][1]=0.03;
153   rdcutsvalmine[11][1]=0.2;
154   rdcutsvalmine[12][1]=100.;
155   rdcutsvalmine[13][1]=0.5;
156   rdcutsvalmine[14][1]=-1.;
157   rdcutsvalmine[15][1]=0.;
158
159   cutsDStartoKpipi->SetCuts(nvars,nptbins,rdcutsvalmine);
160  
161   cutsDStartoKpipi->AddTrackCuts(esdTrackCuts);
162   cutsDStartoKpipi->AddTrackCutsSoftPi(esdTrackCutsSoftPi);
163   cutsDStartoKpipi->SetMinPtCandidate(3.);
164   vHF->SetCutsDStartoKpipi(cutsDStartoKpipi);
165
166   //--------------------------------------------------------
167
168   AliRDHFCutsLctoV0 *cutsLctoV0 = new AliRDHFCutsLctoV0("CutsLctoV0");
169   Float_t cutsArrayLctoV0[9]={4.0,4.0,2.0,2.0,0.0,0.0,0.0,1000.,1000.};
170   cutsLctoV0->SetCuts(9,cutsArrayLctoV0);
171   cutsLctoV0->AddTrackCuts(esdTrackCuts);
172   vHF->SetCutsLctoV0(cutsLctoV0);
173   // 
174   //--- set this if you want to reconstruct primary vertex candidate by
175   //    candidate using other tracks in the event (for pp, broad 
176   //    interaction region)
177   //vHF->SetRecoPrimVtxSkippingTrks();
178   //--- OR set this if you want to remove the candidate daughters from 
179   //    the primary vertex, without recostructing it from scratch
180   //vHF->SetRmTrksFromPrimVtx();
181
182   //--- check the settings
183   vHF->PrintStatus();
184   //--- verbose
185   //  AliLog::SetClassDebugLevel("AliAnalysisVertexingHF",2);
186
187  
188   return vHF;
189 }
190
191