AliPhysics  97344c9 (97344c9)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
makeTFile4CutsD0toKpi.C
Go to the documentation of this file.
1 #include <Riostream.h>
2 #include <TFile.h>
3 #include <AliRDHFCutsD0toKpi.h>
4 #include <TClonesArray.h>
5 #include <TParameter.h>
6 
7 
8 //Use:
9 //Set hard coded commentet with //set this!!
10 // root[] .L makeInputD0tasks.C++
11 // root[] makeInputAliAnalysisTaskSED0Mass()
12 // root[] makeInputAliAnalysisTaskSESignificanceMaximization()
13 //similar macros for the other D mesons
14 
15 //Author: Chiara Bianchin, cbianchi@pd.infn.it
16 
17 
18 //macro to make a .root file which contains an AliRDHFCutsD0toKpi for AliAnalysisTaskSED0Mass task
19 void ModifyFromStandardCuts(Int_t system=1 /*0=pp, 1=PbPb, 2=pp 2.76TeV*/){
20  AliRDHFCutsD0toKpi* RDHFD0toKpi=new AliRDHFCutsD0toKpi();
21  TString info="",cent="";
22 
23  if(system==0) {
24  RDHFD0toKpi->SetStandardCutsPP2010();
25  info+="ppStd";
26  }
27  if(system==1) {
28  RDHFD0toKpi->SetStandardCutsPbPb2010();
29  //Change centrality if needed
30  /*
31  Float_t minc=20,maxc=80;
32  RDHFD0toKpi->SetMinCentrality(minc);
33  RDHFD0toKpi->SetMaxCentrality(maxc);
34  */
35  RDHFD0toKpi->SetUseCentrality(AliRDHFCuts::kCentOff); //kCentOff,kCentV0M,kCentTRK,kCentTKL,kCentCL1,kCentInvalid
36 
37  cent=Form("%.0f%.0f",RDHFD0toKpi->GetMinCentrality(),RDHFD0toKpi->GetMaxCentrality());
38  info+="PbPbStd";
39 
40  }
41  if(system==2) {
42  RDHFD0toKpi->SetStandardCutsPP2011_276TeV();
43  info+="pp276Std";
44  }
45 
46  RDHFD0toKpi->SetName("D0toKpiCuts");
47  RDHFD0toKpi->SetTitle("Cuts for D0 analysis");
48 
49 
50  //here add what you need! Find examples below
51 
52  //Trigger mask
53  /*
54  RDHFD0toKpi->SetTriggerMask(0);
55  RDHFD0toKpi->SetTriggerMask(AliVEvent::kEMC1 | AliVEvent::kEMC7);
56  RDHFD0toKpi->SetTriggerClass("CEMC");
57 
58  info+="EMCTr";
59  */
60 
61  //Event selection
62  RDHFD0toKpi->SetUsePhysicsSelection(kFALSE);
63  info+="noPhysSel";
64 
65  cout<<"This is the odject I'm going to save:"<<endl;
66  cout<<info<<endl;
67  RDHFD0toKpi->PrintAll();
68  TFile* fout=new TFile(Form("D0toKpiCuts%s%sRecVtx%sPileupRej%s.root", RDHFD0toKpi->GetUseCentrality()==0 ? "" : cent.Data(),RDHFD0toKpi->GetIsPrimaryWithoutDaughters() ? "" : "No",RDHFD0toKpi->GetOptPileUp() ? "" : "No",info.Data()),"recreate"); //set this!!
69 
70  fout->cd();
71  RDHFD0toKpi->Write();
72  fout->Close();
73 
74 }
75 
77 
78  AliRDHFCutsD0toKpi* RDHFD0toKpi=new AliRDHFCutsD0toKpi();
79  RDHFD0toKpi->SetName("D0toKpiCuts");
80  RDHFD0toKpi->SetTitle("Cuts for D0 analysis");
81 
82  AliESDtrackCuts* esdTrackCuts=new AliESDtrackCuts();
83  esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
84  //default
85  esdTrackCuts->SetRequireTPCRefit(kTRUE);
86  esdTrackCuts->SetRequireITSRefit(kTRUE);
87  esdTrackCuts->SetEtaRange(-0.8,0.8);
88  //esdTrackCuts->SetMinNClustersITS(4); // default is 5
89  //esdTrackCuts->SetMinNClustersTPC(120);
90  esdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD,
91  AliESDtrackCuts::kAny);
92  // default is kBoth, otherwise kAny
93  esdTrackCuts->SetMinDCAToVertexXY(0.);
94  esdTrackCuts->SetPtRange(0.8,1.e10);
95 
96 
97  RDHFD0toKpi->AddTrackCuts(esdTrackCuts);
98 
99  const Int_t nvars=11;
100 
101  const Int_t nptbins=13;
102  Float_t* ptbins;
103  ptbins=new Float_t[nptbins+1];
104  ptbins[0]=0.;
105  ptbins[1]=0.5;
106  ptbins[2]=1.;
107  ptbins[3]=2.;
108  ptbins[4]=3.;
109  ptbins[5]=4.;
110  ptbins[6]=5.;
111  ptbins[7]=6.;
112  ptbins[8]=8.;
113  ptbins[9]=12.;
114  ptbins[10]=16.;
115  ptbins[11]=20.;
116  ptbins[12]=24.;
117  ptbins[13]=9999.;
118 
119  RDHFD0toKpi->SetPtBins(nptbins+1,ptbins);
120 
121 
122  Float_t** rdcutsvalmine;
123  rdcutsvalmine=new Float_t*[nvars];
124  for(Int_t iv=0;iv<nvars;iv++){
125  rdcutsvalmine[iv]=new Float_t[nptbins];
126  }
127 
128  //setting my cut values
129  //cuts order
130  // printf(" |M-MD0| [GeV] < %f\n",fD0toKpiCuts[0]);
131  // printf(" dca [cm] < %f\n",fD0toKpiCuts[1]);
132  // printf(" cosThetaStar < %f\n",fD0toKpiCuts[2]);
133  // printf(" pTK [GeV/c] > %f\n",fD0toKpiCuts[3]);
134  // printf(" pTpi [GeV/c] > %f\n",fD0toKpiCuts[4]);
135  // printf(" |d0K| [cm] < %f\n",fD0toKpiCuts[5]);
136  // printf(" |d0pi| [cm] < %f\n",fD0toKpiCuts[6]);
137  // printf(" d0d0 [cm^2] < %f\n",fD0toKpiCuts[7]);
138  // printf(" cosThetaPoint > %f\n",fD0toKpiCuts[8]);
139  // printf(" |cosThetaPointXY| < %f\n",fD0toKpiCuts[9]);
140  // printf(" NormDecayLenghtXY > %f\n",fD0toKpiCuts[10]);
141 
142 
143  Double_t arrcuts[11]={0.3,0.03,0.8,0.8,0.8,0.1,0.1,-0.0004,0.9,0.998,5.}; //put the last 2 values at 0. for pp
144 
145  //setting my cut values
146  //0-0.5 GeV
147  for(Int_t ic=0;ic<nvars;ic++) rdcutsvalmine[ic][0]=arrcuts[ic];
148 
149  //0.5-1 GeV/c
150  for(Int_t ic=0;ic<nvars;ic++) rdcutsvalmine[ic][1]=arrcuts[ic];
151 
152  //1-2 GeV
153  arrcuts[1]=0.025; arrcuts[7]=-0.0003;
154  for(Int_t ic=0;ic<nvars;ic++) rdcutsvalmine[ic][2]=arrcuts[ic];
155 
156  //2-3 GeV
157  arrcuts[7]=-0.00026;
158  arrcuts[9]=0.998;
159  for(Int_t ic=0;ic<nvars;ic++) rdcutsvalmine[ic][3]=arrcuts[ic];
160 
161  //3-4 GeV
162  arrcuts[7]=-0.00015; arrcuts[8]=0.85;
163  for(Int_t ic=0;ic<nvars;ic++) rdcutsvalmine[ic][4]=arrcuts[ic];
164 
165  //4-5 GeV
166  for(Int_t ic=0;ic<nvars;ic++) rdcutsvalmine[ic][5]=arrcuts[ic];
167 
168  //5-6 GeV
169  arrcuts[7]=-0.0001; arrcuts[8]=0.85;
170  for(Int_t ic=0;ic<nvars;ic++) rdcutsvalmine[ic][6]=arrcuts[ic];
171 
172  //6-8 GeV
173  arrcuts[2]=1.;
174  for(Int_t ic=0;ic<nvars;ic++) rdcutsvalmine[ic][7]=arrcuts[ic];
175 
176  //8-12 GeV
177  arrcuts[8]=0.8;
178  for(Int_t ic=0;ic<nvars;ic++) rdcutsvalmine[ic][8]=arrcuts[ic];
179 
180  //12-16 GeV
181  arrcuts[1]=0.03;
182  for(Int_t ic=0;ic<nvars;ic++) rdcutsvalmine[ic][9]=arrcuts[ic];
183 
184  //16-20 GeV
185  arrcuts[1]=0.035;
186  for(Int_t ic=0;ic<nvars;ic++) rdcutsvalmine[ic][10]=arrcuts[ic];
187 
188  //20-24 GeV
189  for(Int_t ic=0;ic<nvars;ic++) rdcutsvalmine[ic][11]=arrcuts[ic];
190 
191  //24-9999 GeV
192  for(Int_t ic=0;ic<nvars;ic++) rdcutsvalmine[ic][12]=arrcuts[ic];
193 
194  RDHFD0toKpi->SetCuts(nvars,nptbins,rdcutsvalmine);
195 
196  Bool_t pidflag=kTRUE;
197  RDHFD0toKpi->SetUsePID(pidflag);
198  if(pidflag) cout<<"PID is used"<<endl;
199  else cout<<"PID is not used"<<endl;
200 
201  //pid settings
202  AliAODPidHF* pidObj=new AliAODPidHF();
203  //pidObj->SetName("pid4D0");
204  Int_t mode=1;
205  const Int_t nlims=2;
206  Double_t plims[nlims]={0.6,0.8}; //TPC limits in momentum [GeV/c]
207  Bool_t compat=kTRUE; //effective only for this mode
208  Bool_t asym=kTRUE;
209  Double_t sigmas[5]={2.,1.,0.,3.,0.}; //to be checked and to be modified with new implementation of setters by Rossella
210  pidObj->SetAsym(asym);// if you want to use the asymmetric bands in TPC
211  pidObj->SetMatch(mode);
212  pidObj->SetPLimit(plims,nlims);
213  pidObj->SetSigma(sigmas);
214  pidObj->SetCompat(compat);
215  pidObj->SetTPC(kTRUE);
216  pidObj->SetTOF(kTRUE);
217  RDHFD0toKpi->SetPidHF(pidObj);
218 
219  RDHFD0toKpi->SetUseDefaultPID(kFALSE); //to use the AliAODPidHF
220 
221  //activate pileup rejection (for pp)
222  //RDHFD0toKpi->SetOptPileup(AliRDHFCuts::kRejectPileupEvent);
223 
224  //Do not recalculate the vertex
225  RDHFD0toKpi->SetRemoveDaughtersFromPrim(kFALSE); //activate for pp
226 
227  TString cent="";
228  //centrality selection (Pb-Pb)
229  Float_t minc=20,maxc=80;
230  RDHFD0toKpi->SetMinCentrality(minc);
231  RDHFD0toKpi->SetMaxCentrality(maxc);
232  cent=Form("%.0f%.0f",minc,maxc);
233  RDHFD0toKpi->SetUseCentrality(AliRDHFCuts::kCentV0M); //kCentOff,kCentV0M,kCentTRK,kCentTKL,kCentCL1,kCentInvalid
234 
235  //temporary
236  //RDHFD0toKpi->SetFixRefs();
237 
238  cout<<"This is the odject I'm going to save:"<<endl;
239  RDHFD0toKpi->PrintAll();
240  TFile* fout=new TFile(Form("D0toKpiCuts%s%s%sRecVtx%sPileupRej.root", RDHFD0toKpi->GetUseCentrality()==0 ? "pp" : "PbPb",cent.Data(),RDHFD0toKpi->GetIsPrimaryWithoutDaughters() ? "" : "No",RDHFD0toKpi->GetOptPileUp() ? "" : "No"),"recreate"); //set this!!
241 
242  fout->cd();
243  RDHFD0toKpi->Write();
244  fout->Close();
245 
246 }
247 
248 //macro to make a .root file (for significance maximization) which contains an AliRDHFCutsD0toKpi with loose set of cuts and TParameter with the tighest value of these cuts
249 
251 
252  AliRDHFCutsD0toKpi* RDHFD0toKpi=new AliRDHFCutsD0toKpi();
253  RDHFD0toKpi->SetName("loosercuts");
254  RDHFD0toKpi->SetTitle("Cuts for significance maximization");
255 
256  AliESDtrackCuts* esdTrackCuts=new AliESDtrackCuts();
257  esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
258  //default
259  esdTrackCuts->SetRequireTPCRefit(kTRUE);
260  esdTrackCuts->SetRequireITSRefit(kTRUE);
261  //esdTrackCuts->SetMinNClustersITS(4);
262  //esdTrackCuts->SetMinNClustersTPC(120);
263 
264  esdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD,AliESDtrackCuts::kAny);
265  esdTrackCuts->SetMinDCAToVertexXY(0.);
266  esdTrackCuts->SetEtaRange(-0.8,0.8);
267  esdTrackCuts->SetPtRange(0.8,1.e10);
268 
269  RDHFD0toKpi->AddTrackCuts(esdTrackCuts);
270 
271  const Int_t nvars=11;
272 
273  const Int_t nptbins=14; //change this when adding pt bins!
274  Float_t ptbins[nptbins+1];
275  ptbins[0]=0.;
276  ptbins[1]=0.5;
277  ptbins[2]=1.;
278  ptbins[3]=2.;
279  ptbins[4]=3.;
280  ptbins[5]=4.;
281  ptbins[6]=5.;
282  ptbins[7]=6.;
283  ptbins[8]=8.;
284  ptbins[9]=10.;
285  ptbins[10]=12.;
286  ptbins[11]=16.;
287  ptbins[12]=20.;
288  ptbins[13]=24.;
289  ptbins[14]=9999.;
290 
291  RDHFD0toKpi->SetPtBins(nptbins+1,ptbins);
292 
293  Float_t** rdcutsvalmine;
294  rdcutsvalmine=new Float_t*[nvars];
295  for(Int_t iv=0;iv<nvars;iv++){
296  rdcutsvalmine[iv]=new Float_t[nptbins];
297  }
298 
299  //setting my cut values
300  //cuts order
301  // printf(" |M-MD0| [GeV] < %f\n",fD0toKpiCuts[0]);
302  // printf(" dca [cm] < %f\n",fD0toKpiCuts[1]);
303  // printf(" cosThetaStar < %f\n",fD0toKpiCuts[2]);
304  // printf(" pTK [GeV/c] > %f\n",fD0toKpiCuts[3]);
305  // printf(" pTpi [GeV/c] > %f\n",fD0toKpiCuts[4]);
306  // printf(" |d0K| [cm] < %f\n",fD0toKpiCuts[5]);
307  // printf(" |d0pi| [cm] < %f\n",fD0toKpiCuts[6]);
308  // printf(" d0d0 [cm^2] < %f\n",fD0toKpiCuts[7]);
309  // printf(" cosThetaPoint > %f\n",fD0toKpiCuts[8]);
310  // printf(" |cosThetaPointXY| < %f\n",fD0toKpiCuts[9]);
311  // printf(" NormDecayLenghtXY > %f\n",fD0toKpiCuts[10]);
312 
313 
314  Float_t cutsMatrixD0toKpiStand[nptbins][nvars]={{0.400,400.*1E-4,0.8,0.3,0.3,1000.*1E-4,1000.*1E-4,-40000.*1E-8,0.75,0.,2.},/* pt<0.5*/
315  {0.400,400.*1E-4,0.8,0.3,0.3,1000.*1E-4,1000.*1E-4,-40000.*1E-8,0.75,0.,2.},/* 0.5<pt<1*/
316  {0.400,400.*1E-4,0.8,0.4,0.4,1000.*1E-4,1000.*1E-4,-33000.*1E-8,0.75,0.,2.},/* 1<pt<2 */
317  {0.400,250.*1E-4,0.8,0.7,0.7,1000.*1E-4,1000.*1E-4,-30000.*1E-8,0.85,0.994,2.},/* 2<pt<3 */
318  {0.400,250.*1E-4,0.8,0.7,0.7,1000.*1E-4,1000.*1E-4,-26000.*1E-8,0.85,0.994,2.},/* 3<pt<4 */
319  {0.400,250.*1E-4,0.8,0.7,0.7,1000.*1E-4,1000.*1E-4,-15000.*1E-8,0.85,0.994,2.},/* 4<pt<5 */
320  {0.400,250.*1E-4,0.8,0.7,0.7,1000.*1E-4,1000.*1E-4,-11000.*1E-8,0.82,0.994,2.},/* 5<pt<6 */
321  {0.400,270.*1E-4,0.8,0.7,0.7,1000.*1E-4,1000.*1E-4,-10000.*1E-8,0.78,0.994,2.},/* 6<pt<8 */
322  {0.400,300.*1E-4,0.8,0.7,0.7,1000.*1E-4,1000.*1E-4,-1000.*1E-8,0.7,0.994,2.},/* 8<pt<10 */
323  {0.400,300.*1E-4,0.8,0.7,0.7,1000.*1E-4,1000.*1E-4,-1000.*1E-8,0.7,0.994,2.},/* 10<pt<12 */
324  {0.400,350.*1E-4,1.0,0.7,0.7,1000.*1E-4,1000.*1E-4,-500.*1E-8,0.7,0.994,2.},/* 12<pt<16 */
325  {0.400,400.*1E-4,1.0,0.7,0.7,1000.*1E-4,1000.*1E-4,-500.*1E-8,0.7,0.994,2.},/* 16<pt<20 */
326  {0.400,400.*1E-4,1.0,0.7,0.7,1000.*1E-4,1000.*1E-4,-500.*1E-8,0.7,0.994,2.},/* 20<pt<24 */
327  {0.400,400.*1E-4,1.0,0.7,0.7,1000.*1E-4,1000.*1E-4,-500.*1E-8,0.7,0.994,2.}};/* pt>24 */
328 
329  //CREATE TRANSPOSE MATRIX...REVERSE INDICES as required by AliRDHFCuts
330  Float_t **cutsMatrixTransposeStand=new Float_t*[nvars];
331  for(Int_t iv=0;iv<nvars;iv++)cutsMatrixTransposeStand[iv]=new Float_t[nptbins];
332  for (Int_t ibin=0;ibin<nptbins;ibin++){
333  for (Int_t ivar = 0; ivar<nvars; ivar++){
334  cutsMatrixTransposeStand[ivar][ibin]=cutsMatrixD0toKpiStand[ibin][ivar];
335  }
336  }
337  RDHFD0toKpi->SetCuts(nvars,nptbins,cutsMatrixTransposeStand);
338 
339 
340  Bool_t stdvaropt=kFALSE;
341  Int_t dim=4; //set this!!
342  Bool_t *boolforopt;
343  boolforopt=new Bool_t[nvars];
344  if(stdvaropt){
345  boolforopt=RDHFD0toKpi->GetVarsForOpt();
346  }else{
347  TString *names;
348  names=new TString[nvars];
349  TString answer="";
350  Int_t checktrue=0;
351  names=RDHFD0toKpi->GetVarNames();
352  for(Int_t i=0;i<nvars;i++){
353  cout<<names[i]<<" for opt? (y/n)"<<endl;
354  cin>>answer;
355  if(answer=="y") {
356  boolforopt[i]=kTRUE;
357  checktrue++;
358  }
359  else boolforopt[i]=kFALSE;
360  }
361  if (checktrue!=dim) {
362  cout<<"Error! You set "<<checktrue<<" kTRUE instead of "<<dim<<endl;
363  return;
364  }
365  RDHFD0toKpi->SetVarsForOpt(dim,boolforopt);
366  }
367 
368 
369  Float_t tighterval[dim][nptbins];
370  //dca
371  //costhetastar
372  //d0d0 <-this
373  //costhetapoint <-this
374  //cosThetaPointXY <-this
375  //NormDecayLength <-this
376 
377  //number of steps for each variable is set in the AddTask arguments (default=8)
378  //set this!!
379  //0-0.5
380  tighterval[0][0]=-0.00065;
381  tighterval[1][0]=1.;
382  tighterval[2][0]=0.4;
383  tighterval[3][0]=6.;
384 
385  //0.5-1.
386  tighterval[0][1]=-0.00065;
387  tighterval[1][1]=1.;
388  tighterval[2][1]=0.4;
389  tighterval[3][1]=6.;
390 
391  //1-2
392  tighterval[0][2]=-0.00065;
393  tighterval[1][2]=1.;
394  tighterval[2][2]=0.4;
395  tighterval[3][2]=6.;
396 
397  //2-3
398  tighterval[0][3]=-0.0006;
399  tighterval[1][3]=1.;
400  tighterval[2][3]=1.;
401  tighterval[3][3]=6.;
402 
403  //3-4
404  tighterval[0][4]=-0.00046;
405  tighterval[1][4]=1.;
406  tighterval[2][4]=1.;
407  tighterval[3][4]=6.;
408 
409  //4-5
410  tighterval[0][5]=-0.00045;
411  tighterval[1][5]=1.;
412  tighterval[2][5]=1.;
413  tighterval[3][5]=6.;
414 
415  //5-6
416  tighterval[0][6]=-0.00031;
417  tighterval[1][6]=1.;
418  tighterval[2][6]=1.;
419  tighterval[3][6]=6.;
420 
421  //6-8
422  tighterval[0][7]=-0.00021;
423  tighterval[1][7]=0.98;
424  tighterval[2][7]=1.;
425  tighterval[3][7]=6.;
426 
427  //8-10
428  tighterval[0][8]=-0.0001;
429  tighterval[1][8]=0.98;
430  tighterval[2][8]=1.;
431  tighterval[3][8]=6.;
432 
433  //10-12
434  tighterval[0][9]=-0.0001;
435  tighterval[1][9]=0.9;
436  tighterval[2][9]=1.;
437  tighterval[3][9]=6.;
438 
439  //12-16
440  tighterval[0][10]=-0.00005;
441  tighterval[1][10]=0.9;
442  tighterval[2][10]=1.;
443  tighterval[3][10]=6.;
444 
445  //16-20
446  tighterval[0][11]=-0.00005;
447  tighterval[1][11]=0.9;
448  tighterval[2][11]=1.;
449  tighterval[3][11]=6.;
450 
451  //20-24
452  tighterval[0][12]=-0.00005;
453  tighterval[1][12]=0.9;
454  tighterval[2][12]=1.;
455  tighterval[3][12]=6.;
456 
457  //>24
458  tighterval[0][13]=-0.00005;
459  tighterval[1][13]=0.9;
460  tighterval[2][13]=1.;
461  tighterval[3][13]=6.;
462 
463 
464  TString name="";
465  Int_t arrdim=dim*nptbins;
466  cout<<"Will save "<<arrdim<<" TParameter<float>"<<endl;
467  TClonesArray max("TParameter<float>",arrdim);
468  for(Int_t ival=0;ival<dim;ival++){
469  for(Int_t jpt=0;jpt<nptbins;jpt++){
470  name=Form("par%dptbin%d",ival,jpt);
471  cout<<"Setting "<<name.Data()<<" to "<<tighterval[ival][jpt]<<endl;
472  new(max[jpt*dim+ival])TParameter<float>(name.Data(),tighterval[ival][jpt]);
473  }
474  }
475 
476  Bool_t flagPID=kTRUE;
477  RDHFD0toKpi->SetUsePID(flagPID);
478 
479  RDHFD0toKpi->PrintAll();
480  printf("Use PID? %s\n",flagPID ? "yes" : "no");
481 
482  //pid settings
483  AliAODPidHF* pidObj=new AliAODPidHF();
484  //pidObj->SetName("pid4D0");
485  Int_t mode=1;
486  const Int_t nlims=2;
487  Double_t plims[nlims]={0.6,0.8}; //TPC limits in momentum [GeV/c]
488  Bool_t compat=kTRUE; //effective only for this mode
489  Bool_t asym=kTRUE;
490  Double_t sigmas[5]={2.,1.,0.,3.,0.}; //to be checked and to be modified with new implementation of setters by Rossella
491  pidObj->SetAsym(asym);// if you want to use the asymmetric bands in TPC
492  pidObj->SetMatch(mode);
493  pidObj->SetPLimit(plims,nlims);
494  pidObj->SetSigma(sigmas);
495  pidObj->SetCompat(compat);
496  pidObj->SetTPC(kTRUE);
497  pidObj->SetTOF(kTRUE);
498  RDHFD0toKpi->SetPidHF(pidObj);
499 
500  RDHFD0toKpi->SetUseDefaultPID(kFALSE); //to use the AliAODPidHF
501 
502  //activate pileup rejection (for pp)
503  //RDHFD0toKpi->SetOptPileup(AliRDHFCuts::kRejectPileupEvent);
504 
505  //Do not recalculate the vertex
506  RDHFD0toKpi->SetRemoveDaughtersFromPrim(kFALSE); //activate for pp
507 
508  TString cent="";
509  //centrality selection (Pb-Pb)
510  Float_t minc=20,maxc=80;
511  RDHFD0toKpi->SetMinCentrality(minc);
512  RDHFD0toKpi->SetMaxCentrality(maxc);
513  cent=Form("%.0f%.0f",minc,maxc);
514  RDHFD0toKpi->SetUseCentrality(AliRDHFCuts::kCentV0M); //kCentOff,kCentV0M,kCentTRK,kCentTKL,kCentCL1,kCentInvalid
515 
516  //temporary
517  RDHFD0toKpi->SetFixRefs();
518 
519  TFile* fout=new TFile(Form("cuts4SignifMaxim%s%s%sRecVtx%sPileupRej.root", RDHFD0toKpi->GetUseCentrality()==0 ? "pp" : "PbPb",cent.Data(),RDHFD0toKpi->GetIsPrimaryWithoutDaughters() ? "" : "No",RDHFD0toKpi->GetOptPileUp() ? "" : "No"),"recreate"); //set this!!
520 
521  fout->cd();
522  RDHFD0toKpi->Write();
523  max.Write();
524  fout->Close();
525 
526 }
527 
Float_t GetMaxCentrality() const
Definition: AliRDHFCuts.h:268
void SetAsym(Bool_t asym)
Definition: AliAODPidHF.h:88
void SetUseDefaultPID(Bool_t defPID)
double Double_t
Definition: External.C:58
void SetFixRefs(Bool_t fix=kTRUE)
Definition: AliRDHFCuts.h:334
Bool_t GetOptPileUp() const
Definition: AliRDHFCuts.h:265
void SetUseCentrality(Int_t flag=1)
virtual void PrintAll() const
virtual void SetStandardCutsPP2011_276TeV()
virtual void SetStandardCutsPP2010()
TString * GetVarNames() const
Definition: AliRDHFCuts.h:237
Float_t GetMinCentrality() const
Definition: AliRDHFCuts.h:267
void SetUsePhysicsSelection(Bool_t use=kTRUE)
Definition: AliRDHFCuts.h:335
void SetPidHF(AliAODPidHF *pidObj)
see enum below
Definition: AliRDHFCuts.h:212
void SetTOF(Bool_t tof)
Definition: AliAODPidHF.h:95
int Int_t
Definition: External.C:63
void SetCuts(Int_t nVars, Int_t nPtBins, Float_t **cutsRD)
void SetMinCentrality(Float_t minCentrality=0.)
Definition: AliRDHFCuts.h:51
float Float_t
Definition: External.C:68
Bool_t * GetVarsForOpt() const
Definition: AliRDHFCuts.h:238
Double_t sigmas[nPtBins]
void makeInputAliAnalysisTaskSED0Mass()
Int_t mode
Definition: anaM.C:40
void SetSigma(Double_t *sigma)
Definition: AliAODPidHF.h:39
void ModifyFromStandardCuts(Int_t system=1)
void SetMaxCentrality(Float_t maxCentrality=100.)
Definition: AliRDHFCuts.h:52
void SetVarsForOpt(Int_t nVars, Bool_t *forOpt)
Bool_t GetIsPrimaryWithoutDaughters() const
Definition: AliRDHFCuts.h:264
void SetUsePID(Bool_t flag=kTRUE)
Definition: AliRDHFCuts.h:206
void SetRemoveDaughtersFromPrim(Bool_t removeDaughtersPrim)
Definition: AliRDHFCuts.h:216
void SetPtBins(Int_t nPtBinLimits, Float_t *ptBinLimits)
void SetMatch(Int_t match)
Definition: AliAODPidHF.h:98
void AddTrackCuts(const AliESDtrackCuts *cuts)
Definition: AliRDHFCuts.h:204
void SetPLimit(Double_t *plim, Int_t npLim)
void SetTPC(Bool_t tpc)
Definition: AliAODPidHF.h:94
bool Bool_t
Definition: External.C:53
void SetCompat(Bool_t comp)
Definition: AliAODPidHF.h:100
void makeInputAliAnalysisTaskSESignificanceMaximization()
Int_t GetUseCentrality() const
Definition: AliRDHFCuts.h:266
virtual void SetStandardCutsPbPb2010()
Int_t nptbins