AliPhysics  c0be15e (c0be15e)
AliRDHFCutsDstoKKpi.cxx
Go to the documentation of this file.
1 /**************************************************************************
2  * Copyright(c) 1998-2010, ALICE Experiment at CERN, All rights reserved. *
3  * *
4  * Author: The ALICE Off-line Project. *
5  * Contributors are mentioned in the code where appropriate. *
6  * *
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  **************************************************************************/
15 
16 /* $Id$ */
17 
19 //
20 // Class for cuts on AOD reconstructed Ds->KKpi
21 //
22 // Author: A.Dainese, andrea.dainese@pd.infn.it
24 
25 #include <TDatabasePDG.h>
26 #include <Riostream.h>
27 
28 #include "AliRDHFCutsDstoKKpi.h"
30 #include "AliAODTrack.h"
31 #include "AliESDtrack.h"
32 
33 using std::cout;
34 using std::endl;
35 
37 ClassImp(AliRDHFCutsDstoKKpi);
39 
40 
41 //--------------------------------------------------------------------------
43  AliRDHFCuts(name),
44  fCutOnResonances(kTRUE),
45  fPidOption(0),
46  fMaxPtStrongPid(0.),
47  fMaxPStrongPidK(0.),
48  fMaxPStrongPidpi(0.),
49  fDistToMaxProb(0.01),
50  fBayesThreshold(0.05),
51  fWeightKKpi(1.),
52  fWeightpiKK(1.),
53  fPhiMassRef(1.019),
54  fUseRefPhiMass(kFALSE),
55  fUsed0MeasMinusExpCut(kFALSE),
56  fMaxd0MeasMinusExp(0x0),
57  fUsed0Cut(kFALSE),
58  fMaxd0(0x0)
59 {
60  //
61  // Default Constructor
62  //
63  Int_t nvars=20;
64  SetNVars(nvars);
65  TString varNames[20]={"inv. mass [GeV]",
66  "pTK [GeV/c]",
67  "pTPi [GeV/c]",
68  "d0K [cm]",
69  "d0Pi [cm]",
70  "dist12 [cm]",
71  "sigmavert [cm]",
72  "decLen [cm]",
73  "ptMax [GeV/c]",
74  "cosThetaPoint",
75  "Sum d0^2 (cm^2)",
76  "dca [cm]",
77  "inv. mass (Mphi-MKK) [GeV]",
78  "inv. mass (MKo*-MKpi) [GeV]",
79  "Abs(CosineKpiPhiRFrame)^3",
80  "CosPiDsLabFrame",
81  "decLenXY [cm]"
82  "NormdecLen",
83  "NormdecLenXY [cm]",
84  "cosThetaPointXY"};
85 
86  Bool_t isUpperCut[20]={kTRUE,
87  kFALSE,
88  kFALSE,
89  kFALSE,
90  kFALSE,
91  kFALSE,
92  kTRUE,
93  kFALSE,
94  kFALSE,
95  kFALSE,
96  kFALSE,
97  kTRUE,
98  kTRUE,
99  kTRUE,
100  kFALSE,
101  kTRUE,
102  kFALSE,
103  kFALSE,
104  kFALSE,
105  kFALSE};
106  SetVarNames(20,varNames,isUpperCut);
107  Bool_t forOpt[20]={kFALSE,
108  kFALSE,
109  kFALSE,
110  kFALSE,
111  kFALSE,
112  kFALSE,
113  kTRUE,
114  kTRUE,
115  kTRUE,
116  kTRUE,
117  kTRUE,
118  kFALSE,
119  kTRUE,
120  kTRUE,
121  kFALSE,
122  kFALSE,
123  kTRUE,
124  kTRUE,
125  kTRUE,
126  kTRUE};
127 
128  SetVarsForOpt(11,forOpt);
129  Float_t limits[2]={0,999999999.};
130  SetPtBins(2,limits);
131  if(fPidHF)delete fPidHF;
132  fPidHF=new AliAODPidHF();
133  Double_t plim[2]={0.6,0.8};
134  Double_t nsigma[5]={2.,1.,2.,3.,0.};
135 
136  fPidHF->SetPLimit(plim,2);
137  fPidHF->SetAsym(kTRUE);
138  fPidHF->SetSigma(nsigma);
139  fPidHF->SetMatch(1);
140  fPidHF->SetTPC(1);
141  fPidHF->SetTOF(1);
142  fPidHF->SetITS(0);
143  fPidHF->SetTRD(0);
144  fPidHF->SetCompat(kTRUE);
145 
146 }
147 //--------------------------------------------------------------------------
149  AliRDHFCuts(source),
151  fPidOption(source.fPidOption),
157  fWeightKKpi(source.fWeightKKpi),
158  fWeightpiKK(source.fWeightpiKK),
159  fPhiMassRef(source.fPhiMassRef),
162  fMaxd0MeasMinusExp(0x0),
163  fUsed0Cut(source.fUsed0Cut),
164  fMaxd0(0x0)
165 {
166  //
167  // Copy constructor
168  //
170  if(source.fMaxd0) Setd0Cut(source.fnPtBins,source.fMaxd0);
171 }
172 //--------------------------------------------------------------------------
174 {
175  //
176  // assignment operator
177  //
178  if(&source == this) return *this;
179 
180  AliRDHFCuts::operator=(source);
181 
183  fPidOption=source.fPidOption;
189  fWeightKKpi=source.fWeightKKpi;
190  fWeightpiKK=source.fWeightpiKK;
191  fPhiMassRef=source.fPhiMassRef;
194  fUsed0Cut=source.fUsed0Cut;
196  if(source.fMaxd0) Setd0Cut(source.fnPtBins,source.fMaxd0);
197 
198  return *this;
199 }
200 
201 //---------------------------------------------------------------------------
203  //
204  // store the cuts
205  //
206  if(nPtBins!=fnPtBins) {
207  printf("Wrong number of pt bins: it has to be %d\n",fnPtBins);
208  AliFatal("exiting");
209  }
211  for(Int_t ib=0; ib<fnPtBins; ib++) fMaxd0MeasMinusExp[ib] = cutval[ib];
212  fUsed0MeasMinusExpCut=kTRUE;
213  return;
214 }
215 
216 //---------------------------------------------------------------------------
218  //
219  // store the cuts
220  //
221  if(nPtBins!=fnPtBins) {
222  printf("Wrong number of pt bins: it has to be %d\n",fnPtBins);
223  AliFatal("exiting");
224  }
225  if(!fMaxd0) fMaxd0 = new Float_t[fnPtBins];
226  for(Int_t ib=0; ib<fnPtBins; ib++) fMaxd0[ib] = cutval[ib];
227  fUsed0Cut=kTRUE;
228  return;
229 }
230 
231 
232 //---------------------------------------------------------------------------
234  //
235  // Fills in vars the values of the variables
236  //
237 
238  if(nvars!=fnVarsForOpt) {
239  printf("AliRDHFCutsDstoKKpi::GetCutsVarsForOpt: wrong number of variables\n");
240  return;
241  }
242 
244 
245  //recalculate vertex w/o daughters
246  Bool_t cleanvtx=kFALSE;
247  AliAODVertex *origownvtx=0x0;
249  if(dd->GetOwnPrimaryVtx()) origownvtx=new AliAODVertex(*dd->GetOwnPrimaryVtx());
250  cleanvtx=kTRUE;
251  if(!RecalcOwnPrimaryVtx(dd,aod)) {
252  CleanOwnPrimaryVtx(dd,aod,origownvtx);
253  cleanvtx=kFALSE;
254  }
255  }
256 
257  Int_t iter=-1;
258  if(fVarsForOpt[0]){
259  iter++;
260  if(TMath::Abs(pdgdaughters[0])==321){
261  vars[iter]=dd->InvMassDsKKpi();
262  }else{
263  vars[iter]=dd->InvMassDspiKK();
264  }
265  }
266  if(fVarsForOpt[1]){
267  iter++;
268  Float_t minPtDau=99999.;
269  for(Int_t iprong=0;iprong<3;iprong++){
270  if(TMath::Abs(pdgdaughters[iprong])==321 &&
271  dd->PtProng(iprong)<minPtDau) minPtDau=dd->PtProng(iprong);
272  }
273  vars[iter]=minPtDau;
274  }
275  if(fVarsForOpt[2]){
276  iter++;
277  for(Int_t iprong=0;iprong<3;iprong++){
278  if(TMath::Abs(pdgdaughters[iprong])==211) {
279  vars[iter]=dd->PtProng(iprong);
280  }
281  }
282  }
283  if(fVarsForOpt[3]){
284  iter++;
285  Float_t minImpParDau=99999.;
286  for(Int_t iprong=0;iprong<3;iprong++){
287  if(TMath::Abs(pdgdaughters[iprong])==321 &&
288  dd->Getd0Prong(iprong)<minImpParDau) minImpParDau=dd->Getd0Prong(iprong);
289  }
290  vars[iter]=minImpParDau;
291  }
292  if(fVarsForOpt[4]){
293  iter++;
294  for(Int_t iprong=0;iprong<3;iprong++){
295  if(TMath::Abs(pdgdaughters[iprong])==211) {
296  vars[iter]=dd->Getd0Prong(iprong);
297  }
298  }
299  }
300  if(fVarsForOpt[5]){
301  iter++;
302  Float_t minDistPair=TMath::Min(dd->GetDist12toPrim(),dd->GetDist23toPrim());
303  vars[iter]=minDistPair;
304  }
305  if(fVarsForOpt[6]){
306  iter++;
307  vars[iter]=dd->GetSigmaVert(aod);
308  }
309  if(fVarsForOpt[7]){
310  iter++;
311  vars[iter] = dd->DecayLength();
312  }
313  if(fVarsForOpt[8]){
314  iter++;
315  Float_t ptmax=0;
316  for(Int_t i=0;i<3;i++){
317  if(dd->PtProng(i)>ptmax)ptmax=dd->PtProng(i);
318  }
319  vars[iter]=ptmax;
320  }
321  if(fVarsForOpt[9]){
322  iter++;
323  vars[iter]=dd->CosPointingAngle();
324  }
325  if(fVarsForOpt[10]){
326  iter++;
327  vars[iter]=dd->Getd0Prong(0)*dd->Getd0Prong(0)+dd->Getd0Prong(1)*dd->Getd0Prong(1)+dd->Getd0Prong(2)*dd->Getd0Prong(2);
328  }
329  if(fVarsForOpt[11]){
330  iter++;
331  Float_t maxDCA=0.;
332  for(Int_t i=0;i<3;i++){
333  if(d->GetDCA(i)>maxDCA) maxDCA=d->GetDCA(i);
334  }
335  vars[iter]=maxDCA;
336  }
337  if(fVarsForOpt[12]){
338  iter++;
339  Double_t mPDGPhi = TDatabasePDG::Instance()->GetParticle(333)->Mass();
340  if(TMath::Abs(pdgdaughters[0])==321){
341 
342  Double_t phimass01=d->InvMass2Prongs(0,1,321,321);
343  vars[iter]=TMath::Abs(phimass01-mPDGPhi);
344  // vars[iter]=dd->InvMass2Prongs(0,1,321,321);
345  }else{
346  Double_t phimass12=d->InvMass2Prongs(1,2,321,321);
347  vars[iter]=TMath::Abs(phimass12-mPDGPhi);
348  // vars[iter]=dd->InvMass2Prongs(1,2,321,321);
349  }
350  }
351  if(fVarsForOpt[13]){
352  iter++;
353  Double_t mPDGK0star = TDatabasePDG::Instance()->GetParticle(313)->Mass();
354  if(TMath::Abs(pdgdaughters[0])==321){
355 
356  Double_t mass12kpi=d->InvMass2Prongs(1,2,321,211);
357  vars[iter]=TMath::Abs(mass12kpi-mPDGK0star);
358  // vars[iter]=dd->InvMass2Prongs(1,2,321,211);
359  }else{
360  Double_t mass01pik=d->InvMass2Prongs(0,1,211,321);
361  vars[iter]=TMath::Abs(mass01pik-mPDGK0star);
362  // vars[iter]=dd->InvMass2Prongs(0,1,211,321);
363  }
364  }
365  if(fVarsForOpt[14]){
366  iter++;
367  if(TMath::Abs(pdgdaughters[0])==321){
368  vars[iter]=dd->CosPiKPhiRFrameKKpi();
369  }else{
370  vars[iter]=dd->CosPiKPhiRFramepiKK();
371  }
372  }
373  if(fVarsForOpt[15]){
374  iter++;
375  if(TMath::Abs(pdgdaughters[0])==321){
376  vars[iter]=dd->CosPiDsLabFrameKKpi();
377  }else{
378  vars[iter]=dd->CosPiDsLabFramepiKK();
379  }
380  }
381 
382  if(fVarsForOpt[16]){
383  iter++;
384  vars[iter]=dd->DecayLengthXY();
385  }
386 
387  if(fVarsForOpt[17]){
388  iter++;
389  vars[iter]=dd->NormalizedDecayLength();
390  }
391 
392  if(fVarsForOpt[18]){
393  iter++;
394  vars[iter]=dd->NormalizedDecayLengthXY();
395  }
396 
397  if(fVarsForOpt[19]){
398  iter++;
399  vars[iter]=dd->CosPointingAngleXY();
400  }
401 
402  if(cleanvtx)CleanOwnPrimaryVtx(dd,aod,origownvtx);
403  return;
404 }
405 //---------------------------------------------------------------------------
407 {
408  //
409  // Checking if Ds is in fiducial acceptance region
410  //
411 
412  if(fMaxRapidityCand>-998.){
413  if(TMath::Abs(y) > fMaxRapidityCand) return kFALSE;
414  else return kTRUE;
415  }
416 
417  if(pt > 5.) {
418  // applying cut for pt > 5 GeV
419  AliDebug(2,Form("pt of Ds = %f (> 5), cutting at |y| < 0.8",pt));
420  if (TMath::Abs(y) > 0.8) return kFALSE;
421 
422  } else {
423  // appliying smooth cut for pt < 5 GeV
424  Double_t maxFiducialY = -0.2/15*pt*pt+1.9/15*pt+0.5;
425  Double_t minFiducialY = 0.2/15*pt*pt-1.9/15*pt-0.5;
426  AliDebug(2,Form("pt of Ds = %f (< 5), cutting according to the fiducial zone [%f, %f]\n",pt,minFiducialY,maxFiducialY));
427  if (y < minFiducialY || y > maxFiducialY) return kFALSE;
428  }
429 
430  return kTRUE;
431 }
432 
433 //---------------------------------------------------------------------------
435  Int_t retCode=3;
436  Bool_t okKKpi=kTRUE;
437  Bool_t okpiKK=kTRUE;
438  if(!fUsePID || !rd) return retCode;
439  if(!fPidHF){
440  AliWarning("AliAODPidHF not created!");
441  return retCode;
442  }
444  AliWarning("Wrong call to Bayesian PID");
445  return retCode;
446  }
447 
448  AliPIDCombined* copid=fPidHF->GetPidCombined();
449  copid->SetDetectorMask(AliPIDResponse::kDetTPC | AliPIDResponse::kDetTOF);
450  AliPIDResponse* pidres=fPidHF->GetPidResponse();
451  Double_t bayesProb[AliPID::kSPECIES];
452  Int_t nKaons=0;
453  Int_t nNotKaons=0;
454  Int_t sign= rd->GetCharge();
455  fWeightKKpi=1.;
456  fWeightpiKK=1.;
457  for(Int_t iDaught=0; iDaught<3; iDaught++){
458  AliAODTrack *track=(AliAODTrack*)rd->GetDaughter(iDaught);
459 
460  Int_t isPion=0;
461  Int_t isKaon=0;
462  Int_t isProton=0;
463  UInt_t usedDet=copid->ComputeProbabilities(track,pidres,bayesProb);
464  if(usedDet!=0){
466  Double_t maxProb=TMath::MaxElement(AliPID::kSPECIES,bayesProb);
467  if(TMath::Abs(maxProb-bayesProb[AliPID::kPion])<fDistToMaxProb) isPion=1;
468  else isPion=-1;
469  if(TMath::Abs(maxProb-bayesProb[AliPID::kKaon])<fDistToMaxProb) isKaon=1;
470  else isKaon=-1;
471  if(TMath::Abs(maxProb-bayesProb[AliPID::kProton])<fDistToMaxProb) isProton=1;
472  else isProton=-1;
473  }
475  if(bayesProb[AliPID::kPion]>fBayesThreshold) isPion=1;
476  else isPion=-1;
477  if(bayesProb[AliPID::kKaon]>fBayesThreshold) isKaon=1;
478  else isKaon=-1;
479  if(bayesProb[AliPID::kProton]>fBayesThreshold) isProton=1;
480  else isProton=-1;
481  }
482  }
483  if(fPidOption==kBayesianWeights){ // store the probabilities in the case kBayesianWeights
484  if(iDaught==0){
485  fWeightKKpi*=bayesProb[AliPID::kKaon];
486  fWeightpiKK*=bayesProb[AliPID::kPion];
487  }else if(iDaught==1){
488  fWeightKKpi*=bayesProb[AliPID::kKaon];
489  fWeightpiKK*=bayesProb[AliPID::kKaon];
490  }else if(iDaught==2){
491  fWeightKKpi*=bayesProb[AliPID::kPion];
492  fWeightpiKK*=bayesProb[AliPID::kKaon];
493  }
494  }else{ // selection for the other cases
495  if(isProton>0 && isKaon<0 && isPion<0) return 0;
496  if(sign!=track->Charge()){// must be kaon
497  if(isKaon<0) return 0;
498  }
499  if(isKaon>0 && isPion<0) nKaons++;
500  if(isKaon<0) nNotKaons++;
501  if(iDaught==0){
502  if(isKaon<0) okKKpi=kFALSE;
503  if(isPion<0) okpiKK=kFALSE;
504  }else if(iDaught==2){
505  if(isKaon<0) okpiKK=kFALSE;
506  if(isPion<0) okKKpi=kFALSE;
507  }
508  }
509  }
510  if(fPidOption==kBayesianWeights) return retCode;
511 
512  if(nKaons>2)return 0;
513  if(nNotKaons>1) return 0;
514 
515  if(!okKKpi) retCode-=1;
516  if(!okpiKK) retCode-=2;
517 
518  return retCode;
519 }
520 
521 //---------------------------------------------------------------------------
523  // PID selection
524  // return values: 0->NOT OK, 1->OK as KKpi, 2->OK as piKK, 3->OK as both
525  Int_t retCode=3;
526  Bool_t okKKpi=kTRUE;
527  Bool_t okpiKK=kTRUE;
528  if(!fUsePID || !rd) return retCode;
529  if(!fPidHF){
530  AliWarning("AliAODPidHF not created!");
531  return retCode;
532  }
534  // call method for Bayesian probability
535  return IsSelectedPIDBayes(rd);
536  }
537 
538  Double_t origCompatTOF=fPidHF->GetPCompatTOF();
539  Double_t origThreshTPC=fPidHF->GetPtThresholdTPC();
540  if(fPidOption==kStrong){
541  fPidHF->SetPCompatTOF(999999.);
542  fPidHF->SetPtThresholdTPC(999999.);
543  }
544 
545  Int_t nKaons=0;
546  Int_t nNotKaons=0;
547  Int_t sign= rd->GetCharge();
548  for(Int_t iDaught=0; iDaught<3; iDaught++){
549  AliAODTrack *track=(AliAODTrack*)rd->GetDaughter(iDaught);
550 
551  Int_t isPion=fPidHF->MakeRawPid(track,AliPID::kPion);
552  Int_t isKaon=fPidHF->MakeRawPid(track,AliPID::kKaon);
553  Int_t isProton=fPidHF->MakeRawPid(track,AliPID::kProton);
554 
555  if(isProton>0 && isKaon<0 && isPion<0){
556  fPidHF->SetPCompatTOF(origCompatTOF);
557  fPidHF->SetPtThresholdTPC(origThreshTPC);
558  return 0;
559  }
560  if(sign!=track->Charge()){// must be kaon
561  if(isKaon<0){
562  fPidHF->SetPCompatTOF(origCompatTOF);
563  fPidHF->SetPtThresholdTPC(origThreshTPC);
564  return 0;
565  }
566  if(fPidOption==kStrong && rd->Pt()<fMaxPtStrongPid && isKaon<=0){
567  fPidHF->SetPCompatTOF(origCompatTOF);
568  fPidHF->SetPtThresholdTPC(origThreshTPC);
569  return 0;
570  }
571  if(fPidOption==kStrongPDep && rd->Pt()<fMaxPtStrongPid){
572  if(isKaon<=0 && track->P()<fMaxPStrongPidK) return 0;
573  }
574  }
575 
576  if(isKaon>0 && isPion<0) nKaons++;
577  if(isKaon<0) nNotKaons++;
578  if(iDaught==0){
579  if(isKaon<0) okKKpi=kFALSE;
580  if(isPion<0) okpiKK=kFALSE;
581  if(fPidOption==kStrong && rd->Pt()<fMaxPtStrongPid){
582  if(isKaon<=0) okKKpi=kFALSE;
583  if(isPion<=0) okpiKK=kFALSE;
584  }
585  if(fPidOption==kStrongPDep && rd->Pt()<fMaxPtStrongPid){
586  if(isKaon<=0 && track->P()<fMaxPStrongPidK) okKKpi=kFALSE;
587  if(isPion<=0 && track->P()<fMaxPStrongPidpi) okpiKK=kFALSE;
588  }
589  }
590  else if(iDaught==2){
591  if(isKaon<0) okpiKK=kFALSE;
592  if(isPion<0) okKKpi=kFALSE;
593  if(fPidOption==kStrong && rd->Pt()<fMaxPtStrongPid){
594  if(isKaon<=0) okpiKK=kFALSE;
595  if(isPion<=0) okKKpi=kFALSE;
596  }
597  if(fPidOption==kStrongPDep && rd->Pt()<fMaxPtStrongPid){
598  if(isKaon<=0 && track->P()<fMaxPStrongPidK) okpiKK=kFALSE;
599  if(isPion<=0 && track->P()<fMaxPStrongPidpi) okKKpi=kFALSE;
600  }
601  }
602  }
603 
604  fPidHF->SetPCompatTOF(origCompatTOF);
605  fPidHF->SetPtThresholdTPC(origThreshTPC);
606 
607  if(nKaons>2)return 0;
608  if(nNotKaons>1) return 0;
609 
610  if(!okKKpi) retCode-=1;
611  if(!okpiKK) retCode-=2;
612 
613  return retCode;
614 }
615 
616 //---------------------------------------------------------------------------
618  //
619  // Apply selection
620  //
621 
622  if(!fCutsRD){
623  cout<<"Cut matrix not inizialized. Exit..."<<endl;
624  return 0;
625  }
626  //PrintAll();
628 
629  if(!d){
630  cout<<"AliAODRecoDecayHF3Prong null"<<endl;
631  return 0;
632  }
633 
634  if(fKeepSignalMC) if(IsSignalMC(d,aod,431)) return 3;
635 
636  Double_t ptD=d->Pt();
637  if(ptD<fMinPtCand) return 0;
638  if(ptD>fMaxPtCand) return 0;
639 
641 
642 
643  // selection on daughter tracks
644  if(selectionLevel==AliRDHFCuts::kAll ||
645  selectionLevel==AliRDHFCuts::kTracks) {
646  if(!AreDaughtersSelected(d,aod)) return 0;
647  }
648 
649 
650 
651 
652  // selection on candidate
653  if(selectionLevel==AliRDHFCuts::kAll ||
654  selectionLevel==AliRDHFCuts::kCandidate) {
655  //recalculate vertex w/o daughters
656  AliAODVertex *origownvtx=0x0;
658  if(d->GetOwnPrimaryVtx()) origownvtx=new AliAODVertex(*d->GetOwnPrimaryVtx());
659  if(!RecalcOwnPrimaryVtx(d,aod)) {
660  CleanOwnPrimaryVtx(d,aod,origownvtx);
661  return 0;
662  }
663  }
664 
665  Int_t okDsKKpi=1;
666  Int_t okDspiKK=1;
667  Int_t okMassPhiKKpi=0;
668  Int_t okMassPhipiKK=0;
669  Int_t okMassK0starKKpi=0;
670  Int_t okMassK0starpiKK=0;
671  Int_t okDsPhiKKpi=0;
672  Int_t okDsPhipiKK=0;
673  Int_t okDsK0starKKpi=0;
674  Int_t okDsK0starpiKK=0;
675 
676  Double_t pt=d->Pt();
677  Int_t ptbin=PtBin(pt);
678  if (ptbin==-1) {
679  CleanOwnPrimaryVtx(d,aod,origownvtx);
680  return 0;
681  }
682 
683  Double_t mDsPDG = TDatabasePDG::Instance()->GetParticle(431)->Mass();
684  Double_t mDsKKpi=d->InvMassDsKKpi();
685  Double_t mDspiKK=d->InvMassDspiKK();
686  if(TMath::Abs(mDsKKpi-mDsPDG)>fCutsRD[GetGlobalIndex(0,ptbin)]) okDsKKpi = 0;
687  if(TMath::Abs(mDspiKK-mDsPDG)>fCutsRD[GetGlobalIndex(0,ptbin)]) okDspiKK = 0;
688  if(!okDsKKpi && !okDspiKK){
689  CleanOwnPrimaryVtx(d,aod,origownvtx);
690  return 0;
691  }
692 
693 
694 
695  // cuts on resonant decays (via Phi or K0*)
696  if(fCutOnResonances){
697  Double_t mPhiPDG = TDatabasePDG::Instance()->GetParticle(333)->Mass();
698  Double_t mK0starPDG = TDatabasePDG::Instance()->GetParticle(313)->Mass();
699  Double_t mPhiRef = mPhiPDG;
700  if(fUseRefPhiMass) mPhiRef = fPhiMassRef;
701  if(okDsKKpi){
702  Double_t mass01phi=d->InvMass2Prongs(0,1,321,321);
703  Double_t mass12K0s=d->InvMass2Prongs(1,2,321,211);
704  if(TMath::Abs(mass01phi-mPhiRef)<fCutsRD[GetGlobalIndex(12,ptbin)]) okMassPhiKKpi=1;
705  if(TMath::Abs(mass12K0s-mK0starPDG)<fCutsRD[GetGlobalIndex(13,ptbin)]) okMassK0starKKpi = 1;
706  if(!okMassPhiKKpi && !okMassK0starKKpi) okDsKKpi=0;
707  if(okMassPhiKKpi) okDsPhiKKpi=1;
708  if(okMassK0starKKpi) okDsK0starKKpi=1;
709  }
710  if(okDspiKK){
711  Double_t mass01K0s=d->InvMass2Prongs(0,1,211,321);
712  Double_t mass12phi=d->InvMass2Prongs(1,2,321,321);
713  if(TMath::Abs(mass01K0s-mK0starPDG)<fCutsRD[GetGlobalIndex(13,ptbin)]) okMassK0starpiKK = 1;
714  if(TMath::Abs(mass12phi-mPhiRef)<fCutsRD[GetGlobalIndex(12,ptbin)]) okMassPhipiKK=1;
715  if(!okMassPhipiKK && !okMassK0starpiKK) okDspiKK=0;
716  if(okMassPhipiKK) okDsPhipiKK=1;
717  if(okMassK0starpiKK) okDsK0starpiKK=1;
718  }
719  if(!okDsKKpi && !okDspiKK){
720  CleanOwnPrimaryVtx(d,aod,origownvtx);
721  return 0;
722  }
723  }
724 
725  // Cuts on track pairs
726  for(Int_t i=0;i<3;i++){
727  if(d->GetDCA(i)>fCutsRD[GetGlobalIndex(11,ptbin)]){
728  CleanOwnPrimaryVtx(d,aod,origownvtx);
729  return 0;
730  }
731  }
732  if(d->GetDist12toPrim()<fCutsRD[GetGlobalIndex(5,ptbin)] ||
733  d->GetDist23toPrim()<fCutsRD[GetGlobalIndex(5,ptbin)]){
734  CleanOwnPrimaryVtx(d,aod,origownvtx);
735  return 0;
736  }
737 
738 
739 
740  //single track
741  if(TMath::Abs(d->Pt2Prong(1)) < fCutsRD[GetGlobalIndex(1,ptbin)]*fCutsRD[GetGlobalIndex(1,ptbin)] ||
742  TMath::Abs(d->Getd0Prong(1))<fCutsRD[GetGlobalIndex(3,ptbin)]){
743  CleanOwnPrimaryVtx(d,aod,origownvtx);
744  return 0;
745  }
746 
747  if(okDsKKpi){
748  if(TMath::Abs(d->Pt2Prong(0)) < fCutsRD[GetGlobalIndex(1,ptbin)]*fCutsRD[GetGlobalIndex(1,ptbin)] ||
749  TMath::Abs(d->Getd0Prong(0))<fCutsRD[GetGlobalIndex(3,ptbin)]) okDsKKpi=0;
750  if(TMath::Abs(d->Pt2Prong(2)) < fCutsRD[GetGlobalIndex(2,ptbin)]*fCutsRD[GetGlobalIndex(2,ptbin)] ||
751  TMath::Abs(d->Getd0Prong(2))<fCutsRD[GetGlobalIndex(4,ptbin)]) okDsKKpi=0;
752  }
753  if(okDspiKK){
754  if(TMath::Abs(d->Pt2Prong(0)) < fCutsRD[GetGlobalIndex(2,ptbin)]*fCutsRD[GetGlobalIndex(2,ptbin)] ||
755  TMath::Abs(d->Getd0Prong(0))<fCutsRD[GetGlobalIndex(4,ptbin)]) okDspiKK=0;
756  if(TMath::Abs(d->Pt2Prong(2)) < fCutsRD[GetGlobalIndex(1,ptbin)]*fCutsRD[GetGlobalIndex(1,ptbin)] ||
757  TMath::Abs(d->Getd0Prong(2))<fCutsRD[GetGlobalIndex(3,ptbin)]) okDspiKK=0;
758  }
759  if(!okDsKKpi && !okDspiKK){
760  CleanOwnPrimaryVtx(d,aod,origownvtx);
761  return 0;
762  }
763 
764  // Cuts on candidate triplet
765 
766 
767  if(d->CosPointingAngle()< fCutsRD[GetGlobalIndex(9,ptbin)]){
768  CleanOwnPrimaryVtx(d,aod,origownvtx);
769  return 0;
770  }
771 
772  if(d->Pt2Prong(0)<fCutsRD[GetGlobalIndex(8,ptbin)]*fCutsRD[GetGlobalIndex(8,ptbin)] &&
773  d->Pt2Prong(1)<fCutsRD[GetGlobalIndex(8,ptbin)]*fCutsRD[GetGlobalIndex(8,ptbin)] &&
774  d->Pt2Prong(2)<fCutsRD[GetGlobalIndex(8,ptbin)]*fCutsRD[GetGlobalIndex(8,ptbin)]) {
775  CleanOwnPrimaryVtx(d,aod,origownvtx);
776  return 0;
777  }
778 
779  if(d->DecayLength2()<fCutsRD[GetGlobalIndex(7,ptbin)]*fCutsRD[GetGlobalIndex(7,ptbin)]){
780  CleanOwnPrimaryVtx(d,aod,origownvtx);
781  return 0;
782  }
783 
784 
785  Double_t sum2=d->Getd0Prong(0)*d->Getd0Prong(0)+d->Getd0Prong(1)*d->Getd0Prong(1)+d->Getd0Prong(2)*d->Getd0Prong(2);
786  if(sum2<fCutsRD[GetGlobalIndex(10,ptbin)]){
787  CleanOwnPrimaryVtx(d,aod,origownvtx);
788  return 0;
789  }
790 
791 
792  //sec vert
793  Double_t sigmavert=d->GetSigmaVert(aod);
794  if(sigmavert>fCutsRD[GetGlobalIndex(6,ptbin)]){
795  CleanOwnPrimaryVtx(d,aod,origownvtx);
796  return 0;
797  }
798 
799  // decay length XY
800  if(d->DecayLengthXY()<fCutsRD[GetGlobalIndex(16,ptbin)]){
801  CleanOwnPrimaryVtx(d,aod,origownvtx);
802  return 0;
803  }
804 
805  //norm decay length
806  if(d->NormalizedDecayLength()<fCutsRD[GetGlobalIndex(17,ptbin)]){
807  CleanOwnPrimaryVtx(d,aod,origownvtx);
808  return 0;
809  }
810 
811  //norm decay length XY
812  if(d->NormalizedDecayLengthXY()<fCutsRD[GetGlobalIndex(18,ptbin)]){
813  CleanOwnPrimaryVtx(d,aod,origownvtx);
814  return 0;
815  }
816 
817  //cos pointing XY
818  if(d->CosPointingAngleXY()<fCutsRD[GetGlobalIndex(19,ptbin)]){
819  CleanOwnPrimaryVtx(d,aod,origownvtx);
820  return 0;
821  }
822 
823 
824  if(okDsKKpi){
825  Double_t cosPiKPhiRFKKpi=d->CosPiKPhiRFrameKKpi();
826  Double_t kincutPiKPhiKKpi=TMath::Abs(cosPiKPhiRFKKpi*cosPiKPhiRFKKpi*cosPiKPhiRFKKpi);
827  if(kincutPiKPhiKKpi<fCutsRD[GetGlobalIndex(14,ptbin)]) okDsKKpi=0;
828  }
829  if(okDspiKK){
830  Double_t cosPiKPhiRFpiKK=d->CosPiKPhiRFramepiKK();
831  Double_t kincutPiKPhipiKK=TMath::Abs(cosPiKPhiRFpiKK*cosPiKPhiRFpiKK*cosPiKPhiRFpiKK);
832  if(kincutPiKPhipiKK<fCutsRD[GetGlobalIndex(14,ptbin)]) okDspiKK=0;
833  }
834  if(!okDsKKpi && !okDspiKK){
835  CleanOwnPrimaryVtx(d,aod,origownvtx);
836  return 0;
837  }
838 
839 
840 
841  if(okDsKKpi){
842  Double_t cosPiDsLabFrameKKpi=d->CosPiDsLabFrameKKpi();
843  if(cosPiDsLabFrameKKpi>fCutsRD[GetGlobalIndex(15,ptbin)]) okDsKKpi=0;
844  }
845  if(okDspiKK){
846  Double_t cosPiDsLabFramepiKK=d->CosPiDsLabFramepiKK();
847  if(cosPiDsLabFramepiKK>fCutsRD[GetGlobalIndex(15,ptbin)]) okDspiKK=0;
848  }
849  if(!okDsKKpi && !okDspiKK){
850  CleanOwnPrimaryVtx(d,aod,origownvtx);
851  return 0;
852  }
853 
854  // d0meas-exp
856  Double_t dd0max=0;
857  for(Int_t ipr=0; ipr<3; ipr++) {
858  Double_t diffIP, errdiffIP;
859  d->Getd0MeasMinusExpProng(ipr,aod->GetMagneticField(),diffIP,errdiffIP);
860  Double_t normdd0=0.;
861  if(errdiffIP>0) normdd0=diffIP/errdiffIP;
862  if(ipr==0) dd0max=normdd0;
863  else if(TMath::Abs(normdd0)>TMath::Abs(dd0max)) dd0max=normdd0;
864  }
865  if(TMath::Abs(dd0max)>fMaxd0MeasMinusExp[ptbin]) {CleanOwnPrimaryVtx(d,aod,origownvtx); return 0;}
866  }
867 
868  // d0
869  if(fUsed0Cut){
870  Double_t d0=d->ImpParXY()*10000.;
871  if(TMath::Abs(d0)>fMaxd0[ptbin]) {CleanOwnPrimaryVtx(d,aod,origownvtx); return 0;}
872  }
873 
874 
875  // unset recalculated primary vertex when not needed any more
876  CleanOwnPrimaryVtx(d,aod,origownvtx);
877 
878 
879 
880  if(!okDsKKpi){
881  okDsPhiKKpi=0;
882  okDsK0starKKpi=0;
883  }
884  if(!okDspiKK){
885  okDsPhipiKK=0;
886  okDsK0starpiKK=0;
887  }
888 
889  // PID selection
890  Int_t returnvaluePID=3;
891  if(selectionLevel==AliRDHFCuts::kAll ||
892  selectionLevel==AliRDHFCuts::kCandidate ||
893  selectionLevel==AliRDHFCuts::kPID) {
894  returnvaluePID = IsSelectedPID(d);
895  fIsSelectedPID=returnvaluePID;
896  }
897  if(returnvaluePID==0)return 0;
898 
899  Bool_t okPidDsKKpi=returnvaluePID&1;
900  Bool_t okPidDspiKK=returnvaluePID&2;
901  if(!okPidDsKKpi){
902  okDsPhiKKpi=0;
903  okDsK0starKKpi=0;
904  }
905  if(!okPidDspiKK){
906  okDsPhipiKK=0;
907  okDsK0starpiKK=0;
908  }
909 
910  if((okPidDsKKpi && okDsKKpi)||(okPidDspiKK && okDspiKK)){
911  Int_t returnvalue=0;
912  if(okDsKKpi) returnvalue+=1;
913  if(okDspiKK) returnvalue+=2;
914  if(okDsPhiKKpi) returnvalue+=4;
915  if(okDsPhipiKK) returnvalue+=8;
916  if(okDsK0starKKpi) returnvalue+=16;
917  if(okDsK0starpiKK) returnvalue+=32;
918  return returnvalue;
919  }else{
920  return 0;
921  }
922  }
923  return 15;
924 
925 }
926 
927 //--------------------------------------------------------------------------
928 
930 
931  UInt_t bitmap=0;
932 
933  Double_t sigmaTPCPionHyp=-999.;
934  Double_t sigmaTPCKaonHyp=-999.;
935  Double_t sigmaTPCProtonHyp=-999.;
936  Double_t sigmaTOFPionHyp=-999.;
937  Double_t sigmaTOFKaonHyp=-999.;
938  Double_t sigmaTOFProtonHyp=-999.;
939 
940  Int_t oksigmaTPCPionHyp=fPidHF->GetnSigmaTPC(track,2,sigmaTPCPionHyp);
941  Int_t oksigmaTPCKaonHyp=fPidHF->GetnSigmaTPC(track,3,sigmaTPCKaonHyp);
942  Int_t oksigmaTPCProtonHyp=fPidHF->GetnSigmaTPC(track,4,sigmaTPCProtonHyp);
943  Int_t oksigmaTOFPionHyp=fPidHF->GetnSigmaTOF(track,2,sigmaTOFPionHyp);
944  Int_t oksigmaTOFKaonHyp=fPidHF->GetnSigmaTOF(track,3,sigmaTOFKaonHyp);
945  Int_t oksigmaTOFProtonHyp=fPidHF->GetnSigmaTOF(track,4,sigmaTOFProtonHyp);
946 
947  sigmaTPCPionHyp=TMath::Abs(sigmaTPCPionHyp);
948  sigmaTPCKaonHyp=TMath::Abs(sigmaTPCKaonHyp);
949  sigmaTPCProtonHyp=TMath::Abs(sigmaTPCProtonHyp);
950  sigmaTOFPionHyp=TMath::Abs(sigmaTOFPionHyp);
951  sigmaTOFKaonHyp=TMath::Abs(sigmaTOFKaonHyp);
952  sigmaTOFProtonHyp=TMath::Abs(sigmaTOFProtonHyp);
953 
954  if (oksigmaTPCPionHyp && sigmaTPCPionHyp>0.){
955  if (sigmaTPCPionHyp<1.) bitmap+=1<<kTPCPionLess1;
956  else{
957  if (sigmaTPCPionHyp<2.) bitmap+=1<<kTPCPionMore1Less2;
958  else {
959  if (sigmaTPCPionHyp<3.) bitmap+=1<<kTPCPionMore2Less3;
960  else bitmap+=1<<kTPCPionMore3;
961  }
962  }
963  }
964 
965  if (oksigmaTPCKaonHyp && sigmaTPCKaonHyp>0.){
966  if (sigmaTPCKaonHyp<1.) bitmap+=1<<kTPCKaonLess1;
967  else{
968  if (sigmaTPCKaonHyp<2.) bitmap+=1<<kTPCKaonMore1Less2;
969  else {
970  if (sigmaTPCKaonHyp<3.) bitmap+=1<<kTPCKaonMore2Less3;
971  else bitmap+=1<<kTPCKaonMore3;
972  }
973  }
974  }
975 
976  if (oksigmaTPCProtonHyp && sigmaTPCProtonHyp>0.){
977  if (sigmaTPCProtonHyp<1.) bitmap+=1<<kTPCProtonLess1;
978  else{
979  if (sigmaTPCProtonHyp<2.) bitmap+=1<<kTPCProtonMore1Less2;
980  else {
981  if (sigmaTPCProtonHyp<3.) bitmap+=1<<kTPCProtonMore2Less3;
982  else bitmap+=1<<kTPCProtonMore3;
983  }
984  }
985  }
986 
987  if (oksigmaTOFPionHyp && sigmaTOFPionHyp>0.){
988  if (sigmaTOFPionHyp<1.) bitmap+=1<<kTOFPionLess1;
989  else{
990  if (sigmaTOFPionHyp<2.) bitmap+=1<<kTOFPionMore1Less2;
991  else {
992  if (sigmaTOFPionHyp<3.) bitmap+=1<<kTOFPionMore2Less3;
993  else bitmap+=1<<kTOFPionMore3;
994  }
995  }
996  }
997 
998  if (oksigmaTOFKaonHyp && sigmaTOFKaonHyp>0.){
999  if (sigmaTOFKaonHyp<1.) bitmap+=1<<kTOFKaonLess1;
1000  else{
1001  if (sigmaTOFKaonHyp<2.) bitmap+=1<<kTOFKaonMore1Less2;
1002  else {
1003  if (sigmaTOFKaonHyp<3.) bitmap+=1<<kTOFKaonMore2Less3;
1004  else bitmap+=1<<kTOFKaonMore3;
1005  }
1006  }
1007  }
1008 
1009  if (oksigmaTOFProtonHyp && sigmaTOFProtonHyp>0.){
1010  if (sigmaTOFProtonHyp<1.) bitmap+=1<<kTOFProtonLess1;
1011  else{
1012  if (sigmaTOFProtonHyp<2.) bitmap+=1<<kTOFProtonMore1Less2;
1013  else {
1014  if (sigmaTOFProtonHyp<3.) bitmap+=1<<kTOFProtonMore2Less3;
1015  else bitmap+=1<<kTOFProtonMore3;
1016  }
1017  }
1018  }
1019 
1020 
1021 
1022  return bitmap;
1023 
1024 }
1025 
1026 
1027 //---------------------------------------------------------------------------
1028 
1030  //
1031  //STANDARD CUTS USED FOR 2010 pp analysis
1032  //
1033 
1034  SetName("DstoKKpiCutsStandard");
1035  SetTitle("Standard Cuts for D+s analysis");
1036 
1037  // PILE UP REJECTION
1039 
1040  // EVENT CUTS
1041  SetMinVtxContr(1);
1042 
1043  AliESDtrackCuts* esdTrackCuts=new AliESDtrackCuts();
1044  esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
1045  //default
1046  esdTrackCuts->SetRequireTPCRefit(kTRUE);
1047  esdTrackCuts->SetRequireITSRefit(kTRUE);
1048  //esdTrackCuts->SetMinNClustersITS(4); // default is 5
1049  esdTrackCuts->SetMinNClustersTPC(70);
1050  esdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD,
1051  AliESDtrackCuts::kAny);
1052  // default is kBoth, otherwise kAny
1053  esdTrackCuts->SetMinDCAToVertexXY(0.);
1054  esdTrackCuts->SetPtRange(0.3,1.e10);
1055 
1056  AddTrackCuts(esdTrackCuts);
1057  delete esdTrackCuts;
1058  esdTrackCuts=NULL;
1059 
1060 
1061  const Int_t nptbins=4;
1062  Float_t ptbins[nptbins+1];
1063  ptbins[0]=2.;
1064  ptbins[1]=4.;
1065  ptbins[2]=6.;
1066  ptbins[3]=8.;
1067  ptbins[4]=12.;
1068 
1069  const Int_t nvars=20;
1070 
1071  Float_t** anacutsval;
1072  anacutsval=new Float_t*[nvars];
1073 
1074  for(Int_t ic=0;ic<nvars;ic++){anacutsval[ic]=new Float_t[nptbins];}
1075  for(Int_t ipt=0;ipt<nptbins;ipt++){
1076 
1077  anacutsval[0][ipt]=0.35;
1078  anacutsval[1][ipt]=0.3;
1079  anacutsval[2][ipt]=0.3;
1080  anacutsval[3][ipt]=0.;
1081  anacutsval[4][ipt]=0.;
1082  anacutsval[5][ipt]=0.005;
1083  anacutsval[8][ipt]=0.;
1084  anacutsval[10][ipt]=0.;
1085  anacutsval[11][ipt]=1000.0;
1086  anacutsval[13][ipt]=0.1;
1087  anacutsval[16][ipt]=0.;
1088  anacutsval[17][ipt]=0.;
1089  anacutsval[18][ipt]=0.;
1090  anacutsval[19][ipt]=-1.;
1091 
1092 
1093  }
1094 
1095  //sigmavertex
1096 
1097  anacutsval[6][0]=0.020;
1098  anacutsval[6][1]=0.030;
1099  anacutsval[6][2]=0.030;
1100  anacutsval[6][3]=0.060;
1101 
1102  //Decay length
1103 
1104  anacutsval[7][0]=0.035;
1105  anacutsval[7][1]=0.035;
1106  anacutsval[7][2]=0.040;
1107  anacutsval[7][3]=0.040;
1108 
1109  //cosThetaPoint
1110 
1111  anacutsval[9][0]=0.94;
1112  anacutsval[9][1]=0.94;
1113  anacutsval[9][2]=0.94;
1114  anacutsval[9][3]=0.94;
1115 
1116  //phi DeltaMass
1117 
1118  anacutsval[12][0]=0.0080;
1119  anacutsval[12][1]=0.0050;
1120  anacutsval[12][2]=0.0045;
1121  anacutsval[12][3]=0.0090;
1122 
1123  //Kin1
1124 
1125  anacutsval[14][0]=0.10;
1126  anacutsval[14][1]=0.05;
1127  anacutsval[14][2]=0.0;
1128  anacutsval[14][3]=0.05;
1129 
1130  //Kin2
1131 
1132  anacutsval[15][0]=0.95;
1133  anacutsval[15][1]=0.95;
1134  anacutsval[15][2]=1.;
1135  anacutsval[15][3]=0.95;
1136 
1137  fPidHF->SetOldPid(kTRUE);
1138  SetUsePID(kTRUE);
1139  SetPidOption(1);
1140  SetMaxPtStrongPid(9999.);
1141  SetGlobalIndex(nvars,nptbins);
1142  SetPtBins(nptbins+1,ptbins);
1143  SetCuts(nvars,nptbins,anacutsval);
1145 
1146  PrintAll();
1147 
1148  for(Int_t iic=0;iic<nvars;iic++){delete [] anacutsval[iic];}
1149  delete [] anacutsval;
1150  anacutsval=NULL;
1151 
1152  return;
1153 }
1154 
Double_t NormalizedDecayLengthXY() const
Double_t NormalizedDecayLength() const
void SetAsym(Bool_t asym)
Definition: AliAODPidHF.h:88
#define P(T, U, S)
double Double_t
Definition: External.C:58
AliRDHFCutsDstoKKpi(const char *name="CutsDstoKKpi")
Bool_t IsSignalMC(AliAODRecoDecay *d, AliAODEvent *aod, Int_t pdg) const
Double_t GetPCompatTOF() const
Definition: AliAODPidHF.h:154
void Getd0MeasMinusExpProng(Int_t ip, Double_t magf, Double_t &d0diff, Double_t &errd0diff) const
Int_t GetnSigmaTOF(AliAODTrack *track, Int_t species, Double_t &sigma) const
void SetTRD(Bool_t trd)
Definition: AliAODPidHF.h:97
void SetPidOption(Int_t opt)
Bool_t fRemoveDaughtersFromPrimary
Definition: AliRDHFCuts.h:427
Double_t fPhiMassRef
weight for piKK for kBayesianWeights
Int_t GetnSigmaTPC(AliAODTrack *track, Int_t species, Double_t &sigma) const
void Setd0Cut(Int_t nPtBins, Float_t *cutval)
virtual void GetCutVarsForOpt(AliAODRecoDecayHF *d, Float_t *vars, Int_t nvars, Int_t *pdgdaughters)
Double_t CosPiDsLabFrameKKpi() const
virtual Int_t IsSelectedPIDBayes(AliAODRecoDecayHF *rd)
Double_t ImpParXY() const
Double_t fWeightKKpi
Threshold for Bayesian PID probability.
Bool_t fUsed0MeasMinusExpCut
swicth to the usage of Reference Phi mass (instead of PDG value)
void SetPCompatTOF(Double_t pTOF)
Definition: AliAODPidHF.h:106
void SetNVars(Int_t nVars)
Definition: AliRDHFCuts.h:392
Double_t CosPointingAngleXY() const
Double_t fMaxRapidityCand
minimum pt of the candidate
Definition: AliRDHFCuts.h:447
Float_t fMaxPtStrongPid
pid option
void SetGlobalIndex()
Definition: AliRDHFCuts.h:201
AliRDHFCuts & operator=(const AliRDHFCuts &source)
virtual Bool_t IsInFiducialAcceptance(Double_t pt, Double_t y) const
virtual Int_t IsSelectedPID(AliAODRecoDecayHF *rd)
Bool_t fUsePID
Definition: AliRDHFCuts.h:422
Double_t GetPtThresholdTPC()
Definition: AliAODPidHF.h:158
UInt_t GetPIDTrackTPCTOFBitMap(AliAODTrack *track) const
void SetTOF(Bool_t tof)
Definition: AliAODPidHF.h:95
Int_t fPidOption
switch for the cuts on phi and K0* inv. mass
Bool_t HasBadDaughters() const
const Int_t nPtBins
void SetMinVtxContr(Int_t contr=1)
Definition: AliRDHFCuts.h:59
int Int_t
Definition: External.C:63
Bool_t fUseTrackSelectionWithFilterBits
flag to reject kink daughters
Definition: AliRDHFCuts.h:457
void SetCuts(Int_t nVars, Int_t nPtBins, Float_t **cutsRD)
Int_t fnVarsForOpt
Definition: AliRDHFCuts.h:417
unsigned int UInt_t
Definition: External.C:33
AliPIDCombined * GetPidCombined() const
Definition: AliAODPidHF.h:161
void SetMaxPtStrongPid(Float_t spid)
float Float_t
Definition: External.C:68
const Double_t ptmax
void SetPtThresholdTPC(Double_t ptThresholdTPC)
Definition: AliAODPidHF.h:109
Double_t fMaxPtCand
minimum pt of the candidate
Definition: AliRDHFCuts.h:446
Double_t CosPiKPhiRFrameKKpi() const
AliAODVertex * GetOwnPrimaryVtx() const
Bool_t fKeepSignalMC
max rapidity of candidate (if !=-999 overrides IsInFiducialAcceptance)
Definition: AliRDHFCuts.h:448
virtual Int_t IsSelected(TObject *obj, Int_t selectionLevel)
Double_t GetSigmaVert(const AliAODEvent *aod=0x0)
virtual void SetStandardCutsPP2010()
AliRDHFCutsDstoKKpi & operator=(const AliRDHFCutsDstoKKpi &source)
Int_t fIsSelectedPID
outcome of cuts selection
Definition: AliRDHFCuts.h:444
Double_t nsigma
Int_t MakeRawPid(AliAODTrack *track, Int_t specie)
AliPIDResponse * GetPidResponse() const
Definition: AliAODPidHF.h:160
void SetSigma(Double_t *sigma)
Definition: AliAODPidHF.h:39
Float_t * fCutsRD
fnVars*fnPtBins
Definition: AliRDHFCuts.h:420
Double_t DecayLength2() const
kinematics & topology
Float_t fMaxPStrongPidK
Maximum pt of candidate to apply strong Pid p dependent.
Double_t CosPiDsLabFramepiKK() const
void SetVarsForOpt(Int_t nVars, Bool_t *forOpt)
Double_t DecayLengthXY() const
void SetVarNames(Int_t nVars, TString *varNames, Bool_t *isUpperCut)
Bool_t * fVarsForOpt
number of cut vars to be optimized for candidates
Definition: AliRDHFCuts.h:418
Bool_t AreDaughtersSelected(AliAODRecoDecayHF *rd, const AliAODEvent *aod=0x0) const
Double_t fWeightpiKK
weight for KKpi for kBayesianWeights
Bool_t fUseRefPhiMass
Reference Phi mass to be used for the cut on delta phi mass (instead of PDG value) ...
Double_t fDistToMaxProb
Maximum P of track to apply strong Pid on pi.
Double_t fBayesThreshold
Difference between max probability.
Float_t * fMaxd0MeasMinusExp
switch for cut on d0meas-d0exp
void SetUsePID(Bool_t flag=kTRUE)
Definition: AliRDHFCuts.h:209
virtual void PrintAll() const
void CleanOwnPrimaryVtx(AliAODRecoDecayHF *d, AliAODEvent *aod, AliAODVertex *origownvtx) const
void SetRemoveDaughtersFromPrim(Bool_t removeDaughtersPrim)
Definition: AliRDHFCuts.h:219
Float_t fMaxPStrongPidpi
Maximum P of track to apply strong Pid on K.
void SetOldPid(Bool_t oldPid)
Definition: AliAODPidHF.h:108
void SetPtBins(Int_t nPtBinLimits, Float_t *ptBinLimits)
Float_t * fMaxd0
switch for cut on d0
void SetITS(Bool_t its)
Definition: AliAODPidHF.h:96
void SetMatch(Int_t match)
Definition: AliAODPidHF.h:98
void AddTrackCuts(const AliESDtrackCuts *cuts)
Definition: AliRDHFCuts.h:207
void SetPLimit(Double_t *plim, Int_t npLim)
void SetTPC(Bool_t tpc)
Definition: AliAODPidHF.h:94
bool Bool_t
Definition: External.C:53
Double_t CosPointingAngle() const
Int_t fnPtBins
cuts on the candidate
Definition: AliRDHFCuts.h:412
void SetCompat(Bool_t comp)
Definition: AliAODPidHF.h:100
AliAODPidHF * fPidHF
enable AOD049 centrality cleanup
Definition: AliRDHFCuts.h:424
void Setd0MeasMinusExpCut(Int_t nPtBins, Float_t *cutval)
Bool_t RecalcOwnPrimaryVtx(AliAODRecoDecayHF *d, AliAODEvent *aod) const
Int_t PtBin(Double_t pt) const
void SetOptPileup(Int_t opt=0)
Definition: AliRDHFCuts.h:223
Int_t GetGlobalIndex(Int_t iVar, Int_t iPtBin) const
Double_t DecayLength() const
Double_t CosPiKPhiRFramepiKK() const
Int_t nptbins
Double_t fMinPtCand
outcome of PID selection
Definition: AliRDHFCuts.h:445