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;
670 void AliRDHFCutsDplustoKpipi::SetStandardCutsPbPb2010() {
672 //STANDARD CUTS USED FOR 2010 Pb Pb analysis.... not optimized yet
675 SetName("DplustoKpipiCutsStandard");
676 SetTitle("Standard Cuts for D+ analysis in PbPb2010 run");
679 //SetOptPileup(AliRDHFCuts::kRejectPileupEvent);
685 AliESDtrackCuts* esdTrackCuts=new AliESDtrackCuts();
686 esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
688 esdTrackCuts->SetRequireTPCRefit(kTRUE);
689 esdTrackCuts->SetRequireITSRefit(kTRUE);
690 //esdTrackCuts->SetMinNClustersITS(4); // default is 5
691 esdTrackCuts->SetMinNClustersTPC(70);
692 esdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD,
693 AliESDtrackCuts::kAny);
694 // default is kBoth, otherwise kAny
695 esdTrackCuts->SetMinDCAToVertexXY(0.);
696 esdTrackCuts->SetPtRange(0.8,1.e10);
698 AddTrackCuts(esdTrackCuts);
700 const Int_t nptbins=10;
702 ptbins=new Float_t[nptbins+1];
715 const Int_t nvars=14;
717 Float_t** anacutsval;
718 anacutsval=new Float_t*[nvars];
720 for(Int_t ic=0;ic<nvars;ic++){anacutsval[ic]=new Float_t[nptbins];}
721 //Double_t cutsDplus[12]={0.2,0.4,0.4,0.,0.,0.01,0.06,0.02,0.,0.85,0.,10000000000.};
723 for(Int_t ipt=0;ipt<nptbins;ipt++){
724 anacutsval[0][ipt]=0.2;
725 anacutsval[1][ipt]=0.8;
726 anacutsval[2][ipt]=0.8;
727 anacutsval[3][ipt]=0.;
728 anacutsval[4][ipt]=0.;
729 anacutsval[5][ipt]=0.01;
730 anacutsval[11][ipt]=10000000000.;
731 anacutsval[12][ipt]=0.;
732 anacutsval[13][ipt]=0.;
734 anacutsval[1][5]=0.9;
736 anacutsval[6][0]=0.022100;
737 anacutsval[6][1]=0.022100;
738 anacutsval[6][2]=0.034;
739 anacutsval[6][3]=0.020667;
740 anacutsval[6][4]=0.020667;
741 anacutsval[6][5]=0.023333;
743 anacutsval[7][0]=0.08;
744 anacutsval[7][1]=0.08;
745 anacutsval[7][2]=0.17;
746 anacutsval[7][3]=0.14;
747 anacutsval[7][4]=0.14;
748 anacutsval[7][5]=0.19;
750 anacutsval[8][0]=0.8;
751 anacutsval[8][1]=0.8;
752 anacutsval[8][2]=1.1;
753 anacutsval[8][3]=0.5;
754 anacutsval[8][4]=0.5;
755 anacutsval[8][5]=0.5;
757 anacutsval[9][0]=0.995;
758 anacutsval[9][1]=0.995;
759 anacutsval[9][2]=0.997;
760 anacutsval[9][3]=0.998;
761 anacutsval[9][4]=0.998;
762 anacutsval[9][5]=0.995;
764 anacutsval[10][0]=0.0055;
765 anacutsval[10][1]=0.0055;
766 anacutsval[10][2]= 0.0028;
767 anacutsval[10][3]=0.000883;
768 anacutsval[10][4]=0.000883;
769 anacutsval[10][5]=0.000883;
771 anacutsval[12][5]=12.;
772 anacutsval[13][5]=0.998571;
773 anacutsval[12][6]=10.;
774 anacutsval[13][6]=0.997143;
776 for(Int_t ipt=6;ipt<nptbins;ipt++){
777 anacutsval[6][ipt]=0.02333;
778 anacutsval[7][ipt]=0.19;
779 anacutsval[8][ipt]=2.0;
780 anacutsval[9][ipt]=0.997;
781 anacutsval[10][ipt]=0.000883;
783 anacutsval[7][6]=0.14;
784 anacutsval[9][6]=0.995;
786 SetPtBins(nptbins+1,ptbins);
787 SetCuts(nvars,nptbins,anacutsval);
789 fPidHF->SetOldPid(kTRUE);
790 SetMinCentrality(1E-10);
791 SetMaxCentrality(20.);
792 SetUseCentrality(AliRDHFCuts::kCentV0M);
793 SetRemoveDaughtersFromPrim(kFALSE);
797 for(Int_t iic=0;iic<nvars;iic++){delete [] anacutsval[iic];}
798 delete [] anacutsval;
811 void AliRDHFCutsDplustoKpipi::SetStandardCutsPbPb2011() {
813 // Default 2010 PbPb cut object
814 SetStandardCutsPbPb2010();
816 // Enable all 2011 PbPb run triggers
819 ResetMaskAndEnableMBTrigger();
820 EnableCentralTrigger();
821 EnableSemiCentralTrigger();
824 fPidHF->SetOldPid(kFALSE);
827 //--------------------------------------------------------------------------
829 UInt_t AliRDHFCutsDplustoKpipi::GetPIDTrackTPCTOFBitMap(AliAODTrack *track) const{
833 Double_t sigmaTPCPionHyp=-999.;
834 Double_t sigmaTPCKaonHyp=-999.;
835 Double_t sigmaTPCProtonHyp=-999.;
836 Double_t sigmaTOFPionHyp=-999.;
837 Double_t sigmaTOFKaonHyp=-999.;
838 Double_t sigmaTOFProtonHyp=-999.;
840 Int_t oksigmaTPCPionHyp=fPidHF->GetnSigmaTPC(track,2,sigmaTPCPionHyp);
841 Int_t oksigmaTPCKaonHyp=fPidHF->GetnSigmaTPC(track,3,sigmaTPCKaonHyp);
842 Int_t oksigmaTPCProtonHyp=fPidHF->GetnSigmaTPC(track,4,sigmaTPCProtonHyp);
843 Int_t oksigmaTOFPionHyp=fPidHF->GetnSigmaTOF(track,2,sigmaTOFPionHyp);
844 Int_t oksigmaTOFKaonHyp=fPidHF->GetnSigmaTOF(track,3,sigmaTOFKaonHyp);
845 Int_t oksigmaTOFProtonHyp=fPidHF->GetnSigmaTOF(track,4,sigmaTOFProtonHyp);
847 sigmaTPCPionHyp=TMath::Abs(sigmaTPCPionHyp);
848 sigmaTPCKaonHyp=TMath::Abs(sigmaTPCKaonHyp);
849 sigmaTPCProtonHyp=TMath::Abs(sigmaTPCProtonHyp);
850 sigmaTOFPionHyp=TMath::Abs(sigmaTOFPionHyp);
851 sigmaTOFKaonHyp=TMath::Abs(sigmaTOFKaonHyp);
852 sigmaTOFProtonHyp=TMath::Abs(sigmaTOFProtonHyp);
854 if (oksigmaTPCPionHyp && sigmaTPCPionHyp>0.){
855 if (sigmaTPCPionHyp<1.) bitmap+=1<<kTPCPionLess1;
857 if (sigmaTPCPionHyp<2.) bitmap+=1<<kTPCPionMore1Less2;
859 if (sigmaTPCPionHyp<3.) bitmap+=1<<kTPCPionMore2Less3;
860 else bitmap+=1<<kTPCPionMore3;
865 if (oksigmaTPCKaonHyp && sigmaTPCKaonHyp>0.){
866 if (sigmaTPCKaonHyp<1.) bitmap+=1<<kTPCKaonLess1;
868 if (sigmaTPCKaonHyp<2.) bitmap+=1<<kTPCKaonMore1Less2;
870 if (sigmaTPCKaonHyp<3.) bitmap+=1<<kTPCKaonMore2Less3;
871 else bitmap+=1<<kTPCKaonMore3;
876 if (oksigmaTPCProtonHyp && sigmaTPCProtonHyp>0.){
877 if (sigmaTPCProtonHyp<1.) bitmap+=1<<kTPCProtonLess1;
879 if (sigmaTPCProtonHyp<2.) bitmap+=1<<kTPCProtonMore1Less2;
881 if (sigmaTPCProtonHyp<3.) bitmap+=1<<kTPCProtonMore2Less3;
882 else bitmap+=1<<kTPCProtonMore3;
887 if (oksigmaTOFPionHyp && sigmaTOFPionHyp>0.){
888 if (sigmaTOFPionHyp<1.) bitmap+=1<<kTOFPionLess1;
890 if (sigmaTOFPionHyp<2.) bitmap+=1<<kTOFPionMore1Less2;
892 if (sigmaTOFPionHyp<3.) bitmap+=1<<kTOFPionMore2Less3;
893 else bitmap+=1<<kTOFPionMore3;
898 if (oksigmaTOFKaonHyp && sigmaTOFKaonHyp>0.){
899 if (sigmaTOFKaonHyp<1.) bitmap+=1<<kTOFKaonLess1;
901 if (sigmaTOFKaonHyp<2.) bitmap+=1<<kTOFKaonMore1Less2;
903 if (sigmaTOFKaonHyp<3.) bitmap+=1<<kTOFKaonMore2Less3;
904 else bitmap+=1<<kTOFKaonMore3;
909 if (oksigmaTOFProtonHyp && sigmaTOFProtonHyp>0.){
910 if (sigmaTOFProtonHyp<1.) bitmap+=1<<kTOFProtonLess1;
912 if (sigmaTOFProtonHyp<2.) bitmap+=1<<kTOFProtonMore1Less2;
914 if (sigmaTOFProtonHyp<3.) bitmap+=1<<kTOFProtonMore2Less3;
915 else bitmap+=1<<kTOFProtonMore3;