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