1 /**************************************************************************
2 * Copyright(c) 1998-2010, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
18 /////////////////////////////////////////////////////////////
20 // Class for cuts on AOD reconstructed D+->Kpipi
22 // Author: R. Bala, bala@to.infn.it
23 // G. Ortona, ortona@to.infn.it
24 /////////////////////////////////////////////////////////////
26 #include <TDatabasePDG.h>
27 #include <Riostream.h>
29 #include "AliAODPidHF.h"
30 #include "AliRDHFCutsDplustoKpipi.h"
31 #include "AliAODRecoDecayHF3Prong.h"
32 #include "AliAODTrack.h"
33 #include "AliESDtrack.h"
36 ClassImp(AliRDHFCutsDplustoKpipi)
38 //--------------------------------------------------------------------------
39 AliRDHFCutsDplustoKpipi::AliRDHFCutsDplustoKpipi(const char* name) :
45 fUseImpParProdCorrCut(kFALSE)
48 // Default Constructor
52 TString varNames[14]={"inv. mass [GeV]",
55 "d0K [cm] lower limit!",
56 "d0Pi [cm] lower limit!",
60 "pM=Max{pT1,pT2,pT3} (GeV/c)",
66 Bool_t isUpperCut[14]={kTRUE,
80 SetVarNames(nvars,varNames,isUpperCut);
81 Bool_t forOpt[14]={kFALSE,
95 SetVarsForOpt(7,forOpt);
96 Float_t limits[2]={0,999999999.};
98 if(fPidHF)delete fPidHF;
99 fPidHF=new AliAODPidHF();
100 Double_t plim[2]={0.6,0.8};
101 Double_t nsigma[5]={2.,1.,2.,3.,0.};
103 fPidHF->SetPLimit(plim);
104 fPidHF->SetAsym(kTRUE);
105 fPidHF->SetSigma(nsigma);
111 fPidHF->SetCompat(kTRUE);
123 //--------------------------------------------------------------------------
124 AliRDHFCutsDplustoKpipi::AliRDHFCutsDplustoKpipi(const AliRDHFCutsDplustoKpipi &source) :
126 fUseStrongPid(source.fUseStrongPid),
127 fMaxPtStrongPid(source.fMaxPtStrongPid),
128 fMaxPStrongPidK(source.fMaxPStrongPidK),
129 fMaxPStrongPidpi(source.fMaxPStrongPidpi),
130 fUseImpParProdCorrCut(source.fUseImpParProdCorrCut)
137 //--------------------------------------------------------------------------
138 AliRDHFCutsDplustoKpipi &AliRDHFCutsDplustoKpipi::operator=(const AliRDHFCutsDplustoKpipi &source)
141 // assignment operator
143 if(&source == this) return *this;
145 AliRDHFCuts::operator=(source);
147 fUseStrongPid=source.fUseStrongPid;
148 fMaxPtStrongPid=source.fMaxPtStrongPid;
149 fMaxPStrongPidK=source.fMaxPStrongPidK;
150 fMaxPStrongPidpi=source.fMaxPStrongPidpi;
151 fUseImpParProdCorrCut=source.fUseImpParProdCorrCut;
158 //---------------------------------------------------------------------------
159 void AliRDHFCutsDplustoKpipi::GetCutVarsForOpt(AliAODRecoDecayHF *d,Float_t *vars,Int_t nvars,Int_t *pdgdaughters,AliAODEvent *aod) {
161 // Fills in vars the values of the variables
165 if(nvars!=fnVarsForOpt) {
166 printf("AliRDHFCutsDplustoKpipi::GetCutsVarsForOpt: wrong number of variables\n");
170 AliAODRecoDecayHF3Prong *dd = (AliAODRecoDecayHF3Prong*)d;
172 //recalculate vertex w/o daughters
173 Bool_t cleanvtx=kFALSE;
174 AliAODVertex *origownvtx=0x0;
175 if(fRemoveDaughtersFromPrimary) {
176 if(dd->GetOwnPrimaryVtx()) origownvtx=new AliAODVertex(*dd->GetOwnPrimaryVtx());
178 if(!RecalcOwnPrimaryVtx(dd,aod)) {
179 CleanOwnPrimaryVtx(dd,aod,origownvtx);
187 vars[iter]=dd->InvMassDplus();
191 for(Int_t iprong=0;iprong<3;iprong++){
192 if(TMath::Abs(pdgdaughters[iprong])==321) {
193 vars[iter]=dd->PtProng(iprong);
199 Float_t minPtDau=1000000.0;
200 for(Int_t iprong=0;iprong<3;iprong++){
201 if(TMath::Abs(pdgdaughters[iprong])==211) {
202 if(dd->PtProng(iprong)<minPtDau){
203 minPtDau=dd->PtProng(iprong);
211 for(Int_t iprong=0;iprong<3;iprong++){
212 if(TMath::Abs(pdgdaughters[iprong])==321) {
213 vars[iter]=dd->Getd0Prong(iprong);
219 Float_t minImpParDau=1000000.0;
220 for(Int_t iprong=0;iprong<3;iprong++){
221 if(TMath::Abs(pdgdaughters[iprong])==211) {
222 if(dd->Getd0Prong(iprong)<minImpParDau){
223 minImpParDau=dd->Getd0Prong(iprong);
227 vars[iter]=minImpParDau;
231 Float_t dist12 = dd->GetDist12toPrim();
232 Float_t dist23 = dd->GetDist23toPrim();
233 if(dist12<dist23)vars[iter]=dist12;
234 else vars[iter]=dist23;
238 vars[iter]=dd->GetSigmaVert(aod);
242 vars[iter] = dd->DecayLength();
247 for(Int_t i=0;i<3;i++){
248 if(dd->PtProng(i)>ptmax)ptmax=dd->PtProng(i);
254 vars[iter]=dd->CosPointingAngle();
258 vars[iter]=dd->Getd0Prong(0)*dd->Getd0Prong(0)+dd->Getd0Prong(1)*dd->Getd0Prong(1)+dd->Getd0Prong(2)*dd->Getd0Prong(2);
263 for(Int_t iprong=0;iprong<3;iprong++){
264 if(dd->GetDCA(iprong)<maxDCA){
265 maxDCA=dd->GetDCA(iprong);
272 vars[iter]=dd->NormalizedDecayLengthXY()*dd->P()/dd->Pt();
276 vars[iter]=dd->CosPointingAngleXY();
279 if(cleanvtx)CleanOwnPrimaryVtx(dd,aod,origownvtx);
283 //---------------------------------------------------------------------------
284 Bool_t AliRDHFCutsDplustoKpipi::IsInFiducialAcceptance(Double_t pt, Double_t y) const
287 // Checking if Dplus is in fiducial acceptance region
291 // applying cut for pt > 5 GeV
292 AliDebug(2,Form("pt of D+ = %f (> 5), cutting at |y| < 0.8",pt));
293 if (TMath::Abs(y) > 0.8) return kFALSE;
296 // appliying smooth cut for pt < 5 GeV
297 Double_t maxFiducialY = -0.2/15*pt*pt+1.9/15*pt+0.5;
298 Double_t minFiducialY = 0.2/15*pt*pt-1.9/15*pt-0.5;
299 AliDebug(2,Form("pt of D+ = %f (< 5), cutting according to the fiducial zone [%f, %f]\n",pt,minFiducialY,maxFiducialY));
300 if (y < minFiducialY || y > maxFiducialY) return kFALSE;
306 //---------------------------------------------------------------------------
307 Int_t AliRDHFCutsDplustoKpipi::GetPIDBitMask(AliAODRecoDecayHF *rd)
309 if(!fUsePID || !rd) return -1;
310 //if(fUsePID)printf("i am inside the pid \n");
312 Int_t sign=rd->GetCharge();
313 for(Int_t daught=0;daught<3;daught++){
314 AliAODTrack *track=(AliAODTrack*)rd->GetDaughter(daught);
316 if(sign==track->Charge()){//pions
317 Int_t isPion=fPidHF->MakeRawPid(track,AliPID::kPion);
318 if(isPion==0)mask+=1;
319 else if(isPion>0)mask+=3;
323 Int_t isKaon=fPidHF->MakeRawPid(track,AliPID::kKaon);
324 if(isKaon==0)mask+=1;
325 else if(isKaon>0)mask+=3;
332 //---------------------------------------------------------------------------
333 Int_t AliRDHFCutsDplustoKpipi::IsSelectedPID(AliAODRecoDecayHF *rd)
336 // PID selection, returns 3 if accepted, 0 if not accepted
338 if(!fUsePID || !rd) return 3;
339 //if(fUsePID)printf("i am inside the pid \n");
342 Int_t sign= rd->GetCharge();
343 for(Int_t daught=0;daught<3;daught++){
344 AliAODTrack *track=(AliAODTrack*)rd->GetDaughter(daught);
345 Int_t isPion=fPidHF->MakeRawPid(track,AliPID::kPion);
346 Int_t isKaon=fPidHF->MakeRawPid(track,AliPID::kKaon);
347 Int_t isProton=fPidHF->MakeRawPid(track,AliPID::kProton);
349 if(isProton>0 && isKaon<0 && isPion<0) return 0;
350 if(isKaon>0 && isPion<0) nkaons++;
351 if(isKaon<0) nNotKaons++;
352 if(sign==track->Charge()){//pions
353 if(isPion<0)return 0;
354 if(rd->Pt()<fMaxPtStrongPid && isPion<=0 && fUseStrongPid&2 && track->P()<fMaxPStrongPidpi)return 0;
357 if(isKaon<0)return 0;
358 if(rd->Pt()<fMaxPtStrongPid && isKaon<=0 && fUseStrongPid&1&& track->P()<fMaxPStrongPidK)return 0;
362 if(nkaons>1)return 0;
363 if(nNotKaons==3)return 0;
369 //---------------------------------------------------------------------------
370 Int_t AliRDHFCutsDplustoKpipi::IsSelected(TObject* obj,Int_t selectionLevel, AliAODEvent* aod) {
372 // Apply selection, returns 3 if accepted, 0 if not accepted
380 cout<<"Cut matrix not inizialized. Exit..."<<endl;
384 AliAODRecoDecayHF3Prong* d=(AliAODRecoDecayHF3Prong*)obj;
388 cout<<"AliAODRecoDecayHF3Prong null"<<endl;
392 if(fKeepSignalMC) if(IsSignalMC(d,aod,411)) return 3;
395 Int_t returnvaluePID=3;
396 Int_t returnvalueCuts=3;
399 if(pt<fMinPtCand) return 0;
400 if(pt>fMaxPtCand) return 0;
402 if(d->HasBadDaughters()) return 0;
404 // selection on candidate
405 if(selectionLevel==AliRDHFCuts::kAll ||
406 selectionLevel==AliRDHFCuts::kCandidate) {
408 //recalculate vertex w/o daughters
409 AliAODVertex *origownvtx=0x0;
410 if(fRemoveDaughtersFromPrimary) {
411 if(d->GetOwnPrimaryVtx()) origownvtx=new AliAODVertex(*d->GetOwnPrimaryVtx());
412 if(!RecalcOwnPrimaryVtx(d,aod)) {
413 CleanOwnPrimaryVtx(d,aod,origownvtx);
418 Int_t ptbin=PtBin(pt);
420 CleanOwnPrimaryVtx(d,aod,origownvtx);
424 Double_t mDplusPDG = TDatabasePDG::Instance()->GetParticle(411)->Mass();
425 Double_t mDplus=d->InvMassDplus();
426 if(TMath::Abs(mDplus-mDplusPDG)>fCutsRD[GetGlobalIndex(0,ptbin)]) {CleanOwnPrimaryVtx(d,aod,origownvtx); return 0;}
429 if(d->GetDist12toPrim()<fCutsRD[GetGlobalIndex(5,ptbin)]|| d->GetDist23toPrim()<fCutsRD[GetGlobalIndex(5,ptbin)]) {CleanOwnPrimaryVtx(d,aod,origownvtx); return 0;}
431 Double_t sum2=d->Getd0Prong(0)*d->Getd0Prong(0)+d->Getd0Prong(1)*d->Getd0Prong(1)+d->Getd0Prong(2)*d->Getd0Prong(2);
432 if(sum2<fCutsRD[GetGlobalIndex(10,ptbin)]) {CleanOwnPrimaryVtx(d,aod,origownvtx); return 0;}
434 if(fUseImpParProdCorrCut){
435 if(d->Getd0Prong(0)*d->Getd0Prong(1)<0. && d->Getd0Prong(2)*d->Getd0Prong(1)<0.) {CleanOwnPrimaryVtx(d,aod,origownvtx); return 0;}
440 for(Int_t i=0;i<3;i++) if(d->GetDCA(i)>fCutsRD[GetGlobalIndex(11,ptbin)]) {CleanOwnPrimaryVtx(d,aod,origownvtx); return 0;}
442 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
444 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
446 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
448 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;}
450 if(d->DecayLength2()<fCutsRD[GetGlobalIndex(7,ptbin)]*fCutsRD[GetGlobalIndex(7,ptbin)]) {CleanOwnPrimaryVtx(d,aod,origownvtx); return 0;}
452 if(d->CosPointingAngle()< fCutsRD[GetGlobalIndex(9,ptbin)]) {CleanOwnPrimaryVtx(d,aod,origownvtx); return 0;}
454 if(d->NormalizedDecayLengthXY()*d->P()/pt<fCutsRD[GetGlobalIndex(12,ptbin)]){CleanOwnPrimaryVtx(d,aod,origownvtx); return 0;}
456 if(d->CosPointingAngleXY()<fCutsRD[GetGlobalIndex(13,ptbin)]){CleanOwnPrimaryVtx(d,aod,origownvtx); return 0;}
459 Double_t sigmavert=d->GetSigmaVert(aod);
460 if(sigmavert>fCutsRD[GetGlobalIndex(6,ptbin)]) {CleanOwnPrimaryVtx(d,aod,origownvtx); return 0;}
462 // unset recalculated primary vertex when not needed any more
463 CleanOwnPrimaryVtx(d,aod,origownvtx);
465 fIsSelectedCuts=returnvalueCuts;
467 //if(!returnvalueCuts) return 0; // returnvalueCuts cannot be 0 here
470 if(selectionLevel==AliRDHFCuts::kAll ||
471 selectionLevel==AliRDHFCuts::kCandidate ||
472 selectionLevel==AliRDHFCuts::kPID) {
473 returnvaluePID = IsSelectedPID(d);
474 fIsSelectedPID=returnvaluePID;
476 if(returnvaluePID==0)return 0;
478 // selection on daughter tracks
479 if(selectionLevel==AliRDHFCuts::kAll ||
480 selectionLevel==AliRDHFCuts::kTracks) {
481 if(!AreDaughtersSelected(d)) return 0;
493 //---------------------------------------------------------------------------
496 void AliRDHFCutsDplustoKpipi::SetStandardCutsPP2010() {
498 //STANDARD CUTS USED FOR 2010 pp analysis
501 SetName("DplustoKpipiCutsStandard");
502 SetTitle("Standard Cuts for D+ analysis");
505 SetOptPileup(AliRDHFCuts::kRejectPileupEvent);
510 AliESDtrackCuts* esdTrackCuts=new AliESDtrackCuts();
511 esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
513 esdTrackCuts->SetRequireTPCRefit(kTRUE);
514 esdTrackCuts->SetRequireITSRefit(kTRUE);
515 //esdTrackCuts->SetMinNClustersITS(4); // default is 5
516 esdTrackCuts->SetMinNClustersTPC(70);
517 esdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD,
518 AliESDtrackCuts::kAny);
519 // default is kBoth, otherwise kAny
520 esdTrackCuts->SetMinDCAToVertexXY(0.);
521 esdTrackCuts->SetPtRange(0.3,1.e10);
523 AddTrackCuts(esdTrackCuts);
526 const Int_t nptbins =15;
527 const Int_t nvars=14;
528 Float_t ptbins[nptbins+1];
547 Float_t** anacutsval;
548 anacutsval=new Float_t*[nvars];
550 for(Int_t ic=0;ic<nvars;ic++){anacutsval[ic]=new Float_t[nptbins];}
552 //Double_t cutsDplus[12]={0.2,0.4,0.4,0.,0.,0.01,0.06,0.02,0.,0.85,0.,10000000000.};
553 for(Int_t ipt=0;ipt<nptbins;ipt++){
554 anacutsval[0][ipt]=0.2;
555 anacutsval[3][ipt]=0.;
556 anacutsval[4][ipt]=0.;
557 anacutsval[5][ipt]=0.01;
558 anacutsval[11][ipt]=10000000000.;
561 anacutsval[1][0]=0.3;
562 anacutsval[1][1]=0.4;
563 anacutsval[1][2]=0.4;
564 anacutsval[2][0]=0.3;
565 anacutsval[2][1]=0.3;
566 anacutsval[2][2]=0.4;
567 for(Int_t ipt=3;ipt<nptbins;ipt++){
568 anacutsval[1][ipt]=0.4;
569 anacutsval[2][ipt]=0.4;
572 anacutsval[6][0]=0.022100;
573 anacutsval[6][1]=0.022100;
574 anacutsval[6][2]=0.034;
575 anacutsval[6][3]=0.020667;
576 anacutsval[6][4]=0.020667;
577 anacutsval[6][5]=0.023333;
580 anacutsval[7][0]=0.08;
581 anacutsval[7][1]=0.08;
582 anacutsval[7][2]=0.09;
583 anacutsval[7][3]=0.095;
584 anacutsval[7][4]=0.095;
586 anacutsval[8][0]=0.5;
587 anacutsval[8][1]=0.5;
588 anacutsval[8][2]=1.0;
589 anacutsval[8][3]=0.5;
590 anacutsval[8][4]=0.5;
593 anacutsval[9][0]=0.97;
594 anacutsval[9][1]=0.936;
595 anacutsval[9][2]=0.95;
596 anacutsval[9][3]=0.95;
597 anacutsval[9][4]= 0.95;
598 anacutsval[9][5]=0.92;
599 anacutsval[9][6]=0.92;
600 anacutsval[9][7]=0.92;
601 anacutsval[9][8]=0.92;
602 anacutsval[9][9]=0.90;
603 for(Int_t ipt=10;ipt<nptbins;ipt++){
604 anacutsval[9][ipt]=0.90;
608 anacutsval[10][0]=0.0055;
609 anacutsval[10][1]=0.0055;
610 anacutsval[10][2]= 0.0028;
611 anacutsval[10][3]=0.000883;
612 anacutsval[10][4]=0.000883;
615 for(Int_t ipt=5;ipt<nptbins;ipt++){
616 anacutsval[6][ipt]=0.02333;
617 anacutsval[7][ipt]=0.115;
618 anacutsval[8][ipt]=0.5;
619 anacutsval[10][ipt]=0.000883;
625 anacutsval[13][0]=0.98;
626 anacutsval[13][1]=0.98;
627 for(Int_t ipt=2;ipt<nptbins;ipt++){
628 anacutsval[12][ipt]=0.;
629 anacutsval[13][ipt]=0.;
634 SetGlobalIndex(nvars,nptbins);
635 SetPtBins(nptbins+1,ptbins);
636 SetCuts(nvars,nptbins,anacutsval);
638 SetRemoveDaughtersFromPrim(kTRUE);
642 for(Int_t iic=0;iic<nvars;iic++){delete [] anacutsval[iic];}
643 delete [] anacutsval;
650 void AliRDHFCutsDplustoKpipi::SetStandardCutsPbPb2010() {
652 //STANDARD CUTS USED FOR 2010 Pb Pb analysis.... not optimized yet
655 SetName("DplustoKpipiCutsStandard");
656 SetTitle("Standard Cuts for D+ analysis in PbPb2010 run");
659 //SetOptPileup(AliRDHFCuts::kRejectPileupEvent);
665 AliESDtrackCuts* esdTrackCuts=new AliESDtrackCuts();
666 esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
668 esdTrackCuts->SetRequireTPCRefit(kTRUE);
669 esdTrackCuts->SetRequireITSRefit(kTRUE);
670 //esdTrackCuts->SetMinNClustersITS(4); // default is 5
671 esdTrackCuts->SetMinNClustersTPC(70);
672 esdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD,
673 AliESDtrackCuts::kAny);
674 // default is kBoth, otherwise kAny
675 esdTrackCuts->SetMinDCAToVertexXY(0.);
676 esdTrackCuts->SetPtRange(0.8,1.e10);
678 AddTrackCuts(esdTrackCuts);
680 const Int_t nptbins=10;
682 ptbins=new Float_t[nptbins+1];
695 const Int_t nvars=14;
697 Float_t** anacutsval;
698 anacutsval=new Float_t*[nvars];
700 for(Int_t ic=0;ic<nvars;ic++){anacutsval[ic]=new Float_t[nptbins];}
701 //Double_t cutsDplus[12]={0.2,0.4,0.4,0.,0.,0.01,0.06,0.02,0.,0.85,0.,10000000000.};
703 for(Int_t ipt=0;ipt<nptbins;ipt++){
704 anacutsval[0][ipt]=0.2;
705 anacutsval[1][ipt]=0.8;
706 anacutsval[2][ipt]=0.8;
707 anacutsval[3][ipt]=0.;
708 anacutsval[4][ipt]=0.;
709 anacutsval[5][ipt]=0.01;
710 anacutsval[11][ipt]=10000000000.;
711 anacutsval[12][ipt]=0.;
712 anacutsval[13][ipt]=0.;
714 anacutsval[1][5]=0.9;
716 anacutsval[6][0]=0.022100;
717 anacutsval[6][1]=0.022100;
718 anacutsval[6][2]=0.034;
719 anacutsval[6][3]=0.020667;
720 anacutsval[6][4]=0.020667;
721 anacutsval[6][5]=0.023333;
723 anacutsval[7][0]=0.08;
724 anacutsval[7][1]=0.08;
725 anacutsval[7][2]=0.17;
726 anacutsval[7][3]=0.14;
727 anacutsval[7][4]=0.14;
728 anacutsval[7][5]=0.19;
730 anacutsval[8][0]=0.8;
731 anacutsval[8][1]=0.8;
732 anacutsval[8][2]=1.1;
733 anacutsval[8][3]=0.5;
734 anacutsval[8][4]=0.5;
735 anacutsval[8][5]=0.5;
737 anacutsval[9][0]=0.995;
738 anacutsval[9][1]=0.995;
739 anacutsval[9][2]=0.997;
740 anacutsval[9][3]=0.998;
741 anacutsval[9][4]=0.998;
742 anacutsval[9][5]=0.995;
744 anacutsval[10][0]=0.0055;
745 anacutsval[10][1]=0.0055;
746 anacutsval[10][2]= 0.0028;
747 anacutsval[10][3]=0.000883;
748 anacutsval[10][4]=0.000883;
749 anacutsval[10][5]=0.000883;
751 anacutsval[12][5]=12.;
752 anacutsval[13][5]=0.998571;
753 anacutsval[12][6]=10.;
754 anacutsval[13][6]=0.997143;
756 for(Int_t ipt=6;ipt<nptbins;ipt++){
757 anacutsval[6][ipt]=0.02333;
758 anacutsval[7][ipt]=0.19;
759 anacutsval[8][ipt]=2.0;
760 anacutsval[9][ipt]=0.997;
761 anacutsval[10][ipt]=0.000883;
763 anacutsval[7][6]=0.14;
764 anacutsval[9][6]=0.995;
766 SetPtBins(nptbins+1,ptbins);
767 SetCuts(nvars,nptbins,anacutsval);
769 SetMinCentrality(1E-10);
770 SetMaxCentrality(20.);
771 SetUseCentrality(AliRDHFCuts::kCentV0M);
772 SetRemoveDaughtersFromPrim(kFALSE);
776 for(Int_t iic=0;iic<nvars;iic++){delete [] anacutsval[iic];}
777 delete [] anacutsval;
787 void AliRDHFCutsDplustoKpipi::SetStandardCutsPbPb2011() {
789 // Default 2010 PbPb cut object
790 SetStandardCutsPbPb2010();
792 // Enable all 2011 PbPb run triggers
795 ResetMaskAndEnableMBTrigger();
796 EnableCentralTrigger();
797 EnableSemiCentralTrigger();
800 //--------------------------------------------------------------------------
802 UInt_t AliRDHFCutsDplustoKpipi::GetPIDTrackTPCTOFBitMap(AliAODTrack *track) const{
806 Double_t sigmaTPCPionHyp=-999.;
807 Double_t sigmaTPCKaonHyp=-999.;
808 Double_t sigmaTPCProtonHyp=-999.;
809 Double_t sigmaTOFPionHyp=-999.;
810 Double_t sigmaTOFKaonHyp=-999.;
811 Double_t sigmaTOFProtonHyp=-999.;
813 Int_t oksigmaTPCPionHyp=fPidHF->GetnSigmaTPC(track,2,sigmaTPCPionHyp);
814 Int_t oksigmaTPCKaonHyp=fPidHF->GetnSigmaTPC(track,3,sigmaTPCKaonHyp);
815 Int_t oksigmaTPCProtonHyp=fPidHF->GetnSigmaTPC(track,4,sigmaTPCProtonHyp);
816 Int_t oksigmaTOFPionHyp=fPidHF->GetnSigmaTOF(track,2,sigmaTOFPionHyp);
817 Int_t oksigmaTOFKaonHyp=fPidHF->GetnSigmaTOF(track,3,sigmaTOFKaonHyp);
818 Int_t oksigmaTOFProtonHyp=fPidHF->GetnSigmaTOF(track,4,sigmaTOFProtonHyp);
820 if (oksigmaTPCPionHyp && sigmaTPCPionHyp>0.){
821 if (sigmaTPCPionHyp<1.) bitmap+=1<<kTPCPionLess1;
823 if (sigmaTPCPionHyp<2.) bitmap+=1<<kTPCPionMore1Less2;
825 if (sigmaTPCPionHyp<3.) bitmap+=1<<kTPCPionMore2Less3;
826 else bitmap+=1<<kTPCPionMore3;
831 if (oksigmaTPCKaonHyp && sigmaTPCKaonHyp>0.){
832 if (sigmaTPCKaonHyp<1.) bitmap+=1<<kTPCKaonLess1;
834 if (sigmaTPCKaonHyp<2.) bitmap+=1<<kTPCKaonMore1Less2;
836 if (sigmaTPCKaonHyp<3.) bitmap+=1<<kTPCKaonMore2Less3;
837 else bitmap+=1<<kTPCKaonMore3;
842 if (oksigmaTPCProtonHyp && sigmaTPCProtonHyp>0.){
843 if (sigmaTPCProtonHyp<1.) bitmap+=1<<kTPCProtonLess1;
845 if (sigmaTPCProtonHyp<2.) bitmap+=1<<kTPCProtonMore1Less2;
847 if (sigmaTPCProtonHyp<3.) bitmap+=1<<kTPCProtonMore2Less3;
848 else bitmap+=1<<kTPCProtonMore3;
853 if (oksigmaTOFPionHyp && sigmaTOFPionHyp>0.){
854 if (sigmaTOFPionHyp<1.) bitmap+=1<<kTOFPionLess1;
856 if (sigmaTOFPionHyp<2.) bitmap+=1<<kTOFPionMore1Less2;
858 if (sigmaTOFPionHyp<3.) bitmap+=1<<kTOFPionMore2Less3;
859 else bitmap+=1<<kTOFPionMore3;
864 if (oksigmaTOFKaonHyp && sigmaTOFKaonHyp>0.){
865 if (sigmaTOFKaonHyp<1.) bitmap+=1<<kTOFKaonLess1;
867 if (sigmaTOFKaonHyp<2.) bitmap+=1<<kTOFKaonMore1Less2;
869 if (sigmaTOFKaonHyp<3.) bitmap+=1<<kTOFKaonMore2Less3;
870 else bitmap+=1<<kTOFKaonMore3;
875 if (oksigmaTOFProtonHyp && sigmaTOFProtonHyp>0.){
876 if (sigmaTOFProtonHyp<1.) bitmap+=1<<kTOFProtonLess1;
878 if (sigmaTOFProtonHyp<2.) bitmap+=1<<kTOFProtonMore1Less2;
880 if (sigmaTOFProtonHyp<3.) bitmap+=1<<kTOFProtonMore2Less3;
881 else bitmap+=1<<kTOFProtonMore3;