]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG3/vertexingHF/AliRDHFCutsDplustoKpipi.cxx
Fixing a minor coding violation
[u/mrichter/AliRoot.git] / PWG3 / vertexingHF / AliRDHFCutsDplustoKpipi.cxx
CommitLineData
e3d40058 1/**************************************************************************
2 * Copyright(c) 1998-2010, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
15
27de2dfb 16/* $Id$ */
17
e3d40058 18/////////////////////////////////////////////////////////////
19//
20// Class for cuts on AOD reconstructed D+->Kpipi
21//
22// Author: R. Bala, bala@to.infn.it
23// G. Ortona, ortona@to.infn.it
24/////////////////////////////////////////////////////////////
25
26#include <TDatabasePDG.h>
27#include <Riostream.h>
28
29#include "AliRDHFCutsDplustoKpipi.h"
30#include "AliAODRecoDecayHF3Prong.h"
31#include "AliAODTrack.h"
32#include "AliESDtrack.h"
33
73173a6a 34
e3d40058 35ClassImp(AliRDHFCutsDplustoKpipi)
36
37//--------------------------------------------------------------------------
a9b75906 38AliRDHFCutsDplustoKpipi::AliRDHFCutsDplustoKpipi(const char* name) :
da24b73f 39AliRDHFCuts(name),
40fUseStrongPid(kFALSE)
e3d40058 41{
42 //
43 // Default Constructor
44 //
45 Int_t nvars=12;
46 SetNVars(nvars);
47 TString varNames[12]={"inv. mass [GeV]",
48 "pTK [GeV/c]",
49 "pTPi [GeV/c]",
50 "d0K [cm] lower limit!",
51 "d0Pi [cm] lower limit!",
52 "dist12 (cm)",
53 "sigmavert (cm)",
54 "dist prim-sec (cm)",
55 "pM=Max{pT1,pT2,pT3} (GeV/c)",
56 "cosThetaPoint",
57 "Sum d0^2 (cm^2)",
58 "dca cut (cm)"};
59 Bool_t isUpperCut[12]={kTRUE,
60 kFALSE,
61 kFALSE,
62 kFALSE,
63 kFALSE,
64 kFALSE,
65 kTRUE,
66 kFALSE,
67 kFALSE,
68 kFALSE,
69 kFALSE,
70 kTRUE};
71 SetVarNames(nvars,varNames,isUpperCut);
4755453e 72 Bool_t forOpt[12]={kFALSE,
e3d40058 73 kFALSE,
74 kFALSE,
75 kFALSE,
76 kFALSE,
77 kFALSE,
78 kTRUE,
79 kTRUE,
80 kTRUE,
81 kTRUE,
82 kTRUE,
83 kFALSE};
4755453e 84 SetVarsForOpt(5,forOpt);
e3d40058 85 Float_t limits[2]={0,999999999.};
86 SetPtBins(2,limits);
73173a6a 87 if(fPidHF)delete fPidHF;
88 fPidHF=new AliAODPidHF();
89 Double_t plim[2]={0.6,0.8};
90 Double_t nsigma[5]={2.,1.,2.,3.,0.};
91
92 fPidHF->SetPLimit(plim);
93 fPidHF->SetAsym(kTRUE);
94 fPidHF->SetSigma(nsigma);
95 fPidHF->SetMatch(1);
96 fPidHF->SetTPC(1);
97 fPidHF->SetTOF(1);
98 fPidHF->SetITS(0);
99 fPidHF->SetTRD(0);
100 fPidHF->SetCompat(kTRUE);
101
102
e3d40058 103}
370f7180 104
105
106
107
108
109
110
111
e3d40058 112//--------------------------------------------------------------------------
113AliRDHFCutsDplustoKpipi::AliRDHFCutsDplustoKpipi(const AliRDHFCutsDplustoKpipi &source) :
da24b73f 114 AliRDHFCuts(source),
115 fUseStrongPid(source.fUseStrongPid)
116
e3d40058 117{
118 //
119 // Copy constructor
120 //
121
122}
123//--------------------------------------------------------------------------
124AliRDHFCutsDplustoKpipi &AliRDHFCutsDplustoKpipi::operator=(const AliRDHFCutsDplustoKpipi &source)
125{
126 //
127 // assignment operator
128 //
129 if(&source == this) return *this;
130
131 AliRDHFCuts::operator=(source);
132
133 return *this;
134}
73173a6a 135//
e3d40058 136
137
138//---------------------------------------------------------------------------
139void AliRDHFCutsDplustoKpipi::GetCutVarsForOpt(AliAODRecoDecayHF *d,Float_t *vars,Int_t nvars,Int_t *pdgdaughters) {
140 //
141 // Fills in vars the values of the variables
142 //
143
144
145 if(nvars!=fnVarsForOpt) {
146 printf("AliRDHFCutsDplustoKpipi::GetCutsVarsForOpt: wrong number of variables\n");
147 return;
148 }
149
150 AliAODRecoDecayHF3Prong *dd = (AliAODRecoDecayHF3Prong*)d;
e3d40058 151
e3d40058 152 Int_t iter=-1;
153 if(fVarsForOpt[0]){
154 iter++;
155 vars[iter]=dd->InvMassDplus();
156 }
157 if(fVarsForOpt[1]){
158 iter++;
159 for(Int_t iprong=0;iprong<3;iprong++){
160 if(TMath::Abs(pdgdaughters[iprong])==321) {
161 vars[iter]=dd->PtProng(iprong);
162 }
163 }
164 }
165 if(fVarsForOpt[2]){
166 iter++;
4755453e 167 Float_t minPtDau=1000000.0;
e3d40058 168 for(Int_t iprong=0;iprong<3;iprong++){
169 if(TMath::Abs(pdgdaughters[iprong])==211) {
4755453e 170 if(dd->PtProng(iprong)<minPtDau){
171 minPtDau=dd->PtProng(iprong);
172 }
e3d40058 173 }
174 }
4755453e 175 vars[iter]=minPtDau;
e3d40058 176 }
177 if(fVarsForOpt[3]){
178 iter++;
179 for(Int_t iprong=0;iprong<3;iprong++){
180 if(TMath::Abs(pdgdaughters[iprong])==321) {
181 vars[iter]=dd->Getd0Prong(iprong);
182 }
183 }
184 }
185 if(fVarsForOpt[4]){
186 iter++;
4755453e 187 Float_t minImpParDau=1000000.0;
e3d40058 188 for(Int_t iprong=0;iprong<3;iprong++){
189 if(TMath::Abs(pdgdaughters[iprong])==211) {
4755453e 190 if(dd->Getd0Prong(iprong)<minImpParDau){
191 minImpParDau=dd->Getd0Prong(iprong);
192 }
e3d40058 193 }
194 }
4755453e 195 vars[iter]=minImpParDau;
e3d40058 196 }
197 if(fVarsForOpt[5]){
198 iter++;
4755453e 199 Float_t dist12 = dd->GetDist12toPrim();
200 Float_t dist23 = dd->GetDist23toPrim();
201 if(dist12<dist23)vars[iter]=dist12;
202 else vars[iter]=dist23;
e3d40058 203 }
204 if(fVarsForOpt[6]){
205 iter++;
206 vars[iter]=dd->GetSigmaVert();
207 }
208 if(fVarsForOpt[7]){
209 iter++;
210 vars[iter] = dd->DecayLength();
211 }
212 if(fVarsForOpt[8]){
213 iter++;
214 Float_t ptmax=0;
215 for(Int_t i=0;i<3;i++){
216 if(dd->PtProng(i)>ptmax)ptmax=dd->PtProng(i);
217 }
218 vars[iter]=ptmax;
219 }
220 if(fVarsForOpt[9]){
221 iter++;
222 vars[iter]=dd->CosPointingAngle();
223 }
224 if(fVarsForOpt[10]){
225 iter++;
226 vars[iter]=dd->Getd0Prong(0)*dd->Getd0Prong(0)+dd->Getd0Prong(1)*dd->Getd0Prong(1)+dd->Getd0Prong(2)*dd->Getd0Prong(2);
227 }
228 if(fVarsForOpt[11]){
229 iter++;
4755453e 230 Float_t maxDCA=0;
231 for(Int_t iprong=0;iprong<3;iprong++){
232 if(dd->GetDCA(iprong)<maxDCA){
233 maxDCA=dd->GetDCA(iprong);
234 }
235 }
236 vars[iter]=maxDCA;
e3d40058 237 }
238 return;
239}
c1cc7a53 240//---------------------------------------------------------------------------
241Bool_t AliRDHFCutsDplustoKpipi::IsInFiducialAcceptance(Double_t pt, Double_t y) const
242{
243 //
244 // Checking if Dplus is in fiducial acceptance region
245 //
246
247 if(pt > 5.) {
248 // applying cut for pt > 5 GeV
249 AliDebug(2,Form("pt of D+ = %f (> 5), cutting at |y| < 0.8",pt));
250 if (TMath::Abs(y) > 0.8) return kFALSE;
251
252 } else {
253 // appliying smooth cut for pt < 5 GeV
254 Double_t maxFiducialY = -0.2/15*pt*pt+1.9/15*pt+0.5;
255 Double_t minFiducialY = 0.2/15*pt*pt-1.9/15*pt-0.5;
256 AliDebug(2,Form("pt of D+ = %f (< 5), cutting according to the fiducial zone [%f, %f]\n",pt,minFiducialY,maxFiducialY));
257 if (y < minFiducialY || y > maxFiducialY) return kFALSE;
258 }
259
260 return kTRUE;
261}
73173a6a 262
263//---------------------------------------------------------------------------
bc116f28 264Int_t AliRDHFCutsDplustoKpipi::IsSelectedPID(AliAODRecoDecayHF *rd)
265{
266 //
595cc7e2 267 // PID selection, returns 3 if accepted, 0 if not accepted
bc116f28 268 //
595cc7e2 269 if(!fUsePID || !rd) return 3;
73173a6a 270 //if(fUsePID)printf("i am inside the pid \n");
271 Int_t nkaons=0;
272 Int_t nNotKaons=0;
273 Int_t sign= rd->GetCharge();
274 for(Int_t daught=0;daught<3;daught++){
275 AliAODTrack *track=(AliAODTrack*)rd->GetDaughter(daught);
276 Int_t isPion=fPidHF->MakeRawPid(track,AliPID::kPion);
277 Int_t isKaon=fPidHF->MakeRawPid(track,AliPID::kKaon);
278 Int_t isProton=fPidHF->MakeRawPid(track,AliPID::kProton);
279
280 if(isProton>0 && isKaon<0 && isPion<0) return 0;
281 if(isKaon>0 && isPion<0) nkaons++;
282 if(isKaon<0) nNotKaons++;
283 if(sign==track->Charge()){//pions
284 if(isPion<0)return 0;
da24b73f 285 if(rd->Pt()<2. && isPion<=0 && fUseStrongPid)return 0;
73173a6a 286 }
287 else{//kaons
288 if(isKaon<0)return 0;
da24b73f 289 if(rd->Pt()<2. && isKaon<=0 && fUseStrongPid)return 0;
73173a6a 290 }
291
292
293 }
294
295 if(nkaons>1)return 0;
296 if(nNotKaons==3)return 0;
297
595cc7e2 298 return 3;
73173a6a 299}
300
301
e3d40058 302//---------------------------------------------------------------------------
c1cc7a53 303Int_t AliRDHFCutsDplustoKpipi::IsSelected(TObject* obj,Int_t selectionLevel, AliAODEvent* aod) {
e3d40058 304 //
595cc7e2 305 // Apply selection, returns 3 if accepted, 0 if not accepted
e3d40058 306 //
307
5d2d6118 308
309 fIsSelectedCuts=0;
310 fIsSelectedPID=0;
311
e3d40058 312 if(!fCutsRD){
4755453e 313 cout<<"Cut matrix not inizialized. Exit..."<<endl;
e3d40058 314 return 0;
315 }
316 //PrintAll();
317 AliAODRecoDecayHF3Prong* d=(AliAODRecoDecayHF3Prong*)obj;
318
319
320 if(!d){
321 cout<<"AliAODRecoDecayHF3Prong null"<<endl;
322 return 0;
323 }
324
73173a6a 325 // PID selection
595cc7e2 326 Int_t returnvaluePID=3;
327 Int_t returnvalueCuts=3;
e3d40058 328
5639e412 329 Double_t pt=d->Pt();
330 if(pt<fMinPtCand) return 0;
331 if(pt>fMaxPtCand) return 0;
dcc2ade0 332
73173a6a 333
e3d40058 334 // selection on candidate
335 if(selectionLevel==AliRDHFCuts::kAll ||
336 selectionLevel==AliRDHFCuts::kCandidate) {
337
c1cc7a53 338 //recalculate vertex w/o daughters
339 AliAODVertex *origownvtx=0x0;
c1cc7a53 340 if(fRemoveDaughtersFromPrimary) {
793fdbec 341 if(d->GetOwnPrimaryVtx()) origownvtx=new AliAODVertex(*d->GetOwnPrimaryVtx());
342 if(!RecalcOwnPrimaryVtx(d,aod)) {
343 CleanOwnPrimaryVtx(d,aod,origownvtx);
344 return 0;
345 }
c1cc7a53 346 }
347
e3d40058 348 Int_t ptbin=PtBin(pt);
c1cc7a53 349 if (ptbin==-1) {
793fdbec 350 CleanOwnPrimaryVtx(d,aod,origownvtx);
c1cc7a53 351 return 0;
352 }
73173a6a 353
e3d40058 354 Double_t mDplusPDG = TDatabasePDG::Instance()->GetParticle(411)->Mass();
355 Double_t mDplus=d->InvMassDplus();
793fdbec 356 if(TMath::Abs(mDplus-mDplusPDG)>fCutsRD[GetGlobalIndex(0,ptbin)]) {CleanOwnPrimaryVtx(d,aod,origownvtx); return 0;}
e3d40058 357
c1cc7a53 358 //2track cuts
793fdbec 359 if(d->GetDist12toPrim()<fCutsRD[GetGlobalIndex(5,ptbin)]|| d->GetDist23toPrim()<fCutsRD[GetGlobalIndex(5,ptbin)]) {CleanOwnPrimaryVtx(d,aod,origownvtx); return 0;}
5d2d6118 360
361 Double_t sum2=d->Getd0Prong(0)*d->Getd0Prong(0)+d->Getd0Prong(1)*d->Getd0Prong(1)+d->Getd0Prong(2)*d->Getd0Prong(2);
793fdbec 362 if(sum2<fCutsRD[GetGlobalIndex(10,ptbin)]) {CleanOwnPrimaryVtx(d,aod,origownvtx); return 0;}
5d2d6118 363
793fdbec 364 if(d->Getd0Prong(0)*d->Getd0Prong(1)<0. && d->Getd0Prong(2)*d->Getd0Prong(1)<0.) {CleanOwnPrimaryVtx(d,aod,origownvtx); return 0;}
c1cc7a53 365
366 //sec vert
793fdbec 367 if(d->GetSigmaVert()>fCutsRD[GetGlobalIndex(6,ptbin)]) {CleanOwnPrimaryVtx(d,aod,origownvtx); return 0;}
5d2d6118 368
369 //DCA
793fdbec 370 for(Int_t i=0;i<3;i++) if(d->GetDCA(i)>fCutsRD[GetGlobalIndex(11,ptbin)]) {CleanOwnPrimaryVtx(d,aod,origownvtx); return 0;}
5d2d6118 371
793fdbec 372 if(d->Pt2Prong(1) < fCutsRD[GetGlobalIndex(1,ptbin)]*fCutsRD[GetGlobalIndex(1,ptbin)] || TMath::Abs(d->Getd0Prong(1))<fCutsRD[GetGlobalIndex(3,ptbin)]) {CleanOwnPrimaryVtx(d,aod,origownvtx); return 0;}//Kaon
5d2d6118 373
793fdbec 374 if(d->Pt2Prong(0) < fCutsRD[GetGlobalIndex(2,ptbin)]*fCutsRD[GetGlobalIndex(2,ptbin)] || TMath::Abs(d->Getd0Prong(0))<fCutsRD[GetGlobalIndex(4,ptbin)]) {CleanOwnPrimaryVtx(d,aod,origownvtx); return 0;}//Pion1
5d2d6118 375
793fdbec 376 if(d->Pt2Prong(2) < fCutsRD[GetGlobalIndex(2,ptbin)]*fCutsRD[GetGlobalIndex(2,ptbin)] || TMath::Abs(d->Getd0Prong(2))<fCutsRD[GetGlobalIndex(4,ptbin)]) {CleanOwnPrimaryVtx(d,aod,origownvtx); return 0;}//Pion2
5d2d6118 377
c1cc7a53 378
5d2d6118 379
380
c1cc7a53 381
5d2d6118 382
793fdbec 383 if(d->Pt2Prong(0)<fCutsRD[GetGlobalIndex(8,ptbin)]*fCutsRD[GetGlobalIndex(8,ptbin)] && d->Pt2Prong(1)<fCutsRD[GetGlobalIndex(8,ptbin)]*fCutsRD[GetGlobalIndex(8,ptbin)] && d->Pt2Prong(2)<fCutsRD[GetGlobalIndex(8,ptbin)]*fCutsRD[GetGlobalIndex(8,ptbin)]) {CleanOwnPrimaryVtx(d,aod,origownvtx); return 0;}
5d2d6118 384
793fdbec 385 if(d->DecayLength2()<fCutsRD[GetGlobalIndex(7,ptbin)]*fCutsRD[GetGlobalIndex(7,ptbin)]) {CleanOwnPrimaryVtx(d,aod,origownvtx); return 0;}
5d2d6118 386
387
388
793fdbec 389 if(d->CosPointingAngle()< fCutsRD[GetGlobalIndex(9,ptbin)]) {CleanOwnPrimaryVtx(d,aod,origownvtx); return 0;}
5d2d6118 390
c1cc7a53 391
5d2d6118 392
930eb764 393
c1cc7a53 394 // unset recalculated primary vertex when not needed any more
793fdbec 395 CleanOwnPrimaryVtx(d,aod,origownvtx);
c1cc7a53 396
5d2d6118 397 fIsSelectedCuts=returnvalueCuts;
398
f754294e 399 //if(!returnvalueCuts) return 0; // returnvalueCuts cannot be 0 here
e3d40058 400 }
dcc2ade0 401
402 if(selectionLevel==AliRDHFCuts::kAll ||
403 selectionLevel==AliRDHFCuts::kCandidate ||
404 selectionLevel==AliRDHFCuts::kPID) {
405 returnvaluePID = IsSelectedPID(d);
5d2d6118 406 fIsSelectedPID=returnvaluePID;
dcc2ade0 407 }
408 if(returnvaluePID==0)return 0;
409
410 // selection on daughter tracks
411 if(selectionLevel==AliRDHFCuts::kAll ||
412 selectionLevel==AliRDHFCuts::kTracks) {
413 if(!AreDaughtersSelected(d)) return 0;
414 }
415
416
417
c1cc7a53 418
595cc7e2 419 return 3;
e3d40058 420}
370f7180 421
422
423
424
e3d40058 425//---------------------------------------------------------------------------
370f7180 426
427
428void AliRDHFCutsDplustoKpipi::SetStandardCutsPP2010() {
429 //
430 //STANDARD CUTS USED FOR 2010 pp analysis
431 //
432
433 SetName("DplustoKpipiCutsStandard");
434 SetTitle("Standard Cuts for D+ analysis");
435
436 // PILE UP REJECTION
437 SetOptPileup(AliRDHFCuts::kRejectPileupEvent);
438
439 // EVENT CUTS
440 SetMinVtxContr(1);
441
442 AliESDtrackCuts* esdTrackCuts=new AliESDtrackCuts();
443 esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
444 //default
445 esdTrackCuts->SetRequireTPCRefit(kTRUE);
446 esdTrackCuts->SetRequireITSRefit(kTRUE);
447 //esdTrackCuts->SetMinNClustersITS(4); // default is 5
448 esdTrackCuts->SetMinNClustersTPC(70);
449 esdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD,
450 AliESDtrackCuts::kAny);
451 // default is kBoth, otherwise kAny
452 esdTrackCuts->SetMinDCAToVertexXY(0.);
453 esdTrackCuts->SetPtRange(0.3,1.e10);
454
455 AddTrackCuts(esdTrackCuts);
456
457
458 const Int_t nptbins =13;
459 const Int_t nvars=12;
460 Float_t ptbins[nptbins+1];
461 ptbins[0]=0.;
462 ptbins[1]=1;
463 ptbins[2]=2.;
464 ptbins[3]=3.;
465 ptbins[4]=4.;
466 ptbins[5]=5.;
467 ptbins[6]=6.;
468 ptbins[7]=8.;
469 ptbins[8]=10.;
470 ptbins[9]=12.;
471 ptbins[10]=14.;
472 ptbins[11]=16.;
473 ptbins[12]=24.;
474 ptbins[13]=99999.;
475
476
477 Float_t** anacutsval;
478 anacutsval=new Float_t*[nvars];
479
480 for(Int_t ic=0;ic<nvars;ic++){anacutsval[ic]=new Float_t[nptbins];}
e11ae259 481
370f7180 482 //Double_t cutsDplus[12]={0.2,0.4,0.4,0.,0.,0.01,0.06,0.02,0.,0.85,0.,10000000000.};
483 Int_t ic=0;
484 for(Int_t ipt=0;ipt<nptbins;ipt++){
485 anacutsval[ic][ipt]=0.2;
486 }
487
370f7180 488
65b4f6d7 489 ic=1;
370f7180 490
491 anacutsval[1][0]=0.3;
492 anacutsval[1][1]=0.3;
493 anacutsval[1][2]=0.4;
65b4f6d7 494
495
496 for(Int_t ipt=3;ipt<nptbins;ipt++){
497 anacutsval[ic][ipt]=0.4;
498 }
499
500 ic=2;
370f7180 501
502 anacutsval[2][0]=0.3;
503 anacutsval[2][1]=0.3;
504 anacutsval[2][2]=0.4;
505
370f7180 506 for(Int_t ipt=3;ipt<nptbins;ipt++){
507 anacutsval[ic][ipt]=0.4;
508 }
65b4f6d7 509
510 ic=3;
511 for(Int_t ipt=0;ipt<nptbins;ipt++){
512 anacutsval[ic][ipt]=0.;
513 }
514
515 ic=4;
516 for(Int_t ipt=0;ipt<nptbins;ipt++){
517 anacutsval[ic][ipt]=0.;
370f7180 518 }
519
65b4f6d7 520 ic=5;
521 for(Int_t ipt=0;ipt<nptbins;ipt++){
522 anacutsval[ic][ipt]=0.01;
523 }
524
525
526 ic=6;
527
370f7180 528 anacutsval[6][0]=0.022100;
529 anacutsval[6][1]=0.022100;
530 anacutsval[6][2]=0.034;
531 anacutsval[6][3]=0.020667;
532 anacutsval[6][4]=0.020667;
533 anacutsval[6][5]=0.023333;
370f7180 534
535
65b4f6d7 536 for(Int_t ipt=6;ipt<nptbins;ipt++){
537 anacutsval[ic][ipt]=0.023333;
538 }
539
540
541 ic=7;
542
370f7180 543 anacutsval[7][0]=0.08;
544 anacutsval[7][1]=0.08;
545 anacutsval[7][2]=0.09;
546 anacutsval[7][3]=0.095;
547 anacutsval[7][4]=0.095;
548 anacutsval[7][5]=0.115;
65b4f6d7 549
550 for(Int_t ipt=6;ipt<nptbins;ipt++){
551 anacutsval[ic][ipt]=0.115;
552 }
370f7180 553
554
65b4f6d7 555
556 ic=8;
370f7180 557 anacutsval[8][0]=0.5;
558 anacutsval[8][1]=0.5;
559 anacutsval[8][2]=1.0;
560 anacutsval[8][3]=0.5;
65b4f6d7 561
562 for(Int_t ipt=4;ipt<nptbins;ipt++){
563 anacutsval[ic][ipt]=0.5;
564 }
565
566
567 ic=9;
568
569
570 anacutsval[9][0]=0.979;
571 anacutsval[9][1]=0.979;
370f7180 572 anacutsval[9][2]=0.95;
573 anacutsval[9][3]=0.95;
574 anacutsval[9][4]= 0.95;
575 anacutsval[9][5]=0.92;
576 anacutsval[9][6]=0.92;
577 anacutsval[9][7]=0.92;
578 anacutsval[9][8]=0.92;
579 anacutsval[9][9]=0.90;
65b4f6d7 580
581 for(Int_t ipt=10;ipt<nptbins;ipt++){
582 anacutsval[ic][ipt]=0.90;
583 }
584
585
586
587 ic=10;
370f7180 588
589 anacutsval[10][0]=0.0055;
590 anacutsval[10][1]=0.0055;
591 anacutsval[10][2]= 0.0028;
592 anacutsval[10][3]=0.000883;
65b4f6d7 593
594
595 for(Int_t ipt=4;ipt<nptbins;ipt++){
596 anacutsval[ic][ipt]=0.000883;
597 }
598
599 ic=11;
600
601 for(Int_t ipt=0;ipt<nptbins;ipt++){
602 anacutsval[ic][ipt]=10000000000.;
603 }
604
605
606
370f7180 607
ae39ad32 608 SetGlobalIndex(nvars,nptbins);
370f7180 609 SetPtBins(nptbins+1,ptbins);
610 SetCuts(nvars,nptbins,anacutsval);
611 SetUsePID(kTRUE);
612 SetRemoveDaughtersFromPrim(kTRUE);
65b4f6d7 613 SetOptPileup(kTRUE);
370f7180 614 PrintAll();
615
e11ae259 616 for(Int_t iic=0;iic<nvars;iic++){delete [] anacutsval[iic];}
617 delete [] anacutsval;
618 anacutsval=NULL;
619
370f7180 620 return;
621}
622
623
624void AliRDHFCutsDplustoKpipi::SetStandardCutsPbPb2010() {
625 //
626 //STANDARD CUTS USED FOR 2010 Pb Pb analysis.... not optimized yet
627 //
628
629 SetName("DplustoKpipiCutsStandard");
630 SetTitle("Standard Cuts for D+ analysis in PbPb2010 run");
631
632 // PILE UP REJECTION
633 //SetOptPileup(AliRDHFCuts::kRejectPileupEvent);
634
635 // EVENT CUTS
636 SetMinVtxContr(1);
637
638
639 AliESDtrackCuts* esdTrackCuts=new AliESDtrackCuts();
640 esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
641 //default
642 esdTrackCuts->SetRequireTPCRefit(kTRUE);
643 esdTrackCuts->SetRequireITSRefit(kTRUE);
644 //esdTrackCuts->SetMinNClustersITS(4); // default is 5
645 esdTrackCuts->SetMinNClustersTPC(70);
646 esdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD,
647 AliESDtrackCuts::kAny);
648 // default is kBoth, otherwise kAny
62ad0d28 649
650 esdTrackCuts->SetMaxDCAToVertexXY(1.);
651 esdTrackCuts->SetMaxDCAToVertexZ(1.);
652 esdTrackCuts->SetMinDCAToVertexXYPtDep("0.0100*TMath::Max(0.,(1-TMath::Floor(TMath::Abs(pt)/2.)))");
370f7180 653 esdTrackCuts->SetPtRange(0.8,1.e10);
654
655 AddTrackCuts(esdTrackCuts);
656
657 const Int_t nptbins=10;
658 Float_t* ptbins;
659 ptbins=new Float_t[nptbins+1];
e11ae259 660
370f7180 661 ptbins[0]=0.;
662 ptbins[1]=1.;
663 ptbins[2]=2.;
664 ptbins[3]=3.;
665 ptbins[4]=4.;
666 ptbins[5]=5.;
667 ptbins[6]=6.;
668 ptbins[7]=8.;
669 ptbins[8]=12.;
670 ptbins[9]=16.;
671 ptbins[10]=24.;
672 const Int_t nvars=12;
673
674
675
676 Float_t** anacutsval;
677 anacutsval=new Float_t*[nvars];
678
679 for(Int_t ic=0;ic<nvars;ic++){anacutsval[ic]=new Float_t[nptbins];}
680 //Double_t cutsDplus[12]={0.2,0.4,0.4,0.,0.,0.01,0.06,0.02,0.,0.85,0.,10000000000.};
681 Int_t ic=0;
682 for(Int_t ipt=0;ipt<nptbins;ipt++){
683 anacutsval[ic][ipt]=0.2;
684 }
685
686 ic=3;
687 for(Int_t ipt=0;ipt<nptbins;ipt++){
688 anacutsval[ic][ipt]=0.;
689 }
690 ic=4;
691 for(Int_t ipt=0;ipt<nptbins;ipt++){
692 anacutsval[ic][ipt]=0.;
693 }
694 ic=5;
695 for(Int_t ipt=0;ipt<nptbins;ipt++){
696 anacutsval[ic][ipt]=0.01;
697 }
698 //ic=6;
699 //for(Int_t ipt=0;ipt<nptbins;ipt++){
700 // anacutsval[ic][ipt]=0.06;
701
702 ic=11;
703 for(Int_t ipt=0;ipt<nptbins;ipt++){
704 anacutsval[ic][ipt]=10000000000.;
705 }
706
707
708
709
710 ic=1;
711 for(Int_t ipt=0;ipt<nptbins;ipt++){
712 anacutsval[ic][ipt]=0.8;
713 }
714 ic=2;
715 for(Int_t ipt=0;ipt<nptbins;ipt++){
716 anacutsval[ic][ipt]=0.8;
717 }
718
719
370f7180 720
62ad0d28 721
722 anacutsval[6][0]=0.022100;
723 anacutsval[6][1]=0.022100;
724 anacutsval[6][2]=0.034;
725 anacutsval[6][3]=0.020667;
726 anacutsval[6][4]=0.020667;
727 anacutsval[6][5]=0.023333;
728 anacutsval[6][6]=0.023333;
729 anacutsval[6][7]=0.023333;
730 anacutsval[6][8]=0.023333;
731 anacutsval[6][9]=0.023333;
732
733 anacutsval[7][0]=0.08;
734 anacutsval[7][1]=0.08;
735 anacutsval[7][2]=0.17;
736 anacutsval[7][3]=0.14;
737 anacutsval[7][4]=0.14;
738 anacutsval[7][5]=0.14;
739 anacutsval[7][6]=0.19;
740 anacutsval[7][7]=0.19;
741 anacutsval[7][8]=0.19;
742 anacutsval[7][9]=0.19;
743
744 anacutsval[8][0]=0.8;
745 anacutsval[8][1]=0.8;
746 anacutsval[8][2]=1.1;
747 anacutsval[8][3]=0.5;
748 anacutsval[8][4]=0.5;
749 anacutsval[8][5]=2.0;
750 anacutsval[8][6]=2.0;
751 anacutsval[8][7]=2.0;
752 anacutsval[8][8]=2.0;
753 anacutsval[8][9]=2.0;
754
755 anacutsval[9][0]=0.995;
756 anacutsval[9][1]=0.995;
757 anacutsval[9][2]=0.997;
758 anacutsval[9][3]=0.998;
759 anacutsval[9][4]= 0.998;
760 anacutsval[9][5]=0.997;
761 anacutsval[9][6]=0.997;
762 anacutsval[9][7]=0.997;
763 anacutsval[9][8]=0.997;
764 anacutsval[9][9]=0.997;
765
766
767
768
769
770 anacutsval[10][0]=0.0055;
771 anacutsval[10][1]=0.0055;
772 anacutsval[10][2]= 0.0028;
773 anacutsval[10][3]=0.000883;
774 anacutsval[10][4]=0.000883;
775 anacutsval[10][5]=0.000883;
776 anacutsval[10][6]=0.000883;
777 anacutsval[10][7]=0.000883;
778 anacutsval[10][8]=0.000883;
779 anacutsval[10][9]=0.000883;
370f7180 780
62ad0d28 781
782
783
784
370f7180 785 SetPtBins(nptbins+1,ptbins);
786 SetCuts(nvars,nptbins,anacutsval);
787 SetUsePID(kTRUE);
5bccd3e8 788 SetMinCentrality(0.);
789 SetMaxCentrality(20.);
790 SetUseCentrality(AliRDHFCuts::kCentV0M);
370f7180 791 SetRemoveDaughtersFromPrim(kFALSE);
62ad0d28 792 SetOptPileup(kFALSE);
793 SetMinPtCandidate(4.);
794 SetMaxPtCandidate(10000.);
795
370f7180 796 PrintAll();
797
7a29658d 798 for(Int_t iic=0;iic<nvars;iic++){delete [] anacutsval[iic];}
e11ae259 799 delete [] anacutsval;
800 anacutsval=NULL;
801
802 delete [] ptbins;
803 ptbins=NULL;
804
370f7180 805 return;
806}