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 Ds->KKpi
22 // Author: A.Dainese, andrea.dainese@pd.infn.it
23 /////////////////////////////////////////////////////////////
25 #include <TDatabasePDG.h>
26 #include <Riostream.h>
28 #include "AliRDHFCutsDstoKKpi.h"
29 #include "AliAODRecoDecayHF3Prong.h"
30 #include "AliAODTrack.h"
31 #include "AliESDtrack.h"
36 ClassImp(AliRDHFCutsDstoKKpi)
38 //--------------------------------------------------------------------------
39 AliRDHFCutsDstoKKpi::AliRDHFCutsDstoKKpi(const char* name) :
47 // Default Constructor
51 TString varNames[20]={"inv. mass [GeV]",
63 "inv. mass (Mphi-MKK) [GeV]",
64 "inv. mass (MKo*-MKpi) [GeV]",
65 "Abs(CosineKpiPhiRFrame)^3",
72 Bool_t isUpperCut[20]={kTRUE,
92 SetVarNames(20,varNames,isUpperCut);
93 Bool_t forOpt[20]={kFALSE,
114 SetVarsForOpt(11,forOpt);
115 Float_t limits[2]={0,999999999.};
117 if(fPidHF)delete fPidHF;
118 fPidHF=new AliAODPidHF();
119 Double_t plim[2]={0.6,0.8};
120 Double_t nsigma[5]={2.,1.,2.,3.,0.};
122 fPidHF->SetPLimit(plim);
123 fPidHF->SetAsym(kTRUE);
124 fPidHF->SetSigma(nsigma);
130 fPidHF->SetCompat(kTRUE);
133 //--------------------------------------------------------------------------
134 AliRDHFCutsDstoKKpi::AliRDHFCutsDstoKKpi(const AliRDHFCutsDstoKKpi &source) :
136 fPidOption(source.fPidOption),
137 fMaxPtStrongPid(source.fMaxPtStrongPid),
138 fMaxPStrongPidK(source.fMaxPStrongPidK),
139 fMaxPStrongPidpi(source.fMaxPStrongPidpi)
146 //--------------------------------------------------------------------------
147 AliRDHFCutsDstoKKpi &AliRDHFCutsDstoKKpi::operator=(const AliRDHFCutsDstoKKpi &source)
150 // assignment operator
152 if(&source == this) return *this;
154 AliRDHFCuts::operator=(source);
156 fPidOption=source.fPidOption;
157 fMaxPtStrongPid=source.fMaxPtStrongPid;
158 fMaxPStrongPidK=source.fMaxPStrongPidK;
159 fMaxPStrongPidpi=source.fMaxPStrongPidpi;
165 //---------------------------------------------------------------------------
166 void AliRDHFCutsDstoKKpi::GetCutVarsForOpt(AliAODRecoDecayHF *d,Float_t *vars,Int_t nvars,Int_t *pdgdaughters,AliAODEvent *aod) {
168 // Fills in vars the values of the variables
171 if(nvars!=fnVarsForOpt) {
172 printf("AliRDHFCutsDstoKKpi::GetCutsVarsForOpt: wrong number of variables\n");
176 AliAODRecoDecayHF3Prong *dd = (AliAODRecoDecayHF3Prong*)d;
178 //recalculate vertex w/o daughters
179 Bool_t cleanvtx=kFALSE;
180 AliAODVertex *origownvtx=0x0;
181 if(fRemoveDaughtersFromPrimary) {
182 if(dd->GetOwnPrimaryVtx()) origownvtx=new AliAODVertex(*dd->GetOwnPrimaryVtx());
184 if(!RecalcOwnPrimaryVtx(dd,aod)) {
185 CleanOwnPrimaryVtx(dd,aod,origownvtx);
193 if(TMath::Abs(pdgdaughters[0])==321){
194 vars[iter]=dd->InvMassDsKKpi();
196 vars[iter]=dd->InvMassDspiKK();
201 Float_t minPtDau=99999.;
202 for(Int_t iprong=0;iprong<3;iprong++){
203 if(TMath::Abs(pdgdaughters[iprong])==321 &&
204 dd->PtProng(iprong)<minPtDau) minPtDau=dd->PtProng(iprong);
210 for(Int_t iprong=0;iprong<3;iprong++){
211 if(TMath::Abs(pdgdaughters[iprong])==211) {
212 vars[iter]=dd->PtProng(iprong);
218 Float_t minImpParDau=99999.;
219 for(Int_t iprong=0;iprong<3;iprong++){
220 if(TMath::Abs(pdgdaughters[iprong])==321 &&
221 dd->Getd0Prong(iprong)<minImpParDau) minImpParDau=dd->Getd0Prong(iprong);
223 vars[iter]=minImpParDau;
227 for(Int_t iprong=0;iprong<3;iprong++){
228 if(TMath::Abs(pdgdaughters[iprong])==211) {
229 vars[iter]=dd->Getd0Prong(iprong);
235 Float_t minDistPair=TMath::Min(dd->GetDist12toPrim(),dd->GetDist23toPrim());
236 vars[iter]=minDistPair;
240 vars[iter]=dd->GetSigmaVert(aod);
244 vars[iter] = dd->DecayLength();
249 for(Int_t i=0;i<3;i++){
250 if(dd->PtProng(i)>ptmax)ptmax=dd->PtProng(i);
256 vars[iter]=dd->CosPointingAngle();
260 vars[iter]=dd->Getd0Prong(0)*dd->Getd0Prong(0)+dd->Getd0Prong(1)*dd->Getd0Prong(1)+dd->Getd0Prong(2)*dd->Getd0Prong(2);
265 for(Int_t i=0;i<3;i++){
266 if(d->GetDCA(i)>maxDCA) maxDCA=d->GetDCA(i);
272 Double_t mPDGPhi = TDatabasePDG::Instance()->GetParticle(333)->Mass();
273 if(TMath::Abs(pdgdaughters[0])==321){
275 Double_t phimass01=d->InvMass2Prongs(0,1,321,321);
276 vars[iter]=TMath::Abs(phimass01-mPDGPhi);
277 // vars[iter]=dd->InvMass2Prongs(0,1,321,321);
279 Double_t phimass12=d->InvMass2Prongs(1,2,321,321);
280 vars[iter]=TMath::Abs(phimass12-mPDGPhi);
281 // vars[iter]=dd->InvMass2Prongs(1,2,321,321);
286 Double_t mPDGK0star = TDatabasePDG::Instance()->GetParticle(313)->Mass();
287 if(TMath::Abs(pdgdaughters[0])==321){
289 Double_t mass12kpi=d->InvMass2Prongs(1,2,321,211);
290 vars[iter]=TMath::Abs(mass12kpi-mPDGK0star);
291 // vars[iter]=dd->InvMass2Prongs(1,2,321,211);
293 Double_t mass01pik=d->InvMass2Prongs(0,1,211,321);
294 vars[iter]=TMath::Abs(mass01pik-mPDGK0star);
295 // vars[iter]=dd->InvMass2Prongs(0,1,211,321);
300 if(TMath::Abs(pdgdaughters[0])==321){
301 vars[iter]=dd->CosPiKPhiRFrameKKpi();
303 vars[iter]=dd->CosPiKPhiRFramepiKK();
308 if(TMath::Abs(pdgdaughters[0])==321){
309 vars[iter]=dd->CosPiDsLabFrameKKpi();
311 vars[iter]=dd->CosPiDsLabFramepiKK();
317 vars[iter]=dd->DecayLengthXY();
322 vars[iter]=dd->NormalizedDecayLength();
327 vars[iter]=dd->NormalizedDecayLengthXY();
332 vars[iter]=dd->CosPointingAngleXY();
335 if(cleanvtx)CleanOwnPrimaryVtx(dd,aod,origownvtx);
338 //---------------------------------------------------------------------------
339 Bool_t AliRDHFCutsDstoKKpi::IsInFiducialAcceptance(Double_t pt, Double_t y) const
342 // Checking if Ds is in fiducial acceptance region
346 // applying cut for pt > 5 GeV
347 AliDebug(2,Form("pt of Ds = %f (> 5), cutting at |y| < 0.8",pt));
348 if (TMath::Abs(y) > 0.8) return kFALSE;
351 // appliying smooth cut for pt < 5 GeV
352 Double_t maxFiducialY = -0.2/15*pt*pt+1.9/15*pt+0.5;
353 Double_t minFiducialY = 0.2/15*pt*pt-1.9/15*pt-0.5;
354 AliDebug(2,Form("pt of Ds = %f (< 5), cutting according to the fiducial zone [%f, %f]\n",pt,minFiducialY,maxFiducialY));
355 if (y < minFiducialY || y > maxFiducialY) return kFALSE;
361 //---------------------------------------------------------------------------
362 Int_t AliRDHFCutsDstoKKpi::IsSelectedPID(AliAODRecoDecayHF *rd) {
364 // return values: 0->NOT OK, 1->OK as KKpi, 2->OK as piKK, 3->OK as both
368 if(!fUsePID || !rd) return retCode;
370 AliWarning("AliAODPidHF not created!");
374 Double_t origCompatTOF=fPidHF->GetPCompatTOF();
375 Double_t origThreshTPC=fPidHF->GetPtThresholdTPC();
376 if(fPidOption==kStrong){
377 fPidHF->SetPCompatTOF(999999.);
378 fPidHF->SetPtThresholdTPC(999999.);
383 Int_t sign= rd->GetCharge();
384 for(Int_t iDaught=0; iDaught<3; iDaught++){
385 AliAODTrack *track=(AliAODTrack*)rd->GetDaughter(iDaught);
387 Int_t isPion=fPidHF->MakeRawPid(track,AliPID::kPion);
388 Int_t isKaon=fPidHF->MakeRawPid(track,AliPID::kKaon);
389 Int_t isProton=fPidHF->MakeRawPid(track,AliPID::kProton);
391 if(isProton>0 && isKaon<0 && isPion<0){
392 fPidHF->SetPCompatTOF(origCompatTOF);
393 fPidHF->SetPtThresholdTPC(origThreshTPC);
396 if(sign!=track->Charge()){// must be kaon
398 fPidHF->SetPCompatTOF(origCompatTOF);
399 fPidHF->SetPtThresholdTPC(origThreshTPC);
402 if(fPidOption==kStrong && rd->Pt()<fMaxPtStrongPid && isKaon<=0){
403 fPidHF->SetPCompatTOF(origCompatTOF);
404 fPidHF->SetPtThresholdTPC(origThreshTPC);
407 if(fPidOption==kStrongPDep && rd->Pt()<fMaxPtStrongPid){
408 if(isKaon<=0 && track->P()<fMaxPStrongPidK) return 0;
412 if(isKaon>0 && isPion<0) nKaons++;
413 if(isKaon<0) nNotKaons++;
415 if(isKaon<0) okKKpi=kFALSE;
416 if(isPion<0) okpiKK=kFALSE;
417 if(fPidOption==kStrong && rd->Pt()<fMaxPtStrongPid){
418 if(isKaon<=0) okKKpi=kFALSE;
419 if(isPion<=0) okpiKK=kFALSE;
421 if(fPidOption==kStrongPDep && rd->Pt()<fMaxPtStrongPid){
422 if(isKaon<=0 && track->P()<fMaxPStrongPidK) okKKpi=kFALSE;
423 if(isPion<=0 && track->P()<fMaxPStrongPidpi) okpiKK=kFALSE;
427 if(isKaon<0) okpiKK=kFALSE;
428 if(isPion<0) okKKpi=kFALSE;
429 if(fPidOption==kStrong && rd->Pt()<fMaxPtStrongPid){
430 if(isKaon<=0) okpiKK=kFALSE;
431 if(isPion<=0) okKKpi=kFALSE;
433 if(fPidOption==kStrongPDep && rd->Pt()<fMaxPtStrongPid){
434 if(isKaon<=0 && track->P()<fMaxPStrongPidK) okpiKK=kFALSE;
435 if(isPion<=0 && track->P()<fMaxPStrongPidpi) okKKpi=kFALSE;
440 fPidHF->SetPCompatTOF(origCompatTOF);
441 fPidHF->SetPtThresholdTPC(origThreshTPC);
443 if(nKaons>2)return 0;
444 if(nNotKaons>1) return 0;
446 if(!okKKpi) retCode-=1;
447 if(!okpiKK) retCode-=2;
452 //---------------------------------------------------------------------------
453 Int_t AliRDHFCutsDstoKKpi::IsSelected(TObject* obj,Int_t selectionLevel, AliAODEvent* aod) {
459 cout<<"Cut matrix not inizialized. Exit..."<<endl;
463 AliAODRecoDecayHF3Prong* d=(AliAODRecoDecayHF3Prong*)obj;
466 cout<<"AliAODRecoDecayHF3Prong null"<<endl;
470 if(fKeepSignalMC) if(IsSignalMC(d,aod,431)) return 3;
472 Double_t ptD=d->Pt();
473 if(ptD<fMinPtCand) return 0;
474 if(ptD>fMaxPtCand) return 0;
476 if(d->HasBadDaughters()) return 0;
479 // selection on daughter tracks
480 if(selectionLevel==AliRDHFCuts::kAll ||
481 selectionLevel==AliRDHFCuts::kTracks) {
482 if(!AreDaughtersSelected(d)) return 0;
488 // selection on candidate
489 if(selectionLevel==AliRDHFCuts::kAll ||
490 selectionLevel==AliRDHFCuts::kCandidate) {
491 //recalculate vertex w/o daughters
492 AliAODVertex *origownvtx=0x0;
493 if(fRemoveDaughtersFromPrimary) {
494 if(d->GetOwnPrimaryVtx()) origownvtx=new AliAODVertex(*d->GetOwnPrimaryVtx());
495 if(!RecalcOwnPrimaryVtx(d,aod)) {
496 CleanOwnPrimaryVtx(d,aod,origownvtx);
503 Int_t okMassPhiKKpi=0;
504 Int_t okMassPhipiKK=0;
505 Int_t okMassK0starKKpi=0;
506 Int_t okMassK0starpiKK=0;
509 Int_t okDsK0starKKpi=0;
510 Int_t okDsK0starpiKK=0;
513 Int_t ptbin=PtBin(pt);
515 CleanOwnPrimaryVtx(d,aod,origownvtx);
519 Double_t mDsPDG = TDatabasePDG::Instance()->GetParticle(431)->Mass();
520 Double_t mDsKKpi=d->InvMassDsKKpi();
521 Double_t mDspiKK=d->InvMassDspiKK();
522 if(TMath::Abs(mDsKKpi-mDsPDG)>fCutsRD[GetGlobalIndex(0,ptbin)]) okDsKKpi = 0;
523 if(TMath::Abs(mDspiKK-mDsPDG)>fCutsRD[GetGlobalIndex(0,ptbin)]) okDspiKK = 0;
524 if(!okDsKKpi && !okDspiKK){
525 CleanOwnPrimaryVtx(d,aod,origownvtx);
531 // cuts on resonant decays (via Phi or K0*)
532 Double_t mPhiPDG = TDatabasePDG::Instance()->GetParticle(333)->Mass();
533 Double_t mK0starPDG = TDatabasePDG::Instance()->GetParticle(313)->Mass();
535 Double_t mass01phi=d->InvMass2Prongs(0,1,321,321);
536 Double_t mass12K0s=d->InvMass2Prongs(1,2,321,211);
537 if(TMath::Abs(mass01phi-mPhiPDG)<fCutsRD[GetGlobalIndex(12,ptbin)]) okMassPhiKKpi=1;
538 if(TMath::Abs(mass12K0s-mK0starPDG)<fCutsRD[GetGlobalIndex(13,ptbin)]) okMassK0starKKpi = 1;
539 if(!okMassPhiKKpi && !okMassK0starKKpi) okDsKKpi=0;
540 if(okMassPhiKKpi) okDsPhiKKpi=1;
541 if(okMassK0starKKpi) okDsK0starKKpi=1;
544 Double_t mass01K0s=d->InvMass2Prongs(0,1,211,321);
545 Double_t mass12phi=d->InvMass2Prongs(1,2,321,321);
546 if(TMath::Abs(mass01K0s-mK0starPDG)<fCutsRD[GetGlobalIndex(13,ptbin)]) okMassK0starpiKK = 1;
547 if(TMath::Abs(mass12phi-mPhiPDG)<fCutsRD[GetGlobalIndex(12,ptbin)]) okMassPhipiKK=1;
548 if(!okMassPhipiKK && !okMassK0starpiKK) okDspiKK=0;
549 if(okMassPhipiKK) okDsPhipiKK=1;
550 if(okMassK0starpiKK) okDsK0starpiKK=1;
552 if(!okDsKKpi && !okDspiKK){
553 CleanOwnPrimaryVtx(d,aod,origownvtx);
557 // Cuts on track pairs
558 for(Int_t i=0;i<3;i++){
559 if(d->GetDCA(i)>fCutsRD[GetGlobalIndex(11,ptbin)]){
560 CleanOwnPrimaryVtx(d,aod,origownvtx);
564 if(d->GetDist12toPrim()<fCutsRD[GetGlobalIndex(5,ptbin)] ||
565 d->GetDist23toPrim()<fCutsRD[GetGlobalIndex(5,ptbin)]){
566 CleanOwnPrimaryVtx(d,aod,origownvtx);
573 if(TMath::Abs(d->Pt2Prong(1)) < fCutsRD[GetGlobalIndex(1,ptbin)]*fCutsRD[GetGlobalIndex(1,ptbin)] ||
574 TMath::Abs(d->Getd0Prong(1))<fCutsRD[GetGlobalIndex(3,ptbin)]){
575 CleanOwnPrimaryVtx(d,aod,origownvtx);
580 if(TMath::Abs(d->Pt2Prong(0)) < fCutsRD[GetGlobalIndex(1,ptbin)]*fCutsRD[GetGlobalIndex(1,ptbin)] ||
581 TMath::Abs(d->Getd0Prong(0))<fCutsRD[GetGlobalIndex(3,ptbin)]) okDsKKpi=0;
582 if(TMath::Abs(d->Pt2Prong(2)) < fCutsRD[GetGlobalIndex(2,ptbin)]*fCutsRD[GetGlobalIndex(2,ptbin)] ||
583 TMath::Abs(d->Getd0Prong(2))<fCutsRD[GetGlobalIndex(4,ptbin)]) okDsKKpi=0;
586 if(TMath::Abs(d->Pt2Prong(0)) < fCutsRD[GetGlobalIndex(2,ptbin)]*fCutsRD[GetGlobalIndex(2,ptbin)] ||
587 TMath::Abs(d->Getd0Prong(0))<fCutsRD[GetGlobalIndex(4,ptbin)]) okDspiKK=0;
588 if(TMath::Abs(d->Pt2Prong(2)) < fCutsRD[GetGlobalIndex(1,ptbin)]*fCutsRD[GetGlobalIndex(1,ptbin)] ||
589 TMath::Abs(d->Getd0Prong(2))<fCutsRD[GetGlobalIndex(3,ptbin)]) okDspiKK=0;
591 if(!okDsKKpi && !okDspiKK){
592 CleanOwnPrimaryVtx(d,aod,origownvtx);
596 // Cuts on candidate triplet
599 if(d->CosPointingAngle()< fCutsRD[GetGlobalIndex(9,ptbin)]){
600 CleanOwnPrimaryVtx(d,aod,origownvtx);
604 if(d->Pt2Prong(0)<fCutsRD[GetGlobalIndex(8,ptbin)]*fCutsRD[GetGlobalIndex(8,ptbin)] &&
605 d->Pt2Prong(1)<fCutsRD[GetGlobalIndex(8,ptbin)]*fCutsRD[GetGlobalIndex(8,ptbin)] &&
606 d->Pt2Prong(2)<fCutsRD[GetGlobalIndex(8,ptbin)]*fCutsRD[GetGlobalIndex(8,ptbin)]) {
607 CleanOwnPrimaryVtx(d,aod,origownvtx);
611 if(d->DecayLength2()<fCutsRD[GetGlobalIndex(7,ptbin)]*fCutsRD[GetGlobalIndex(7,ptbin)]){
612 CleanOwnPrimaryVtx(d,aod,origownvtx);
617 Double_t sum2=d->Getd0Prong(0)*d->Getd0Prong(0)+d->Getd0Prong(1)*d->Getd0Prong(1)+d->Getd0Prong(2)*d->Getd0Prong(2);
618 if(sum2<fCutsRD[GetGlobalIndex(10,ptbin)]){
619 CleanOwnPrimaryVtx(d,aod,origownvtx);
625 Double_t sigmavert=d->GetSigmaVert(aod);
626 if(sigmavert>fCutsRD[GetGlobalIndex(6,ptbin)]){
627 CleanOwnPrimaryVtx(d,aod,origownvtx);
632 if(d->DecayLengthXY()<fCutsRD[GetGlobalIndex(16,ptbin)]){
633 CleanOwnPrimaryVtx(d,aod,origownvtx);
638 if(d->NormalizedDecayLength()<fCutsRD[GetGlobalIndex(17,ptbin)]){
639 CleanOwnPrimaryVtx(d,aod,origownvtx);
643 //norm decay length XY
644 if(d->NormalizedDecayLengthXY()<fCutsRD[GetGlobalIndex(18,ptbin)]){
645 CleanOwnPrimaryVtx(d,aod,origownvtx);
650 if(d->CosPointingAngleXY()<fCutsRD[GetGlobalIndex(19,ptbin)]){
651 CleanOwnPrimaryVtx(d,aod,origownvtx);
657 Double_t cosPiKPhiRFKKpi=d->CosPiKPhiRFrameKKpi();
658 Double_t kincutPiKPhiKKpi=TMath::Abs(cosPiKPhiRFKKpi*cosPiKPhiRFKKpi*cosPiKPhiRFKKpi);
659 if(kincutPiKPhiKKpi<fCutsRD[GetGlobalIndex(14,ptbin)]) okDsKKpi=0;
662 Double_t cosPiKPhiRFpiKK=d->CosPiKPhiRFramepiKK();
663 Double_t kincutPiKPhipiKK=TMath::Abs(cosPiKPhiRFpiKK*cosPiKPhiRFpiKK*cosPiKPhiRFpiKK);
664 if(kincutPiKPhipiKK<fCutsRD[GetGlobalIndex(14,ptbin)]) okDspiKK=0;
666 if(!okDsKKpi && !okDspiKK){
667 CleanOwnPrimaryVtx(d,aod,origownvtx);
674 Double_t cosPiDsLabFrameKKpi=d->CosPiDsLabFrameKKpi();
675 if(cosPiDsLabFrameKKpi>fCutsRD[GetGlobalIndex(15,ptbin)]) okDsKKpi=0;
678 Double_t cosPiDsLabFramepiKK=d->CosPiDsLabFramepiKK();
679 if(cosPiDsLabFramepiKK>fCutsRD[GetGlobalIndex(15,ptbin)]) okDspiKK=0;
681 if(!okDsKKpi && !okDspiKK){
682 CleanOwnPrimaryVtx(d,aod,origownvtx);
686 // unset recalculated primary vertex when not needed any more
687 CleanOwnPrimaryVtx(d,aod,origownvtx);
701 Int_t returnvaluePID=3;
702 if(selectionLevel==AliRDHFCuts::kAll ||
703 selectionLevel==AliRDHFCuts::kCandidate ||
704 selectionLevel==AliRDHFCuts::kPID) {
705 returnvaluePID = IsSelectedPID(d);
706 fIsSelectedPID=returnvaluePID;
708 if(returnvaluePID==0)return 0;
710 Bool_t okPidDsKKpi=returnvaluePID&1;
711 Bool_t okPidDspiKK=returnvaluePID&2;
721 if((okPidDsKKpi && okDsKKpi)||(okPidDspiKK && okDspiKK)){
723 if(okDsKKpi) returnvalue+=1;
724 if(okDspiKK) returnvalue+=2;
725 if(okDsPhiKKpi) returnvalue+=4;
726 if(okDsPhipiKK) returnvalue+=8;
727 if(okDsK0starKKpi) returnvalue+=16;
728 if(okDsK0starpiKK) returnvalue+=32;
738 //--------------------------------------------------------------------------
740 UInt_t AliRDHFCutsDstoKKpi::GetPIDTrackTPCTOFBitMap(AliAODTrack *track) const{
744 Double_t sigmaTPCPionHyp=-999.;
745 Double_t sigmaTPCKaonHyp=-999.;
746 Double_t sigmaTPCProtonHyp=-999.;
747 Double_t sigmaTOFPionHyp=-999.;
748 Double_t sigmaTOFKaonHyp=-999.;
749 Double_t sigmaTOFProtonHyp=-999.;
751 Int_t oksigmaTPCPionHyp=fPidHF->GetnSigmaTPC(track,2,sigmaTPCPionHyp);
752 Int_t oksigmaTPCKaonHyp=fPidHF->GetnSigmaTPC(track,3,sigmaTPCKaonHyp);
753 Int_t oksigmaTPCProtonHyp=fPidHF->GetnSigmaTPC(track,4,sigmaTPCProtonHyp);
754 Int_t oksigmaTOFPionHyp=fPidHF->GetnSigmaTOF(track,2,sigmaTOFPionHyp);
755 Int_t oksigmaTOFKaonHyp=fPidHF->GetnSigmaTOF(track,3,sigmaTOFKaonHyp);
756 Int_t oksigmaTOFProtonHyp=fPidHF->GetnSigmaTOF(track,4,sigmaTOFProtonHyp);
758 sigmaTPCPionHyp=TMath::Abs(sigmaTPCPionHyp);
759 sigmaTPCKaonHyp=TMath::Abs(sigmaTPCKaonHyp);
760 sigmaTPCProtonHyp=TMath::Abs(sigmaTPCProtonHyp);
761 sigmaTOFPionHyp=TMath::Abs(sigmaTOFPionHyp);
762 sigmaTOFKaonHyp=TMath::Abs(sigmaTOFKaonHyp);
763 sigmaTOFProtonHyp=TMath::Abs(sigmaTOFProtonHyp);
765 if (oksigmaTPCPionHyp && sigmaTPCPionHyp>0.){
766 if (sigmaTPCPionHyp<1.) bitmap+=1<<kTPCPionLess1;
768 if (sigmaTPCPionHyp<2.) bitmap+=1<<kTPCPionMore1Less2;
770 if (sigmaTPCPionHyp<3.) bitmap+=1<<kTPCPionMore2Less3;
771 else bitmap+=1<<kTPCPionMore3;
776 if (oksigmaTPCKaonHyp && sigmaTPCKaonHyp>0.){
777 if (sigmaTPCKaonHyp<1.) bitmap+=1<<kTPCKaonLess1;
779 if (sigmaTPCKaonHyp<2.) bitmap+=1<<kTPCKaonMore1Less2;
781 if (sigmaTPCKaonHyp<3.) bitmap+=1<<kTPCKaonMore2Less3;
782 else bitmap+=1<<kTPCKaonMore3;
787 if (oksigmaTPCProtonHyp && sigmaTPCProtonHyp>0.){
788 if (sigmaTPCProtonHyp<1.) bitmap+=1<<kTPCProtonLess1;
790 if (sigmaTPCProtonHyp<2.) bitmap+=1<<kTPCProtonMore1Less2;
792 if (sigmaTPCProtonHyp<3.) bitmap+=1<<kTPCProtonMore2Less3;
793 else bitmap+=1<<kTPCProtonMore3;
798 if (oksigmaTOFPionHyp && sigmaTOFPionHyp>0.){
799 if (sigmaTOFPionHyp<1.) bitmap+=1<<kTOFPionLess1;
801 if (sigmaTOFPionHyp<2.) bitmap+=1<<kTOFPionMore1Less2;
803 if (sigmaTOFPionHyp<3.) bitmap+=1<<kTOFPionMore2Less3;
804 else bitmap+=1<<kTOFPionMore3;
809 if (oksigmaTOFKaonHyp && sigmaTOFKaonHyp>0.){
810 if (sigmaTOFKaonHyp<1.) bitmap+=1<<kTOFKaonLess1;
812 if (sigmaTOFKaonHyp<2.) bitmap+=1<<kTOFKaonMore1Less2;
814 if (sigmaTOFKaonHyp<3.) bitmap+=1<<kTOFKaonMore2Less3;
815 else bitmap+=1<<kTOFKaonMore3;
820 if (oksigmaTOFProtonHyp && sigmaTOFProtonHyp>0.){
821 if (sigmaTOFProtonHyp<1.) bitmap+=1<<kTOFProtonLess1;
823 if (sigmaTOFProtonHyp<2.) bitmap+=1<<kTOFProtonMore1Less2;
825 if (sigmaTOFProtonHyp<3.) bitmap+=1<<kTOFProtonMore2Less3;
826 else bitmap+=1<<kTOFProtonMore3;
838 //---------------------------------------------------------------------------
840 void AliRDHFCutsDstoKKpi::SetStandardCutsPP2010() {
842 //STANDARD CUTS USED FOR 2010 pp analysis
845 SetName("DstoKKpiCutsStandard");
846 SetTitle("Standard Cuts for D+s analysis");
849 SetOptPileup(AliRDHFCuts::kRejectPileupEvent);
854 AliESDtrackCuts* esdTrackCuts=new AliESDtrackCuts();
855 esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
857 esdTrackCuts->SetRequireTPCRefit(kTRUE);
858 esdTrackCuts->SetRequireITSRefit(kTRUE);
859 //esdTrackCuts->SetMinNClustersITS(4); // default is 5
860 esdTrackCuts->SetMinNClustersTPC(70);
861 esdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD,
862 AliESDtrackCuts::kAny);
863 // default is kBoth, otherwise kAny
864 esdTrackCuts->SetMinDCAToVertexXY(0.);
865 esdTrackCuts->SetPtRange(0.3,1.e10);
867 AddTrackCuts(esdTrackCuts);
871 const Int_t nptbins=4;
872 Float_t ptbins[nptbins+1];
879 const Int_t nvars=20;
881 Float_t** anacutsval;
882 anacutsval=new Float_t*[nvars];
884 for(Int_t ic=0;ic<nvars;ic++){anacutsval[ic]=new Float_t[nptbins];}
885 for(Int_t ipt=0;ipt<nptbins;ipt++){
887 anacutsval[0][ipt]=0.35;
888 anacutsval[1][ipt]=0.3;
889 anacutsval[2][ipt]=0.3;
890 anacutsval[3][ipt]=0.;
891 anacutsval[4][ipt]=0.;
892 anacutsval[5][ipt]=0.005;
893 anacutsval[8][ipt]=0.;
894 anacutsval[10][ipt]=0.;
895 anacutsval[11][ipt]=1000.0;
896 anacutsval[13][ipt]=0.1;
897 anacutsval[16][ipt]=0.;
898 anacutsval[17][ipt]=0.;
899 anacutsval[18][ipt]=0.;
900 anacutsval[19][ipt]=-1.;
907 anacutsval[6][0]=0.020;
908 anacutsval[6][1]=0.030;
909 anacutsval[6][2]=0.030;
910 anacutsval[6][3]=0.060;
914 anacutsval[7][0]=0.035;
915 anacutsval[7][1]=0.035;
916 anacutsval[7][2]=0.040;
917 anacutsval[7][3]=0.040;
921 anacutsval[9][0]=0.94;
922 anacutsval[9][1]=0.94;
923 anacutsval[9][2]=0.94;
924 anacutsval[9][3]=0.94;
928 anacutsval[12][0]=0.0080;
929 anacutsval[12][1]=0.0050;
930 anacutsval[12][2]=0.0045;
931 anacutsval[12][3]=0.0090;
935 anacutsval[14][0]=0.10;
936 anacutsval[14][1]=0.05;
937 anacutsval[14][2]=0.0;
938 anacutsval[14][3]=0.05;
942 anacutsval[15][0]=0.95;
943 anacutsval[15][1]=0.95;
944 anacutsval[15][2]=1.;
945 anacutsval[15][3]=0.95;
950 SetMaxPtStrongPid(9999.);
951 SetGlobalIndex(nvars,nptbins);
952 SetPtBins(nptbins+1,ptbins);
953 SetCuts(nvars,nptbins,anacutsval);
954 SetRemoveDaughtersFromPrim(kTRUE);
958 for(Int_t iic=0;iic<nvars;iic++){delete [] anacutsval[iic];}
959 delete [] anacutsval;