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"
39 ClassImp(AliRDHFCutsDplustoKpipi)
41 //--------------------------------------------------------------------------
42 AliRDHFCutsDplustoKpipi::AliRDHFCutsDplustoKpipi(const char* name) :
48 fUseImpParProdCorrCut(kFALSE)
51 // Default Constructor
55 TString varNames[14]={"inv. mass [GeV]",
58 "d0K [cm] lower limit!",
59 "d0Pi [cm] lower limit!",
63 "pM=Max{pT1,pT2,pT3} (GeV/c)",
69 Bool_t isUpperCut[14]={kTRUE,
83 SetVarNames(nvars,varNames,isUpperCut);
84 Bool_t forOpt[14]={kFALSE,
98 SetVarsForOpt(7,forOpt);
99 Float_t limits[2]={0,999999999.};
101 if(fPidHF)delete fPidHF;
102 fPidHF=new AliAODPidHF();
103 Double_t plim[2]={0.6,0.8};
104 Double_t nsigma[5]={2.,1.,2.,3.,0.};
106 fPidHF->SetPLimit(plim);
107 fPidHF->SetAsym(kTRUE);
108 fPidHF->SetSigma(nsigma);
114 fPidHF->SetCompat(kTRUE);
126 //--------------------------------------------------------------------------
127 AliRDHFCutsDplustoKpipi::AliRDHFCutsDplustoKpipi(const AliRDHFCutsDplustoKpipi &source) :
129 fUseStrongPid(source.fUseStrongPid),
130 fMaxPtStrongPid(source.fMaxPtStrongPid),
131 fMaxPStrongPidK(source.fMaxPStrongPidK),
132 fMaxPStrongPidpi(source.fMaxPStrongPidpi),
133 fUseImpParProdCorrCut(source.fUseImpParProdCorrCut)
140 //--------------------------------------------------------------------------
141 AliRDHFCutsDplustoKpipi &AliRDHFCutsDplustoKpipi::operator=(const AliRDHFCutsDplustoKpipi &source)
144 // assignment operator
146 if(&source == this) return *this;
148 AliRDHFCuts::operator=(source);
150 fUseStrongPid=source.fUseStrongPid;
151 fMaxPtStrongPid=source.fMaxPtStrongPid;
152 fMaxPStrongPidK=source.fMaxPStrongPidK;
153 fMaxPStrongPidpi=source.fMaxPStrongPidpi;
154 fUseImpParProdCorrCut=source.fUseImpParProdCorrCut;
161 //---------------------------------------------------------------------------
162 void AliRDHFCutsDplustoKpipi::GetCutVarsForOpt(AliAODRecoDecayHF *d,Float_t *vars,Int_t nvars,Int_t *pdgdaughters,AliAODEvent *aod) {
164 // Fills in vars the values of the variables
168 if(nvars!=fnVarsForOpt) {
169 printf("AliRDHFCutsDplustoKpipi::GetCutsVarsForOpt: wrong number of variables\n");
173 AliAODRecoDecayHF3Prong *dd = (AliAODRecoDecayHF3Prong*)d;
175 //recalculate vertex w/o daughters
176 Bool_t cleanvtx=kFALSE;
177 AliAODVertex *origownvtx=0x0;
178 if(fRemoveDaughtersFromPrimary) {
179 if(dd->GetOwnPrimaryVtx()) origownvtx=new AliAODVertex(*dd->GetOwnPrimaryVtx());
181 if(!RecalcOwnPrimaryVtx(dd,aod)) {
182 CleanOwnPrimaryVtx(dd,aod,origownvtx);
190 vars[iter]=dd->InvMassDplus();
194 for(Int_t iprong=0;iprong<3;iprong++){
195 if(TMath::Abs(pdgdaughters[iprong])==321) {
196 vars[iter]=dd->PtProng(iprong);
202 Float_t minPtDau=1000000.0;
203 for(Int_t iprong=0;iprong<3;iprong++){
204 if(TMath::Abs(pdgdaughters[iprong])==211) {
205 if(dd->PtProng(iprong)<minPtDau){
206 minPtDau=dd->PtProng(iprong);
214 for(Int_t iprong=0;iprong<3;iprong++){
215 if(TMath::Abs(pdgdaughters[iprong])==321) {
216 vars[iter]=dd->Getd0Prong(iprong);
222 Float_t minImpParDau=1000000.0;
223 for(Int_t iprong=0;iprong<3;iprong++){
224 if(TMath::Abs(pdgdaughters[iprong])==211) {
225 if(dd->Getd0Prong(iprong)<minImpParDau){
226 minImpParDau=dd->Getd0Prong(iprong);
230 vars[iter]=minImpParDau;
234 Float_t dist12 = dd->GetDist12toPrim();
235 Float_t dist23 = dd->GetDist23toPrim();
236 if(dist12<dist23)vars[iter]=dist12;
237 else vars[iter]=dist23;
241 vars[iter]=dd->GetSigmaVert(aod);
245 vars[iter] = dd->DecayLength();
250 for(Int_t i=0;i<3;i++){
251 if(dd->PtProng(i)>ptmax)ptmax=dd->PtProng(i);
257 vars[iter]=dd->CosPointingAngle();
261 vars[iter]=dd->Getd0Prong(0)*dd->Getd0Prong(0)+dd->Getd0Prong(1)*dd->Getd0Prong(1)+dd->Getd0Prong(2)*dd->Getd0Prong(2);
266 for(Int_t iprong=0;iprong<3;iprong++){
267 if(dd->GetDCA(iprong)<maxDCA){
268 maxDCA=dd->GetDCA(iprong);
275 vars[iter]=dd->NormalizedDecayLengthXY()*dd->P()/dd->Pt();
279 vars[iter]=dd->CosPointingAngleXY();
282 if(cleanvtx)CleanOwnPrimaryVtx(dd,aod,origownvtx);
286 //---------------------------------------------------------------------------
287 Bool_t AliRDHFCutsDplustoKpipi::IsInFiducialAcceptance(Double_t pt, Double_t y) const
290 // Checking if Dplus is in fiducial acceptance region
293 if(fMaxRapidityCand>-998.){
294 if(TMath::Abs(y) > fMaxRapidityCand) return kFALSE;
299 // applying cut for pt > 5 GeV
300 AliDebug(2,Form("pt of D+ = %f (> 5), cutting at |y| < 0.8",pt));
301 if (TMath::Abs(y) > 0.8) return kFALSE;
304 // appliying smooth cut for pt < 5 GeV
305 Double_t maxFiducialY = -0.2/15*pt*pt+1.9/15*pt+0.5;
306 Double_t minFiducialY = 0.2/15*pt*pt-1.9/15*pt-0.5;
307 AliDebug(2,Form("pt of D+ = %f (< 5), cutting according to the fiducial zone [%f, %f]\n",pt,minFiducialY,maxFiducialY));
308 if (y < minFiducialY || y > maxFiducialY) return kFALSE;
314 //---------------------------------------------------------------------------
315 Int_t AliRDHFCutsDplustoKpipi::GetPIDBitMask(AliAODRecoDecayHF *rd)
317 if(!fUsePID || !rd) return -1;
318 //if(fUsePID)printf("i am inside the pid \n");
320 Int_t sign=rd->GetCharge();
321 for(Int_t daught=0;daught<3;daught++){
322 AliAODTrack *track=(AliAODTrack*)rd->GetDaughter(daught);
324 if(sign==track->Charge()){//pions
325 Int_t isPion=fPidHF->MakeRawPid(track,AliPID::kPion);
326 if(isPion==0)mask+=1;
327 else if(isPion>0)mask+=3;
331 Int_t isKaon=fPidHF->MakeRawPid(track,AliPID::kKaon);
332 if(isKaon==0)mask+=1;
333 else if(isKaon>0)mask+=3;
340 //---------------------------------------------------------------------------
341 Int_t AliRDHFCutsDplustoKpipi::IsSelectedPID(AliAODRecoDecayHF *rd)
344 // PID selection, returns 3 if accepted, 0 if not accepted
346 if(!fUsePID || !rd) return 3;
347 //if(fUsePID)printf("i am inside the pid \n");
350 Int_t sign= rd->GetCharge();
351 for(Int_t daught=0;daught<3;daught++){
352 AliAODTrack *track=(AliAODTrack*)rd->GetDaughter(daught);
353 Int_t isPion=fPidHF->MakeRawPid(track,AliPID::kPion);
354 Int_t isKaon=fPidHF->MakeRawPid(track,AliPID::kKaon);
355 Int_t isProton=fPidHF->MakeRawPid(track,AliPID::kProton);
357 if(isProton>0 && isKaon<0 && isPion<0) return 0;
358 if(isKaon>0 && isPion<0) nkaons++;
359 if(isKaon<0) nNotKaons++;
360 if(sign==track->Charge()){//pions
361 if(isPion<0)return 0;
362 if(rd->Pt()<fMaxPtStrongPid && isPion<=0 && fUseStrongPid&2 && track->P()<fMaxPStrongPidpi)return 0;
365 if(isKaon<0)return 0;
366 if(rd->Pt()<fMaxPtStrongPid && isKaon<=0 && fUseStrongPid&1&& track->P()<fMaxPStrongPidK)return 0;
370 if(nkaons>1)return 0;
371 if(nNotKaons==3)return 0;
377 //---------------------------------------------------------------------------
378 Int_t AliRDHFCutsDplustoKpipi::IsSelected(TObject* obj,Int_t selectionLevel, AliAODEvent* aod) {
380 // Apply selection, returns 3 if accepted, 0 if not accepted
388 cout<<"Cut matrix not inizialized. Exit..."<<endl;
392 AliAODRecoDecayHF3Prong* d=(AliAODRecoDecayHF3Prong*)obj;
396 cout<<"AliAODRecoDecayHF3Prong null"<<endl;
400 if(fKeepSignalMC) if(IsSignalMC(d,aod,411)) return 3;
403 Int_t returnvaluePID=3;
404 Int_t returnvalueCuts=3;
407 if(pt<fMinPtCand) return 0;
408 if(pt>fMaxPtCand) return 0;
410 if(fUseTrackSelectionWithFilterBits && d->HasBadDaughters()) return 0;
412 // selection on candidate
413 if(selectionLevel==AliRDHFCuts::kAll ||
414 selectionLevel==AliRDHFCuts::kCandidate) {
416 //recalculate vertex w/o daughters
417 AliAODVertex *origownvtx=0x0;
418 if(fRemoveDaughtersFromPrimary && !fUseMCVertex) {
419 if(d->GetOwnPrimaryVtx()) origownvtx=new AliAODVertex(*d->GetOwnPrimaryVtx());
420 if(!RecalcOwnPrimaryVtx(d,aod)) {
421 CleanOwnPrimaryVtx(d,aod,origownvtx);
427 if(d->GetOwnPrimaryVtx()) origownvtx=new AliAODVertex(*d->GetOwnPrimaryVtx());
428 if(!SetMCPrimaryVtx(d,aod)) {
429 CleanOwnPrimaryVtx(d,aod,origownvtx);
434 Int_t ptbin=PtBin(pt);
436 CleanOwnPrimaryVtx(d,aod,origownvtx);
440 Double_t mDplusPDG = TDatabasePDG::Instance()->GetParticle(411)->Mass();
441 Double_t mDplus=d->InvMassDplus();
442 if(TMath::Abs(mDplus-mDplusPDG)>fCutsRD[GetGlobalIndex(0,ptbin)]) {CleanOwnPrimaryVtx(d,aod,origownvtx); return 0;}
445 if(d->GetDist12toPrim()<fCutsRD[GetGlobalIndex(5,ptbin)]|| d->GetDist23toPrim()<fCutsRD[GetGlobalIndex(5,ptbin)]) {CleanOwnPrimaryVtx(d,aod,origownvtx); return 0;}
447 Double_t sum2=d->Getd0Prong(0)*d->Getd0Prong(0)+d->Getd0Prong(1)*d->Getd0Prong(1)+d->Getd0Prong(2)*d->Getd0Prong(2);
448 if(sum2<fCutsRD[GetGlobalIndex(10,ptbin)]) {CleanOwnPrimaryVtx(d,aod,origownvtx); return 0;}
450 if(fUseImpParProdCorrCut){
451 if(d->Getd0Prong(0)*d->Getd0Prong(1)<0. && d->Getd0Prong(2)*d->Getd0Prong(1)<0.) {CleanOwnPrimaryVtx(d,aod,origownvtx); return 0;}
456 for(Int_t i=0;i<3;i++) if(d->GetDCA(i)>fCutsRD[GetGlobalIndex(11,ptbin)]) {CleanOwnPrimaryVtx(d,aod,origownvtx); return 0;}
458 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
460 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
462 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
464 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;}
466 if(d->DecayLength2()<fCutsRD[GetGlobalIndex(7,ptbin)]*fCutsRD[GetGlobalIndex(7,ptbin)]) {CleanOwnPrimaryVtx(d,aod,origownvtx); return 0;}
468 if(d->CosPointingAngle()< fCutsRD[GetGlobalIndex(9,ptbin)]) {CleanOwnPrimaryVtx(d,aod,origownvtx); return 0;}
470 if(d->NormalizedDecayLengthXY()*d->P()/pt<fCutsRD[GetGlobalIndex(12,ptbin)]){CleanOwnPrimaryVtx(d,aod,origownvtx); return 0;}
472 if(d->CosPointingAngleXY()<fCutsRD[GetGlobalIndex(13,ptbin)]){CleanOwnPrimaryVtx(d,aod,origownvtx); return 0;}
475 Double_t sigmavert=d->GetSigmaVert(aod);
476 if(sigmavert>fCutsRD[GetGlobalIndex(6,ptbin)]) {CleanOwnPrimaryVtx(d,aod,origownvtx); return 0;}
478 // unset recalculated primary vertex when not needed any more
479 CleanOwnPrimaryVtx(d,aod,origownvtx);
481 fIsSelectedCuts=returnvalueCuts;
483 //if(!returnvalueCuts) return 0; // returnvalueCuts cannot be 0 here
486 if(selectionLevel==AliRDHFCuts::kAll ||
487 selectionLevel==AliRDHFCuts::kCandidate ||
488 selectionLevel==AliRDHFCuts::kPID) {
489 returnvaluePID = IsSelectedPID(d);
490 fIsSelectedPID=returnvaluePID;
492 if(returnvaluePID==0)return 0;
494 // selection on daughter tracks
495 if(selectionLevel==AliRDHFCuts::kAll ||
496 selectionLevel==AliRDHFCuts::kTracks) {
497 if(!AreDaughtersSelected(d)) return 0;
509 //---------------------------------------------------------------------------
512 void AliRDHFCutsDplustoKpipi::SetStandardCutsPP2010() {
514 //STANDARD CUTS USED FOR 2010 pp analysis
517 SetName("DplustoKpipiCutsStandard");
518 SetTitle("Standard Cuts for D+ analysis");
521 SetOptPileup(AliRDHFCuts::kRejectPileupEvent);
526 AliESDtrackCuts* esdTrackCuts=new AliESDtrackCuts();
527 esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
529 esdTrackCuts->SetRequireTPCRefit(kTRUE);
530 esdTrackCuts->SetRequireITSRefit(kTRUE);
531 //esdTrackCuts->SetMinNClustersITS(4); // default is 5
532 esdTrackCuts->SetMinNClustersTPC(70);
533 esdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD,
534 AliESDtrackCuts::kAny);
535 // default is kBoth, otherwise kAny
536 esdTrackCuts->SetMinDCAToVertexXY(0.);
537 esdTrackCuts->SetPtRange(0.3,1.e10);
539 AddTrackCuts(esdTrackCuts);
542 const Int_t nptbins =15;
543 const Int_t nvars=14;
544 Float_t ptbins[nptbins+1];
563 Float_t** anacutsval;
564 anacutsval=new Float_t*[nvars];
566 for(Int_t ic=0;ic<nvars;ic++){anacutsval[ic]=new Float_t[nptbins];}
568 //Double_t cutsDplus[12]={0.2,0.4,0.4,0.,0.,0.01,0.06,0.02,0.,0.85,0.,10000000000.};
569 for(Int_t ipt=0;ipt<nptbins;ipt++){
570 anacutsval[0][ipt]=0.2;
571 anacutsval[3][ipt]=0.;
572 anacutsval[4][ipt]=0.;
573 anacutsval[5][ipt]=0.01;
574 anacutsval[11][ipt]=10000000000.;
577 anacutsval[1][0]=0.3;
578 anacutsval[1][1]=0.4;
579 anacutsval[1][2]=0.4;
580 anacutsval[2][0]=0.3;
581 anacutsval[2][1]=0.3;
582 anacutsval[2][2]=0.4;
583 for(Int_t ipt=3;ipt<nptbins;ipt++){
584 anacutsval[1][ipt]=0.4;
585 anacutsval[2][ipt]=0.4;
588 anacutsval[6][0]=0.022100;
589 anacutsval[6][1]=0.022100;
590 anacutsval[6][2]=0.034;
591 anacutsval[6][3]=0.020667;
592 anacutsval[6][4]=0.020667;
593 anacutsval[6][5]=0.023333;
596 anacutsval[7][0]=0.08;
597 anacutsval[7][1]=0.08;
598 anacutsval[7][2]=0.09;
599 anacutsval[7][3]=0.095;
600 anacutsval[7][4]=0.095;
602 anacutsval[8][0]=0.5;
603 anacutsval[8][1]=0.5;
604 anacutsval[8][2]=1.0;
605 anacutsval[8][3]=0.5;
606 anacutsval[8][4]=0.5;
609 anacutsval[9][0]=0.97;
610 anacutsval[9][1]=0.936;
611 anacutsval[9][2]=0.95;
612 anacutsval[9][3]=0.95;
613 anacutsval[9][4]= 0.95;
614 anacutsval[9][5]=0.92;
615 anacutsval[9][6]=0.92;
616 anacutsval[9][7]=0.92;
617 anacutsval[9][8]=0.92;
618 anacutsval[9][9]=0.90;
619 for(Int_t ipt=10;ipt<nptbins;ipt++){
620 anacutsval[9][ipt]=0.90;
624 anacutsval[10][0]=0.0055;
625 anacutsval[10][1]=0.0055;
626 anacutsval[10][2]= 0.0028;
627 anacutsval[10][3]=0.000883;
628 anacutsval[10][4]=0.000883;
631 for(Int_t ipt=5;ipt<nptbins;ipt++){
632 anacutsval[6][ipt]=0.02333;
633 anacutsval[7][ipt]=0.115;
634 anacutsval[8][ipt]=0.5;
635 anacutsval[10][ipt]=0.000883;
641 anacutsval[13][0]=0.98;
642 anacutsval[13][1]=0.98;
643 for(Int_t ipt=2;ipt<nptbins;ipt++){
644 anacutsval[12][ipt]=0.;
645 anacutsval[13][ipt]=0.;
650 SetGlobalIndex(nvars,nptbins);
651 SetPtBins(nptbins+1,ptbins);
652 SetCuts(nvars,nptbins,anacutsval);
654 fPidHF->SetOldPid(kTRUE);
655 SetRemoveDaughtersFromPrim(kTRUE);
659 for(Int_t iic=0;iic<nvars;iic++){delete [] anacutsval[iic];}
660 delete [] anacutsval;
667 void AliRDHFCutsDplustoKpipi::SetStandardCutsPbPb2010() {
669 //STANDARD CUTS USED FOR 2010 Pb Pb analysis.... not optimized yet
672 SetName("DplustoKpipiCutsStandard");
673 SetTitle("Standard Cuts for D+ analysis in PbPb2010 run");
676 //SetOptPileup(AliRDHFCuts::kRejectPileupEvent);
682 AliESDtrackCuts* esdTrackCuts=new AliESDtrackCuts();
683 esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
685 esdTrackCuts->SetRequireTPCRefit(kTRUE);
686 esdTrackCuts->SetRequireITSRefit(kTRUE);
687 //esdTrackCuts->SetMinNClustersITS(4); // default is 5
688 esdTrackCuts->SetMinNClustersTPC(70);
689 esdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD,
690 AliESDtrackCuts::kAny);
691 // default is kBoth, otherwise kAny
692 esdTrackCuts->SetMinDCAToVertexXY(0.);
693 esdTrackCuts->SetPtRange(0.8,1.e10);
695 AddTrackCuts(esdTrackCuts);
697 const Int_t nptbins=10;
699 ptbins=new Float_t[nptbins+1];
712 const Int_t nvars=14;
714 Float_t** anacutsval;
715 anacutsval=new Float_t*[nvars];
717 for(Int_t ic=0;ic<nvars;ic++){anacutsval[ic]=new Float_t[nptbins];}
718 //Double_t cutsDplus[12]={0.2,0.4,0.4,0.,0.,0.01,0.06,0.02,0.,0.85,0.,10000000000.};
720 for(Int_t ipt=0;ipt<nptbins;ipt++){
721 anacutsval[0][ipt]=0.2;
722 anacutsval[1][ipt]=0.8;
723 anacutsval[2][ipt]=0.8;
724 anacutsval[3][ipt]=0.;
725 anacutsval[4][ipt]=0.;
726 anacutsval[5][ipt]=0.01;
727 anacutsval[11][ipt]=10000000000.;
728 anacutsval[12][ipt]=0.;
729 anacutsval[13][ipt]=0.;
731 anacutsval[1][5]=0.9;
733 anacutsval[6][0]=0.022100;
734 anacutsval[6][1]=0.022100;
735 anacutsval[6][2]=0.034;
736 anacutsval[6][3]=0.020667;
737 anacutsval[6][4]=0.020667;
738 anacutsval[6][5]=0.023333;
740 anacutsval[7][0]=0.08;
741 anacutsval[7][1]=0.08;
742 anacutsval[7][2]=0.17;
743 anacutsval[7][3]=0.14;
744 anacutsval[7][4]=0.14;
745 anacutsval[7][5]=0.19;
747 anacutsval[8][0]=0.8;
748 anacutsval[8][1]=0.8;
749 anacutsval[8][2]=1.1;
750 anacutsval[8][3]=0.5;
751 anacutsval[8][4]=0.5;
752 anacutsval[8][5]=0.5;
754 anacutsval[9][0]=0.995;
755 anacutsval[9][1]=0.995;
756 anacutsval[9][2]=0.997;
757 anacutsval[9][3]=0.998;
758 anacutsval[9][4]=0.998;
759 anacutsval[9][5]=0.995;
761 anacutsval[10][0]=0.0055;
762 anacutsval[10][1]=0.0055;
763 anacutsval[10][2]= 0.0028;
764 anacutsval[10][3]=0.000883;
765 anacutsval[10][4]=0.000883;
766 anacutsval[10][5]=0.000883;
768 anacutsval[12][5]=12.;
769 anacutsval[13][5]=0.998571;
770 anacutsval[12][6]=10.;
771 anacutsval[13][6]=0.997143;
773 for(Int_t ipt=6;ipt<nptbins;ipt++){
774 anacutsval[6][ipt]=0.02333;
775 anacutsval[7][ipt]=0.19;
776 anacutsval[8][ipt]=2.0;
777 anacutsval[9][ipt]=0.997;
778 anacutsval[10][ipt]=0.000883;
780 anacutsval[7][6]=0.14;
781 anacutsval[9][6]=0.995;
783 SetPtBins(nptbins+1,ptbins);
784 SetCuts(nvars,nptbins,anacutsval);
786 fPidHF->SetOldPid(kTRUE);
787 SetMinCentrality(1E-10);
788 SetMaxCentrality(20.);
789 SetUseCentrality(AliRDHFCuts::kCentV0M);
790 SetRemoveDaughtersFromPrim(kFALSE);
794 for(Int_t iic=0;iic<nvars;iic++){delete [] anacutsval[iic];}
795 delete [] anacutsval;
805 void AliRDHFCutsDplustoKpipi::SetStandardCutsPbPb2011() {
807 // Default 2010 PbPb cut object
808 SetStandardCutsPbPb2010();
810 // Enable all 2011 PbPb run triggers
813 ResetMaskAndEnableMBTrigger();
814 EnableCentralTrigger();
815 EnableSemiCentralTrigger();
818 fPidHF->SetOldPid(kFALSE);
821 //--------------------------------------------------------------------------
823 UInt_t AliRDHFCutsDplustoKpipi::GetPIDTrackTPCTOFBitMap(AliAODTrack *track) const{
827 Double_t sigmaTPCPionHyp=-999.;
828 Double_t sigmaTPCKaonHyp=-999.;
829 Double_t sigmaTPCProtonHyp=-999.;
830 Double_t sigmaTOFPionHyp=-999.;
831 Double_t sigmaTOFKaonHyp=-999.;
832 Double_t sigmaTOFProtonHyp=-999.;
834 Int_t oksigmaTPCPionHyp=fPidHF->GetnSigmaTPC(track,2,sigmaTPCPionHyp);
835 Int_t oksigmaTPCKaonHyp=fPidHF->GetnSigmaTPC(track,3,sigmaTPCKaonHyp);
836 Int_t oksigmaTPCProtonHyp=fPidHF->GetnSigmaTPC(track,4,sigmaTPCProtonHyp);
837 Int_t oksigmaTOFPionHyp=fPidHF->GetnSigmaTOF(track,2,sigmaTOFPionHyp);
838 Int_t oksigmaTOFKaonHyp=fPidHF->GetnSigmaTOF(track,3,sigmaTOFKaonHyp);
839 Int_t oksigmaTOFProtonHyp=fPidHF->GetnSigmaTOF(track,4,sigmaTOFProtonHyp);
841 sigmaTPCPionHyp=TMath::Abs(sigmaTPCPionHyp);
842 sigmaTPCKaonHyp=TMath::Abs(sigmaTPCKaonHyp);
843 sigmaTPCProtonHyp=TMath::Abs(sigmaTPCProtonHyp);
844 sigmaTOFPionHyp=TMath::Abs(sigmaTOFPionHyp);
845 sigmaTOFKaonHyp=TMath::Abs(sigmaTOFKaonHyp);
846 sigmaTOFProtonHyp=TMath::Abs(sigmaTOFProtonHyp);
848 if (oksigmaTPCPionHyp && sigmaTPCPionHyp>0.){
849 if (sigmaTPCPionHyp<1.) bitmap+=1<<kTPCPionLess1;
851 if (sigmaTPCPionHyp<2.) bitmap+=1<<kTPCPionMore1Less2;
853 if (sigmaTPCPionHyp<3.) bitmap+=1<<kTPCPionMore2Less3;
854 else bitmap+=1<<kTPCPionMore3;
859 if (oksigmaTPCKaonHyp && sigmaTPCKaonHyp>0.){
860 if (sigmaTPCKaonHyp<1.) bitmap+=1<<kTPCKaonLess1;
862 if (sigmaTPCKaonHyp<2.) bitmap+=1<<kTPCKaonMore1Less2;
864 if (sigmaTPCKaonHyp<3.) bitmap+=1<<kTPCKaonMore2Less3;
865 else bitmap+=1<<kTPCKaonMore3;
870 if (oksigmaTPCProtonHyp && sigmaTPCProtonHyp>0.){
871 if (sigmaTPCProtonHyp<1.) bitmap+=1<<kTPCProtonLess1;
873 if (sigmaTPCProtonHyp<2.) bitmap+=1<<kTPCProtonMore1Less2;
875 if (sigmaTPCProtonHyp<3.) bitmap+=1<<kTPCProtonMore2Less3;
876 else bitmap+=1<<kTPCProtonMore3;
881 if (oksigmaTOFPionHyp && sigmaTOFPionHyp>0.){
882 if (sigmaTOFPionHyp<1.) bitmap+=1<<kTOFPionLess1;
884 if (sigmaTOFPionHyp<2.) bitmap+=1<<kTOFPionMore1Less2;
886 if (sigmaTOFPionHyp<3.) bitmap+=1<<kTOFPionMore2Less3;
887 else bitmap+=1<<kTOFPionMore3;
892 if (oksigmaTOFKaonHyp && sigmaTOFKaonHyp>0.){
893 if (sigmaTOFKaonHyp<1.) bitmap+=1<<kTOFKaonLess1;
895 if (sigmaTOFKaonHyp<2.) bitmap+=1<<kTOFKaonMore1Less2;
897 if (sigmaTOFKaonHyp<3.) bitmap+=1<<kTOFKaonMore2Less3;
898 else bitmap+=1<<kTOFKaonMore3;
903 if (oksigmaTOFProtonHyp && sigmaTOFProtonHyp>0.){
904 if (sigmaTOFProtonHyp<1.) bitmap+=1<<kTOFProtonLess1;
906 if (sigmaTOFProtonHyp<2.) bitmap+=1<<kTOFProtonMore1Less2;
908 if (sigmaTOFProtonHyp<3.) bitmap+=1<<kTOFProtonMore2Less3;
909 else bitmap+=1<<kTOFProtonMore3;