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
294 // applying cut for pt > 5 GeV
295 AliDebug(2,Form("pt of D+ = %f (> 5), cutting at |y| < 0.8",pt));
296 if (TMath::Abs(y) > 0.8) return kFALSE;
299 // appliying smooth cut for pt < 5 GeV
300 Double_t maxFiducialY = -0.2/15*pt*pt+1.9/15*pt+0.5;
301 Double_t minFiducialY = 0.2/15*pt*pt-1.9/15*pt-0.5;
302 AliDebug(2,Form("pt of D+ = %f (< 5), cutting according to the fiducial zone [%f, %f]\n",pt,minFiducialY,maxFiducialY));
303 if (y < minFiducialY || y > maxFiducialY) return kFALSE;
309 //---------------------------------------------------------------------------
310 Int_t AliRDHFCutsDplustoKpipi::GetPIDBitMask(AliAODRecoDecayHF *rd)
312 if(!fUsePID || !rd) return -1;
313 //if(fUsePID)printf("i am inside the pid \n");
315 Int_t sign=rd->GetCharge();
316 for(Int_t daught=0;daught<3;daught++){
317 AliAODTrack *track=(AliAODTrack*)rd->GetDaughter(daught);
319 if(sign==track->Charge()){//pions
320 Int_t isPion=fPidHF->MakeRawPid(track,AliPID::kPion);
321 if(isPion==0)mask+=1;
322 else if(isPion>0)mask+=3;
326 Int_t isKaon=fPidHF->MakeRawPid(track,AliPID::kKaon);
327 if(isKaon==0)mask+=1;
328 else if(isKaon>0)mask+=3;
335 //---------------------------------------------------------------------------
336 Int_t AliRDHFCutsDplustoKpipi::IsSelectedPID(AliAODRecoDecayHF *rd)
339 // PID selection, returns 3 if accepted, 0 if not accepted
341 if(!fUsePID || !rd) return 3;
342 //if(fUsePID)printf("i am inside the pid \n");
345 Int_t sign= rd->GetCharge();
346 for(Int_t daught=0;daught<3;daught++){
347 AliAODTrack *track=(AliAODTrack*)rd->GetDaughter(daught);
348 Int_t isPion=fPidHF->MakeRawPid(track,AliPID::kPion);
349 Int_t isKaon=fPidHF->MakeRawPid(track,AliPID::kKaon);
350 Int_t isProton=fPidHF->MakeRawPid(track,AliPID::kProton);
352 if(isProton>0 && isKaon<0 && isPion<0) return 0;
353 if(isKaon>0 && isPion<0) nkaons++;
354 if(isKaon<0) nNotKaons++;
355 if(sign==track->Charge()){//pions
356 if(isPion<0)return 0;
357 if(rd->Pt()<fMaxPtStrongPid && isPion<=0 && fUseStrongPid&2 && track->P()<fMaxPStrongPidpi)return 0;
360 if(isKaon<0)return 0;
361 if(rd->Pt()<fMaxPtStrongPid && isKaon<=0 && fUseStrongPid&1&& track->P()<fMaxPStrongPidK)return 0;
365 if(nkaons>1)return 0;
366 if(nNotKaons==3)return 0;
372 //---------------------------------------------------------------------------
373 Int_t AliRDHFCutsDplustoKpipi::IsSelected(TObject* obj,Int_t selectionLevel, AliAODEvent* aod) {
375 // Apply selection, returns 3 if accepted, 0 if not accepted
383 cout<<"Cut matrix not inizialized. Exit..."<<endl;
387 AliAODRecoDecayHF3Prong* d=(AliAODRecoDecayHF3Prong*)obj;
391 cout<<"AliAODRecoDecayHF3Prong null"<<endl;
395 if(fKeepSignalMC) if(IsSignalMC(d,aod,411)) return 3;
398 Int_t returnvaluePID=3;
399 Int_t returnvalueCuts=3;
402 if(pt<fMinPtCand) return 0;
403 if(pt>fMaxPtCand) return 0;
405 if(fUseTrackSelectionWithFilterBits && d->HasBadDaughters()) return 0;
407 // selection on candidate
408 if(selectionLevel==AliRDHFCuts::kAll ||
409 selectionLevel==AliRDHFCuts::kCandidate) {
411 //recalculate vertex w/o daughters
412 AliAODVertex *origownvtx=0x0;
413 if(fRemoveDaughtersFromPrimary && !fUseMCVertex) {
414 if(d->GetOwnPrimaryVtx()) origownvtx=new AliAODVertex(*d->GetOwnPrimaryVtx());
415 if(!RecalcOwnPrimaryVtx(d,aod)) {
416 CleanOwnPrimaryVtx(d,aod,origownvtx);
422 if(d->GetOwnPrimaryVtx()) origownvtx=new AliAODVertex(*d->GetOwnPrimaryVtx());
423 if(!SetMCPrimaryVtx(d,aod)) {
424 CleanOwnPrimaryVtx(d,aod,origownvtx);
429 Int_t ptbin=PtBin(pt);
431 CleanOwnPrimaryVtx(d,aod,origownvtx);
435 Double_t mDplusPDG = TDatabasePDG::Instance()->GetParticle(411)->Mass();
436 Double_t mDplus=d->InvMassDplus();
437 if(TMath::Abs(mDplus-mDplusPDG)>fCutsRD[GetGlobalIndex(0,ptbin)]) {CleanOwnPrimaryVtx(d,aod,origownvtx); return 0;}
440 if(d->GetDist12toPrim()<fCutsRD[GetGlobalIndex(5,ptbin)]|| d->GetDist23toPrim()<fCutsRD[GetGlobalIndex(5,ptbin)]) {CleanOwnPrimaryVtx(d,aod,origownvtx); return 0;}
442 Double_t sum2=d->Getd0Prong(0)*d->Getd0Prong(0)+d->Getd0Prong(1)*d->Getd0Prong(1)+d->Getd0Prong(2)*d->Getd0Prong(2);
443 if(sum2<fCutsRD[GetGlobalIndex(10,ptbin)]) {CleanOwnPrimaryVtx(d,aod,origownvtx); return 0;}
445 if(fUseImpParProdCorrCut){
446 if(d->Getd0Prong(0)*d->Getd0Prong(1)<0. && d->Getd0Prong(2)*d->Getd0Prong(1)<0.) {CleanOwnPrimaryVtx(d,aod,origownvtx); return 0;}
451 for(Int_t i=0;i<3;i++) if(d->GetDCA(i)>fCutsRD[GetGlobalIndex(11,ptbin)]) {CleanOwnPrimaryVtx(d,aod,origownvtx); return 0;}
453 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
455 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
457 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
459 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;}
461 if(d->DecayLength2()<fCutsRD[GetGlobalIndex(7,ptbin)]*fCutsRD[GetGlobalIndex(7,ptbin)]) {CleanOwnPrimaryVtx(d,aod,origownvtx); return 0;}
463 if(d->CosPointingAngle()< fCutsRD[GetGlobalIndex(9,ptbin)]) {CleanOwnPrimaryVtx(d,aod,origownvtx); return 0;}
465 if(d->NormalizedDecayLengthXY()*d->P()/pt<fCutsRD[GetGlobalIndex(12,ptbin)]){CleanOwnPrimaryVtx(d,aod,origownvtx); return 0;}
467 if(d->CosPointingAngleXY()<fCutsRD[GetGlobalIndex(13,ptbin)]){CleanOwnPrimaryVtx(d,aod,origownvtx); return 0;}
470 Double_t sigmavert=d->GetSigmaVert(aod);
471 if(sigmavert>fCutsRD[GetGlobalIndex(6,ptbin)]) {CleanOwnPrimaryVtx(d,aod,origownvtx); return 0;}
473 // unset recalculated primary vertex when not needed any more
474 CleanOwnPrimaryVtx(d,aod,origownvtx);
476 fIsSelectedCuts=returnvalueCuts;
478 //if(!returnvalueCuts) return 0; // returnvalueCuts cannot be 0 here
481 if(selectionLevel==AliRDHFCuts::kAll ||
482 selectionLevel==AliRDHFCuts::kCandidate ||
483 selectionLevel==AliRDHFCuts::kPID) {
484 returnvaluePID = IsSelectedPID(d);
485 fIsSelectedPID=returnvaluePID;
487 if(returnvaluePID==0)return 0;
489 // selection on daughter tracks
490 if(selectionLevel==AliRDHFCuts::kAll ||
491 selectionLevel==AliRDHFCuts::kTracks) {
492 if(!AreDaughtersSelected(d)) return 0;
504 //---------------------------------------------------------------------------
507 void AliRDHFCutsDplustoKpipi::SetStandardCutsPP2010() {
509 //STANDARD CUTS USED FOR 2010 pp analysis
512 SetName("DplustoKpipiCutsStandard");
513 SetTitle("Standard Cuts for D+ analysis");
516 SetOptPileup(AliRDHFCuts::kRejectPileupEvent);
521 AliESDtrackCuts* esdTrackCuts=new AliESDtrackCuts();
522 esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
524 esdTrackCuts->SetRequireTPCRefit(kTRUE);
525 esdTrackCuts->SetRequireITSRefit(kTRUE);
526 //esdTrackCuts->SetMinNClustersITS(4); // default is 5
527 esdTrackCuts->SetMinNClustersTPC(70);
528 esdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD,
529 AliESDtrackCuts::kAny);
530 // default is kBoth, otherwise kAny
531 esdTrackCuts->SetMinDCAToVertexXY(0.);
532 esdTrackCuts->SetPtRange(0.3,1.e10);
534 AddTrackCuts(esdTrackCuts);
537 const Int_t nptbins =15;
538 const Int_t nvars=14;
539 Float_t ptbins[nptbins+1];
558 Float_t** anacutsval;
559 anacutsval=new Float_t*[nvars];
561 for(Int_t ic=0;ic<nvars;ic++){anacutsval[ic]=new Float_t[nptbins];}
563 //Double_t cutsDplus[12]={0.2,0.4,0.4,0.,0.,0.01,0.06,0.02,0.,0.85,0.,10000000000.};
564 for(Int_t ipt=0;ipt<nptbins;ipt++){
565 anacutsval[0][ipt]=0.2;
566 anacutsval[3][ipt]=0.;
567 anacutsval[4][ipt]=0.;
568 anacutsval[5][ipt]=0.01;
569 anacutsval[11][ipt]=10000000000.;
572 anacutsval[1][0]=0.3;
573 anacutsval[1][1]=0.4;
574 anacutsval[1][2]=0.4;
575 anacutsval[2][0]=0.3;
576 anacutsval[2][1]=0.3;
577 anacutsval[2][2]=0.4;
578 for(Int_t ipt=3;ipt<nptbins;ipt++){
579 anacutsval[1][ipt]=0.4;
580 anacutsval[2][ipt]=0.4;
583 anacutsval[6][0]=0.022100;
584 anacutsval[6][1]=0.022100;
585 anacutsval[6][2]=0.034;
586 anacutsval[6][3]=0.020667;
587 anacutsval[6][4]=0.020667;
588 anacutsval[6][5]=0.023333;
591 anacutsval[7][0]=0.08;
592 anacutsval[7][1]=0.08;
593 anacutsval[7][2]=0.09;
594 anacutsval[7][3]=0.095;
595 anacutsval[7][4]=0.095;
597 anacutsval[8][0]=0.5;
598 anacutsval[8][1]=0.5;
599 anacutsval[8][2]=1.0;
600 anacutsval[8][3]=0.5;
601 anacutsval[8][4]=0.5;
604 anacutsval[9][0]=0.97;
605 anacutsval[9][1]=0.936;
606 anacutsval[9][2]=0.95;
607 anacutsval[9][3]=0.95;
608 anacutsval[9][4]= 0.95;
609 anacutsval[9][5]=0.92;
610 anacutsval[9][6]=0.92;
611 anacutsval[9][7]=0.92;
612 anacutsval[9][8]=0.92;
613 anacutsval[9][9]=0.90;
614 for(Int_t ipt=10;ipt<nptbins;ipt++){
615 anacutsval[9][ipt]=0.90;
619 anacutsval[10][0]=0.0055;
620 anacutsval[10][1]=0.0055;
621 anacutsval[10][2]= 0.0028;
622 anacutsval[10][3]=0.000883;
623 anacutsval[10][4]=0.000883;
626 for(Int_t ipt=5;ipt<nptbins;ipt++){
627 anacutsval[6][ipt]=0.02333;
628 anacutsval[7][ipt]=0.115;
629 anacutsval[8][ipt]=0.5;
630 anacutsval[10][ipt]=0.000883;
636 anacutsval[13][0]=0.98;
637 anacutsval[13][1]=0.98;
638 for(Int_t ipt=2;ipt<nptbins;ipt++){
639 anacutsval[12][ipt]=0.;
640 anacutsval[13][ipt]=0.;
645 SetGlobalIndex(nvars,nptbins);
646 SetPtBins(nptbins+1,ptbins);
647 SetCuts(nvars,nptbins,anacutsval);
649 fPidHF->SetOldPid(kTRUE);
650 SetRemoveDaughtersFromPrim(kTRUE);
654 for(Int_t iic=0;iic<nvars;iic++){delete [] anacutsval[iic];}
655 delete [] anacutsval;
662 void AliRDHFCutsDplustoKpipi::SetStandardCutsPbPb2010() {
664 //STANDARD CUTS USED FOR 2010 Pb Pb analysis.... not optimized yet
667 SetName("DplustoKpipiCutsStandard");
668 SetTitle("Standard Cuts for D+ analysis in PbPb2010 run");
671 //SetOptPileup(AliRDHFCuts::kRejectPileupEvent);
677 AliESDtrackCuts* esdTrackCuts=new AliESDtrackCuts();
678 esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
680 esdTrackCuts->SetRequireTPCRefit(kTRUE);
681 esdTrackCuts->SetRequireITSRefit(kTRUE);
682 //esdTrackCuts->SetMinNClustersITS(4); // default is 5
683 esdTrackCuts->SetMinNClustersTPC(70);
684 esdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD,
685 AliESDtrackCuts::kAny);
686 // default is kBoth, otherwise kAny
687 esdTrackCuts->SetMinDCAToVertexXY(0.);
688 esdTrackCuts->SetPtRange(0.8,1.e10);
690 AddTrackCuts(esdTrackCuts);
692 const Int_t nptbins=10;
694 ptbins=new Float_t[nptbins+1];
707 const Int_t nvars=14;
709 Float_t** anacutsval;
710 anacutsval=new Float_t*[nvars];
712 for(Int_t ic=0;ic<nvars;ic++){anacutsval[ic]=new Float_t[nptbins];}
713 //Double_t cutsDplus[12]={0.2,0.4,0.4,0.,0.,0.01,0.06,0.02,0.,0.85,0.,10000000000.};
715 for(Int_t ipt=0;ipt<nptbins;ipt++){
716 anacutsval[0][ipt]=0.2;
717 anacutsval[1][ipt]=0.8;
718 anacutsval[2][ipt]=0.8;
719 anacutsval[3][ipt]=0.;
720 anacutsval[4][ipt]=0.;
721 anacutsval[5][ipt]=0.01;
722 anacutsval[11][ipt]=10000000000.;
723 anacutsval[12][ipt]=0.;
724 anacutsval[13][ipt]=0.;
726 anacutsval[1][5]=0.9;
728 anacutsval[6][0]=0.022100;
729 anacutsval[6][1]=0.022100;
730 anacutsval[6][2]=0.034;
731 anacutsval[6][3]=0.020667;
732 anacutsval[6][4]=0.020667;
733 anacutsval[6][5]=0.023333;
735 anacutsval[7][0]=0.08;
736 anacutsval[7][1]=0.08;
737 anacutsval[7][2]=0.17;
738 anacutsval[7][3]=0.14;
739 anacutsval[7][4]=0.14;
740 anacutsval[7][5]=0.19;
742 anacutsval[8][0]=0.8;
743 anacutsval[8][1]=0.8;
744 anacutsval[8][2]=1.1;
745 anacutsval[8][3]=0.5;
746 anacutsval[8][4]=0.5;
747 anacutsval[8][5]=0.5;
749 anacutsval[9][0]=0.995;
750 anacutsval[9][1]=0.995;
751 anacutsval[9][2]=0.997;
752 anacutsval[9][3]=0.998;
753 anacutsval[9][4]=0.998;
754 anacutsval[9][5]=0.995;
756 anacutsval[10][0]=0.0055;
757 anacutsval[10][1]=0.0055;
758 anacutsval[10][2]= 0.0028;
759 anacutsval[10][3]=0.000883;
760 anacutsval[10][4]=0.000883;
761 anacutsval[10][5]=0.000883;
763 anacutsval[12][5]=12.;
764 anacutsval[13][5]=0.998571;
765 anacutsval[12][6]=10.;
766 anacutsval[13][6]=0.997143;
768 for(Int_t ipt=6;ipt<nptbins;ipt++){
769 anacutsval[6][ipt]=0.02333;
770 anacutsval[7][ipt]=0.19;
771 anacutsval[8][ipt]=2.0;
772 anacutsval[9][ipt]=0.997;
773 anacutsval[10][ipt]=0.000883;
775 anacutsval[7][6]=0.14;
776 anacutsval[9][6]=0.995;
778 SetPtBins(nptbins+1,ptbins);
779 SetCuts(nvars,nptbins,anacutsval);
781 fPidHF->SetOldPid(kTRUE);
782 SetMinCentrality(1E-10);
783 SetMaxCentrality(20.);
784 SetUseCentrality(AliRDHFCuts::kCentV0M);
785 SetRemoveDaughtersFromPrim(kFALSE);
789 for(Int_t iic=0;iic<nvars;iic++){delete [] anacutsval[iic];}
790 delete [] anacutsval;
800 void AliRDHFCutsDplustoKpipi::SetStandardCutsPbPb2011() {
802 // Default 2010 PbPb cut object
803 SetStandardCutsPbPb2010();
805 // Enable all 2011 PbPb run triggers
808 ResetMaskAndEnableMBTrigger();
809 EnableCentralTrigger();
810 EnableSemiCentralTrigger();
813 fPidHF->SetOldPid(kFALSE);
816 //--------------------------------------------------------------------------
818 UInt_t AliRDHFCutsDplustoKpipi::GetPIDTrackTPCTOFBitMap(AliAODTrack *track) const{
822 Double_t sigmaTPCPionHyp=-999.;
823 Double_t sigmaTPCKaonHyp=-999.;
824 Double_t sigmaTPCProtonHyp=-999.;
825 Double_t sigmaTOFPionHyp=-999.;
826 Double_t sigmaTOFKaonHyp=-999.;
827 Double_t sigmaTOFProtonHyp=-999.;
829 Int_t oksigmaTPCPionHyp=fPidHF->GetnSigmaTPC(track,2,sigmaTPCPionHyp);
830 Int_t oksigmaTPCKaonHyp=fPidHF->GetnSigmaTPC(track,3,sigmaTPCKaonHyp);
831 Int_t oksigmaTPCProtonHyp=fPidHF->GetnSigmaTPC(track,4,sigmaTPCProtonHyp);
832 Int_t oksigmaTOFPionHyp=fPidHF->GetnSigmaTOF(track,2,sigmaTOFPionHyp);
833 Int_t oksigmaTOFKaonHyp=fPidHF->GetnSigmaTOF(track,3,sigmaTOFKaonHyp);
834 Int_t oksigmaTOFProtonHyp=fPidHF->GetnSigmaTOF(track,4,sigmaTOFProtonHyp);
836 sigmaTPCPionHyp=TMath::Abs(sigmaTPCPionHyp);
837 sigmaTPCKaonHyp=TMath::Abs(sigmaTPCKaonHyp);
838 sigmaTPCProtonHyp=TMath::Abs(sigmaTPCProtonHyp);
839 sigmaTOFPionHyp=TMath::Abs(sigmaTOFPionHyp);
840 sigmaTOFKaonHyp=TMath::Abs(sigmaTOFKaonHyp);
841 sigmaTOFProtonHyp=TMath::Abs(sigmaTOFProtonHyp);
843 if (oksigmaTPCPionHyp && sigmaTPCPionHyp>0.){
844 if (sigmaTPCPionHyp<1.) bitmap+=1<<kTPCPionLess1;
846 if (sigmaTPCPionHyp<2.) bitmap+=1<<kTPCPionMore1Less2;
848 if (sigmaTPCPionHyp<3.) bitmap+=1<<kTPCPionMore2Less3;
849 else bitmap+=1<<kTPCPionMore3;
854 if (oksigmaTPCKaonHyp && sigmaTPCKaonHyp>0.){
855 if (sigmaTPCKaonHyp<1.) bitmap+=1<<kTPCKaonLess1;
857 if (sigmaTPCKaonHyp<2.) bitmap+=1<<kTPCKaonMore1Less2;
859 if (sigmaTPCKaonHyp<3.) bitmap+=1<<kTPCKaonMore2Less3;
860 else bitmap+=1<<kTPCKaonMore3;
865 if (oksigmaTPCProtonHyp && sigmaTPCProtonHyp>0.){
866 if (sigmaTPCProtonHyp<1.) bitmap+=1<<kTPCProtonLess1;
868 if (sigmaTPCProtonHyp<2.) bitmap+=1<<kTPCProtonMore1Less2;
870 if (sigmaTPCProtonHyp<3.) bitmap+=1<<kTPCProtonMore2Less3;
871 else bitmap+=1<<kTPCProtonMore3;
876 if (oksigmaTOFPionHyp && sigmaTOFPionHyp>0.){
877 if (sigmaTOFPionHyp<1.) bitmap+=1<<kTOFPionLess1;
879 if (sigmaTOFPionHyp<2.) bitmap+=1<<kTOFPionMore1Less2;
881 if (sigmaTOFPionHyp<3.) bitmap+=1<<kTOFPionMore2Less3;
882 else bitmap+=1<<kTOFPionMore3;
887 if (oksigmaTOFKaonHyp && sigmaTOFKaonHyp>0.){
888 if (sigmaTOFKaonHyp<1.) bitmap+=1<<kTOFKaonLess1;
890 if (sigmaTOFKaonHyp<2.) bitmap+=1<<kTOFKaonMore1Less2;
892 if (sigmaTOFKaonHyp<3.) bitmap+=1<<kTOFKaonMore2Less3;
893 else bitmap+=1<<kTOFKaonMore3;
898 if (oksigmaTOFProtonHyp && sigmaTOFProtonHyp>0.){
899 if (sigmaTOFProtonHyp<1.) bitmap+=1<<kTOFProtonLess1;
901 if (sigmaTOFProtonHyp<2.) bitmap+=1<<kTOFProtonMore1Less2;
903 if (sigmaTOFProtonHyp<3.) bitmap+=1<<kTOFProtonMore2Less3;
904 else bitmap+=1<<kTOFProtonMore3;