AliPhysics  master (3d17d9d)
AliRDHFCutsLctopKpi.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 Lc->pKpi
21 //
22 // Author: A.Dainese, andrea.dainese@pd.infn.it
24 
25 #include <TDatabasePDG.h>
26 #include <Riostream.h>
27 #include <AliAnalysisManager.h>
28 #include <AliInputEventHandler.h>
29 #include <AliPIDResponse.h>
30 
31 #include "AliRDHFCutsLctopKpi.h"
33 #include "AliRDHFCuts.h"
34 #include "AliAODTrack.h"
35 #include "AliESDtrack.h"
36 #include "AliKFParticle.h"
37 #include "AliESDVertex.h"
38 
39 using std::cout;
40 using std::endl;
41 
43 ClassImp(AliRDHFCutsLctopKpi);
45 
46 //--------------------------------------------------------------------------
48 AliRDHFCuts(name),
49 fPidObjprot(0),
50 fPidObjpion(0),
51 fUseImpParProdCorrCut(kFALSE),
52 fPIDStrategy(kNSigma),
53 fCutsStrategy(kStandard),
54 fUseSpecialCut(kFALSE),
55 fMaxDistanceSecPrimVertex(0.5)
56 {
57  //
58  // Default Constructor
59  //
60  Int_t nvars=13;
61  SetNVars(nvars);
62  TString varNames[13]={"inv. mass [GeV]",
63  "pTK [GeV/c]",
64  "pTP [GeV/c]",
65  "d0K [cm] lower limit!",
66  "d0Pi [cm] lower limit!",
67  "dist12 (cm)",
68  "sigmavert (cm)",
69  "dist prim-sec (cm)",
70  "pM=Max{pT1,pT2,pT3} (GeV/c)",
71  "cosThetaPoint",
72  "Sum d0^2 (cm^2)",
73  "dca cut (cm)",
74  "cut on pTpion [GeV/c]"};
75  Bool_t isUpperCut[13]={kTRUE,
76  kFALSE,
77  kFALSE,
78  kFALSE,
79  kFALSE,
80  kFALSE,
81  kTRUE,
82  kFALSE,
83  kFALSE,
84  kFALSE,
85  kFALSE,
86  kTRUE,
87  kFALSE
88  };
89  SetVarNames(nvars,varNames,isUpperCut);
90  Bool_t forOpt[13]={kFALSE,
91  kTRUE,
92  kTRUE,
93  kFALSE,
94  kFALSE,
95  kFALSE,
96  kFALSE,
97  kTRUE,
98  kFALSE,
99  kFALSE,
100  kFALSE,
101  kFALSE,
102  kTRUE};
103  SetVarsForOpt(4,forOpt);
104  Float_t limits[2]={0,999999999.};
105  SetPtBins(2,limits);
106  for (Int_t ispecies=0;ispecies<AliPID::kSPECIES;++ispecies)
107  fPIDThreshold[ispecies]=0.;
108 }
109 //--------------------------------------------------------------------------
111  AliRDHFCuts(source),
112  fPidObjprot(0x0),
113  fPidObjpion(0x0),
115  fPIDStrategy(source.fPIDStrategy),
119 {
120  //
121  // Copy constructor
122  //
123  if (source.fPidObjprot) fPidObjprot = new AliAODPidHF(*(source.fPidObjprot));
124  else fPidObjprot = new AliAODPidHF();
125  if (source.fPidObjpion) fPidObjpion = new AliAODPidHF(*(source.fPidObjpion));
126  else fPidObjpion = new AliAODPidHF();
127  memcpy(fPIDThreshold,source.fPIDThreshold,AliPID::kSPECIES*sizeof(Double_t));
128 }
129 //--------------------------------------------------------------------------
131 {
132  //
133  // assignment operator
134  //
135  if(this != &source) {
136 
137  AliRDHFCuts::operator=(source);
138  delete fPidObjprot;
139  fPidObjprot = new AliAODPidHF(*(source.fPidObjprot));
140  delete fPidObjpion;
141  fPidObjpion = new AliAODPidHF(*(source.fPidObjpion));
142  fPIDStrategy=source.fPIDStrategy;
144  memcpy(fPIDThreshold,source.fPIDThreshold,AliPID::kSPECIES*sizeof(Double_t));
146  }
147 
148  return *this;
149 }
150 //---------------------------------------------------------------------------
152  //
153  // // Default Destructor
154  //
155  if(fPidObjpion){
156  delete fPidObjpion;
157  fPidObjpion=0;
158  }
159  if(fPidObjprot){
160  delete fPidObjprot;
161  fPidObjprot=0;
162  }
163 
164 }
165 
166 //---------------------------------------------------------------------------
168  //
169  // Fills in vars the values of the variables
170  //
171 
172  if(nvars!=fnVarsForOpt) {
173  printf("AliRDHFCutsLctopKpi::GetCutsVarsForOpt: wrong number of variables\n");
174  return;
175  }
176 
178 
179  Int_t iter=-1;
180  if(fVarsForOpt[0]){
181  iter++;
182  vars[iter]=dd->InvMassLcpKpi();
183  }
184  if(fVarsForOpt[1]){
185  iter++;
186  for(Int_t iprong=0;iprong<3;iprong++){
187  if(TMath::Abs(pdgdaughters[iprong])==321) {
188  vars[iter]=dd->PtProng(iprong);
189  }
190  }
191  }
192  if(fVarsForOpt[2]){
193  iter++;
194  for(Int_t iprong=0;iprong<3;iprong++){
195  if(TMath::Abs(pdgdaughters[iprong])==2212) {
196  vars[iter]=dd->PtProng(iprong);
197  }
198  }
199  }
200  if(fVarsForOpt[3]){
201  iter++;
202  for(Int_t iprong=0;iprong<3;iprong++){
203  if(TMath::Abs(pdgdaughters[iprong])==2212) {
204  vars[iter]=dd->Getd0Prong(iprong);
205  }
206  }
207  }
208  if(fVarsForOpt[4]){
209  iter++;
210  for(Int_t iprong=0;iprong<3;iprong++){
211  if(TMath::Abs(pdgdaughters[iprong])==211) {
212  vars[iter]=dd->Getd0Prong(iprong);
213  }
214  }
215  }
216  if(fVarsForOpt[5]){
217  iter++;
218  vars[iter]=dd->GetDist12toPrim();
219  }
220  if(fVarsForOpt[6]){
221  iter++;
222  vars[iter]=dd->GetSigmaVert(aod);
223  }
224  if(fVarsForOpt[7]){
225  iter++;
226  vars[iter] = dd->DecayLength();
227  }
228  if(fVarsForOpt[8]){
229  iter++;
230  Float_t ptmax=0;
231  for(Int_t i=0;i<3;i++){
232  if(dd->PtProng(i)>ptmax)ptmax=dd->PtProng(i);
233  }
234  vars[iter]=ptmax;
235  }
236  if(fVarsForOpt[9]){
237  iter++;
238  vars[iter]=dd->CosPointingAngle();
239  }
240  if(fVarsForOpt[10]){
241  iter++;
242  vars[iter]=dd->Getd0Prong(0)*dd->Getd0Prong(0)+dd->Getd0Prong(1)*dd->Getd0Prong(1)+dd->Getd0Prong(2)*dd->Getd0Prong(2);
243  }
244  if(fVarsForOpt[11]){
245  iter++;
246  vars[iter]=dd->GetDCA();
247  }
248  if(fVarsForOpt[12]){
249  iter++;
250  for(Int_t iprong=0;iprong<3;iprong++){
251  if(TMath::Abs(pdgdaughters[iprong])==211) {
252  vars[iter]=dd->PtProng(iprong);
253  }
254  }
255  }
256 
257  return;
258 }
259 //---------------------------------------------------------------------------
261  //
262  // Apply selection
263  //
264 
265  if(!fCutsRD){
266  AliError("Cut matrice not inizialized. Exit...\n");
267  return 0;
268  }
269  //PrintAll();
271 
272  if(!d){
273  AliError("AliAODRecoDecayHF3Prong null \n");
274  return 0;
275  }
276 
277 
278  if(fKeepSignalMC) if(IsSignalMC(d,aod,4122)) return 3;
279 
280  Int_t returnvalue=3;
281  Int_t returnvaluePID=3;
282 
283  if(d->Pt()<fMinPtCand) return 0;
284  if(d->Pt()>fMaxPtCand) return 0;
285 
287 
288 
289  // selection on daughter tracks
290  if(selectionLevel==AliRDHFCuts::kAll ||
291  selectionLevel==AliRDHFCuts::kTracks) {
292  if(!AreDaughtersSelected(d,aod)) return 0;
293  }
294 
295 
296  // PID selection
297  if(selectionLevel==AliRDHFCuts::kAll ||
298  selectionLevel==AliRDHFCuts::kCandidate||
299  selectionLevel==AliRDHFCuts::kPID) {
300  switch (fPIDStrategy) {
301  case kNSigma:
302  returnvaluePID = IsSelectedPID(d);
303  break;
304  case kNSigmaMin:
305  returnvaluePID = IsSelectedPID(d);
306  break;
307  case kNSigmaPbPb:
308  returnvaluePID = IsSelectedNSigmaPbPb(d);
309  break;
310  case kCombined:
311  returnvaluePID = IsSelectedCombinedPID(d);
312  break;
313  case kCombinedSoft:
314  returnvaluePID = IsSelectedCombinedPIDSoft(d);
315  break;
316  case kNSigmaStrong:
317  returnvaluePID = IsSelectedPIDStrong(d);
318  break;
319  case kCombinedpPb:
320  returnvaluePID = IsSelectedCombinedPIDpPb(d);
321  break;
322  case kCombinedpPb2:
323  returnvaluePID = IsSelectedCombinedPIDpPb2(d);
324  break;
325  case kCombinedProb:
326  returnvaluePID = IsSelectedCombinedPIDProb(d);
327  break;
328  }
329  fIsSelectedPID=returnvaluePID;
330  }
331  // if(fUsePID || selectionLevel==AliRDHFCuts::kPID) returnvaluePID = IsSelectedCombinedPID(d); // to test!!
332  if(returnvaluePID==0) return 0;
333 
334 
335 
336 
337  // selection on candidate
338  if(selectionLevel==AliRDHFCuts::kAll ||
339  selectionLevel==AliRDHFCuts::kCandidate) {
340 
341  Double_t pt=d->Pt();
342 
343  Int_t ptbin=PtBin(pt);
344 
345  Double_t mLcpKpi=0.,mLcpiKp=0.;
346  Int_t okLcpKpi=1,okLcpiKp=1;
347 
348 
349  switch (fCutsStrategy) {
350 
351  case kStandard:
352  if(d->GetSigmaVert(aod)>fCutsRD[GetGlobalIndex(6,ptbin)]) return 0;
353  //DCA
354  for(Int_t i=0;i<3;i++) if(d->GetDCA(i)>fCutsRD[GetGlobalIndex(11,ptbin)]) return 0;
355  if(TMath::Abs(d->PtProng(1)) < fCutsRD[GetGlobalIndex(1,ptbin)] || TMath::Abs(d->Getd0Prong(1))<fCutsRD[GetGlobalIndex(3,ptbin)]) return 0;//Kaon
356  if(d->Pt()>=3. && d->PProng(1)<0.55) return 0;
357  if(fUseSpecialCut) {
358  if(TMath::Abs(d->PtProng(0)) < TMath::Abs(d->PtProng(2)) )okLcpKpi=0;
359  if(TMath::Abs(d->PtProng(2)) < TMath::Abs(d->PtProng(0)) )okLcpiKp=0;
360  }
361  if((TMath::Abs(d->PtProng(0)) < fCutsRD[GetGlobalIndex(2,ptbin)]) || (TMath::Abs(d->PtProng(2)) < fCutsRD[GetGlobalIndex(12,ptbin)])) okLcpKpi=0;
362  if((TMath::Abs(d->PtProng(2)) < fCutsRD[GetGlobalIndex(2,ptbin)]) || (TMath::Abs(d->PtProng(0)) < fCutsRD[GetGlobalIndex(12,ptbin)]))okLcpiKp=0;
363  if(!okLcpKpi && !okLcpiKp) return 0;
364  //2track cuts
365  if(d->GetDist12toPrim()<fCutsRD[GetGlobalIndex(5,ptbin)]|| d->GetDist23toPrim()<fCutsRD[GetGlobalIndex(5,ptbin)]) return 0;
366  if(d->GetDist12toPrim()>fMaxDistanceSecPrimVertex) return 0;
367  if(d->GetDist23toPrim()>fMaxDistanceSecPrimVertex) return 0;
369  if(d->Getd0Prong(0)*d->Getd0Prong(1)<0. && d->Getd0Prong(2)*d->Getd0Prong(1)<0.) return 0;
370  }
371  //sec vert
372  if(d->DecayLength()<fCutsRD[GetGlobalIndex(7,ptbin)]) return 0;
373  if(d->DecayLength()>fMaxDistanceSecPrimVertex) return 0;
374 
375  // Double_t sumd0s=d->Getd0Prong(0)*d->Getd0Prong(0)+d->Getd0Prong(1)*d->Getd0Prong(1)+d->Getd0Prong(2)*d->Getd0Prong(2);
376  // if(sumd0s<fCutsRD[GetGlobalIndex(10,ptbin)]) return 0;
377  if((d->Getd0Prong(0)*d->Getd0Prong(0)+d->Getd0Prong(1)*d->Getd0Prong(1)+d->Getd0Prong(2)*d->Getd0Prong(2))<fCutsRD[GetGlobalIndex(10,ptbin)]) return 0;
378 
379  if(TMath::Abs(d->PtProng(0))<fCutsRD[GetGlobalIndex(8,ptbin)] && TMath::Abs(d->PtProng(1))<fCutsRD[GetGlobalIndex(8,ptbin)] && TMath::Abs(d->PtProng(2))<fCutsRD[GetGlobalIndex(8,ptbin)]) return 0;
380  if(d->CosPointingAngle()< fCutsRD[GetGlobalIndex(9,ptbin)]) return 0;
381 
382 
383  break;
384 
385  case kKF:
386  Int_t pdgs[3]={0,321,0};
387  Bool_t constraint=kFALSE;
388  if(fCutsRD[GetGlobalIndex(1,ptbin)]>0.) constraint=kTRUE;
389  Double_t field=aod->GetMagneticField();
390  if (returnvaluePID==1 || returnvaluePID==3){
391 
392  pdgs[0]=2122;pdgs[2]=211;
393  AliKFParticle *lc1=ReconstructKF(d,pdgs,field,constraint);
394  if(!lc1){
395  okLcpKpi=0;
396  }else{
397  if(lc1->GetChi2()/lc1->GetNDF()>fCutsRD[GetGlobalIndex(2,ptbin)]) okLcpKpi=0;
398  }
399  } else if(returnvaluePID>=2){
400 
401  pdgs[0]=211;pdgs[2]=2212;
402  AliKFParticle *lc2=ReconstructKF(d,pdgs,field,constraint);
403  if(!lc2){
404  okLcpiKp=0;
405  }else{
406  if(lc2->GetChi2()/lc2->GetNDF()>fCutsRD[GetGlobalIndex(2,ptbin)])okLcpiKp=0;
407  }
408  }
409  break;
410 
411  }
412 
413  Double_t mLcPDG = TDatabasePDG::Instance()->GetParticle(4122)->Mass();
414 
415  mLcpKpi=d->InvMassLcpKpi();
416  mLcpiKp=d->InvMassLcpiKp();
417 
418  if(TMath::Abs(mLcpKpi-mLcPDG)>fCutsRD[GetGlobalIndex(0,ptbin)]) okLcpKpi = 0;
419  if(TMath::Abs(mLcpiKp-mLcPDG)>fCutsRD[GetGlobalIndex(0,ptbin)]) okLcpiKp = 0;
420  if(!okLcpKpi && !okLcpiKp) return 0;
421 
422  if(okLcpKpi) returnvalue=1; //cuts passed as Lc->pKpi
423  if(okLcpiKp) returnvalue=2; //cuts passed as Lc->piKp
424  if(okLcpKpi && okLcpiKp) returnvalue=3; //cuts passed as both pKpi and piKp
425 
426  }
427 
428 
429  Int_t returnvalueTot=CombinePIDCuts(returnvalue,returnvaluePID);
430  return returnvalueTot;
431 }
432 //---------------------------------------------------------------------------
434 
435 
436  if(!fUsePID || !obj) return 3;
437  Int_t okLcpKpi=0,okLcpiKp=0;
438  Int_t returnvalue=0;
439  Bool_t isPeriodd=fPidHF->GetOnePad();
440  Bool_t isMC=fPidHF->GetMC();
441  Bool_t ispion0=kTRUE,ispion2=kTRUE;
442  Bool_t isproton0=kFALSE,isproton2=kFALSE;
443  Bool_t iskaon1=kFALSE;
444  if(isPeriodd) {
445  fPidObjprot->SetOnePad(kTRUE);
446  fPidObjpion->SetOnePad(kTRUE);
447  }
448  if(isMC) {
449  fPidObjprot->SetMC(kTRUE);
450  fPidObjpion->SetMC(kTRUE);
451  }
452 
453  if(fPidObjprot->GetPidResponse()==0x0){
454  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
455  AliInputEventHandler *inputHandler=(AliInputEventHandler*)mgr->GetInputEventHandler();
456  AliPIDResponse *pidResp=inputHandler->GetPIDResponse();
457  fPidObjprot->SetPidResponse(pidResp);
458  }
459  if(fPidObjpion->GetPidResponse()==0x0){
460  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
461  AliInputEventHandler *inputHandler=(AliInputEventHandler*)mgr->GetInputEventHandler();
462  AliPIDResponse *pidResp=inputHandler->GetPIDResponse();
463  fPidObjpion->SetPidResponse(pidResp);
464  }
465  if(fPidHF->GetPidResponse()==0x0){
466  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
467  AliInputEventHandler *inputHandler=(AliInputEventHandler*)mgr->GetInputEventHandler();
468  AliPIDResponse *pidResp=inputHandler->GetPIDResponse();
469  fPidHF->SetPidResponse(pidResp);
470  }
471 
472  for(Int_t i=0;i<3;i++){
473  AliAODTrack *track=(AliAODTrack*)obj->GetDaughter(i);
474  if(!track) return 0;
475  if(i==1) {
476  // identify kaon
477  if(track->P()<0.55){
478  fPidHF->SetTOF(kFALSE);
479  fPidHF->SetTOFdecide(kFALSE);
480  }
481  Int_t isKaon=0;
482  isKaon=fPIDStrategy==kNSigmaMin?fPidHF->MatchTPCTOFMin(track,3):fPidHF->MakeRawPid(track,3);
483  if(isKaon>=1) iskaon1=kTRUE;
484  if(track->P()<0.55){
485  fPidHF->SetTOF(kTRUE);
486  fPidHF->SetTOFdecide(kTRUE);
487  }
488 
489 
490  if(isKaon>=1) iskaon1=kTRUE;
491 
492  if(!iskaon1) return 0;
493 
494  }else{
495  //pion or proton
496  if(track->P()<1.){
497  fPidObjprot->SetTOF(kFALSE);
498  fPidObjprot->SetTOFdecide(kFALSE);
499  }
500 
501  Int_t isProton=0;
503  Int_t isPion=0;
505 
506  if(track->P()<1.){
507  fPidObjprot->SetTOF(kTRUE);
508  fPidObjprot->SetTOFdecide(kTRUE);
509  }
510 
511 
512  if(i==0) {
513  if(isPion<0) ispion0=kFALSE;
514  if(isProton>=1) isproton0=kTRUE;
515 
516  }
517  if(!ispion0 && !isproton0) return 0;
518  if(i==2) {
519  if(isPion<0) ispion2=kFALSE;
520  if(isProton>=1) isproton2=kTRUE;
521  }
522 
523  }
524  }
525 
526  if(ispion2 && isproton0 && iskaon1) okLcpKpi=1;
527  if(ispion0 && isproton2 && iskaon1) okLcpiKp=1;
528  if(okLcpKpi) returnvalue=1; //cuts passed as Lc->pKpi
529  if(okLcpiKp) returnvalue=2; //cuts passed as Lc->piKp
530  if(okLcpKpi && okLcpiKp) returnvalue=3; //cuts passed as both pKpi and piKp
531 
532  return returnvalue;
533 }
534 
535 //--------------------------------------------------------------------------
536 
538 
539 
540  if(!fUsePID || !obj) return 3;
541  Int_t okLcpKpi=0,okLcpiKp=0;
542  Int_t returnvalue=0;
543  Bool_t isPeriodd=fPidHF->GetOnePad();
544  Bool_t isMC=fPidHF->GetMC();
545  Bool_t ispion0=kTRUE,ispion2=kTRUE;
546  Bool_t isproton0=kFALSE,isproton2=kFALSE;
547  Bool_t iskaon1=kFALSE;
548  if(isPeriodd) {
549  fPidObjprot->SetOnePad(kTRUE);
550  fPidObjpion->SetOnePad(kTRUE);
551  }
552  if(isMC) {
553  fPidObjprot->SetMC(kTRUE);
554  fPidObjpion->SetMC(kTRUE);
555  }
556 
557  if(fPidObjprot->GetPidResponse()==0x0){
558  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
559  AliInputEventHandler *inputHandler=(AliInputEventHandler*)mgr->GetInputEventHandler();
560  AliPIDResponse *pidResp=inputHandler->GetPIDResponse();
561  fPidObjprot->SetPidResponse(pidResp);
562  }
563  if(fPidObjpion->GetPidResponse()==0x0){
564  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
565  AliInputEventHandler *inputHandler=(AliInputEventHandler*)mgr->GetInputEventHandler();
566  AliPIDResponse *pidResp=inputHandler->GetPIDResponse();
567  fPidObjpion->SetPidResponse(pidResp);
568  }
569  if(fPidHF->GetPidResponse()==0x0){
570  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
571  AliInputEventHandler *inputHandler=(AliInputEventHandler*)mgr->GetInputEventHandler();
572  AliPIDResponse *pidResp=inputHandler->GetPIDResponse();
573  fPidHF->SetPidResponse(pidResp);
574  }
575 
576  for(Int_t i=0;i<3;i++){
577  AliAODTrack *track=(AliAODTrack*)obj->GetDaughter(i);
578  if(!track) return 0;
579 
580  if(i==1) {
581  //kaon
582  Int_t isKaon=fPidHF->MakeRawPid(track,3);
583  if(isKaon>=1) iskaon1=kTRUE;
584  if(!iskaon1) return 0;
585  }
586 
587  else {
588  //pion or proton
589  Int_t isProton=fPidObjprot->MakeRawPid(track,4);
590  Int_t isPion=fPidObjpion->MakeRawPid(track,2);
591 
592  if(i==0) {
593  if(isPion<0) ispion0=kFALSE;
594  if(isProton>=1) isproton0=kTRUE;
595  }
596  if(!ispion0 && !isproton0) return 0;
597 
598  if(i==2) {
599  if(isPion<0) ispion2=kFALSE;
600  if(isProton>=1) isproton2=kTRUE;
601  }
602  }
603  }
604 
605  if(ispion2 && isproton0 && iskaon1) okLcpKpi=1;
606  if(ispion0 && isproton2 && iskaon1) okLcpiKp=1;
607  if(okLcpKpi) returnvalue=1; //cuts passed as Lc->pKpi
608  if(okLcpiKp) returnvalue=2; //cuts passed as Lc->piKp
609  if(okLcpKpi && okLcpiKp) returnvalue=3; //cuts passed as both pKpi and piKp
610 
611  return returnvalue;
612 }
613 
614 
615 
616 
617 //---------------------------------------------------------------------------
619 
620  if(!fUsePID || !obj) {return 3;}
621  Int_t okLcpKpi=0,okLcpiKp=0;
622  Int_t returnvalue=0;
623  Bool_t isPeriodd=fPidHF->GetOnePad();
624  Bool_t isMC=fPidHF->GetMC();
625 
626  if(isPeriodd) {
627  fPidObjprot->SetOnePad(kTRUE);
628  fPidObjpion->SetOnePad(kTRUE);
629  }
630  if(isMC) {
631  fPidObjprot->SetMC(kTRUE);
632  fPidObjpion->SetMC(kTRUE);
633  }
634 
635  AliVTrack *track0=dynamic_cast<AliVTrack*>(obj->GetDaughter(0));
636  AliVTrack *track1=dynamic_cast<AliVTrack*>(obj->GetDaughter(1));
637  AliVTrack *track2=dynamic_cast<AliVTrack*>(obj->GetDaughter(2));
638  if (!track0 || !track1 || !track2) return 0;
639  Double_t prob0[AliPID::kSPECIES];
640  Double_t prob1[AliPID::kSPECIES];
641  Double_t prob2[AliPID::kSPECIES];
642  if(obj->Pt()<3. && track0->P()<1.) fPidHF->GetPidCombined()->SetDetectorMask(AliPIDResponse::kDetTPC);
643  fPidHF->GetPidCombined()->ComputeProbabilities(track0,fPidHF->GetPidResponse(),prob0);
644  if(obj->Pt()<3. && track0->P()<1.) fPidHF->GetPidCombined()->SetDetectorMask(AliPIDResponse::kDetTPC|AliPIDResponse::kDetTOF);
645 
646  if(obj->Pt()<3. && track1->P()<0.55) fPidHF->GetPidCombined()->SetDetectorMask(AliPIDResponse::kDetTPC);
647  fPidHF->GetPidCombined()->ComputeProbabilities(track1,fPidHF->GetPidResponse(),prob1);
648  if(obj->Pt()<3. && track1->P()<0.55) fPidHF->GetPidCombined()->SetDetectorMask(AliPIDResponse::kDetTPC|AliPIDResponse::kDetTOF);
649 
650  if(obj->Pt()<3. && track2->P()<1.) fPidHF->GetPidCombined()->SetDetectorMask(AliPIDResponse::kDetTPC);
651  fPidHF->GetPidCombined()->ComputeProbabilities(track2,fPidHF->GetPidResponse(),prob2);
652  if(obj->Pt()<3. && track2->P()<1.) fPidHF->GetPidCombined()->SetDetectorMask(AliPIDResponse::kDetTPC|AliPIDResponse::kDetTOF);
653 
655  okLcpiKp= (prob0[AliPID::kPion ]>fPIDThreshold[AliPID::kPion ])
658  okLcpKpi= (prob0[AliPID::kProton]>fPIDThreshold[AliPID::kProton])
659  &&(prob1[AliPID::kKaon ]>fPIDThreshold[AliPID::kKaon ])
661  }else{
662  //pion or proton
663 
664 
665  if(TMath::MaxElement(AliPID::kSPECIES,prob1) == prob1[AliPID::kKaon]){
666  if(TMath::MaxElement(AliPID::kSPECIES,prob0) == prob0[AliPID::kProton] && TMath::MaxElement(AliPID::kSPECIES,prob2) == prob2[AliPID::kPion]) okLcpKpi = 1;
667  if(TMath::MaxElement(AliPID::kSPECIES,prob2) == prob2[AliPID::kProton] && TMath::MaxElement(AliPID::kSPECIES,prob0) == prob0[AliPID::kPion]) okLcpiKp = 1;
668  }
669  }
670 
671  if(okLcpKpi) returnvalue=1; //cuts passed as Lc->pKpi
672  if(okLcpiKp) returnvalue=2; //cuts passed as Lc->piKp
673  if(okLcpKpi && okLcpiKp) returnvalue=3; //cuts passed as both pKpi and piKp
674 
675  return returnvalue;
676 }
677 //-----------------------
678 Int_t AliRDHFCutsLctopKpi::CombinePIDCuts(Int_t returnvalue, Int_t returnvaluePID) const {
679 
680  Int_t returnvalueTot=0;
681  Int_t okLcpKpi=0,okLcpiKp=0;
682  if(returnvaluePID==1){
683  if(returnvalue==1 || returnvalue==3) okLcpKpi=1;
684  }
685  if(returnvaluePID==2){
686  if(returnvalue>=2) okLcpiKp=1;
687  }
688  if(returnvaluePID==3 && returnvalue>0){
689  if(returnvalue==1 || returnvalue==3) okLcpKpi=1;
690  if(returnvalue>=2) okLcpiKp=1;
691  }
692 
693  if(okLcpKpi) returnvalueTot=1; //cuts passed as Lc->pKpi
694  if(okLcpiKp) returnvalueTot=2; //cuts passed as Lc->piKp
695  if(okLcpKpi && okLcpiKp) returnvalueTot=3; //cuts passed as both pKpi and piKp
696  return returnvalueTot;
697 }
698 //----------------------------------
700 
701  SetName("LctopKpiProdCuts");
702  SetTitle("Production cuts for Lc analysis");
703 
704  AliESDtrackCuts *esdTrackCuts = new AliESDtrackCuts("AliESDtrackCuts","default");
705  esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
706  esdTrackCuts->SetRequireTPCRefit(kTRUE);
707  esdTrackCuts->SetMinNClustersTPC(70);
708  esdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD,
709  AliESDtrackCuts::kAny);
710  esdTrackCuts->SetRequireITSRefit(kTRUE);
711  esdTrackCuts->SetMinNClustersITS(4);
712  esdTrackCuts->SetMinDCAToVertexXY(0.);
713  esdTrackCuts->SetEtaRange(-0.8,0.8);
714  esdTrackCuts->SetPtRange(0.3,1.e10);
715  AddTrackCuts(esdTrackCuts);
716  delete esdTrackCuts;
717  esdTrackCuts=NULL;
718 
719  const Int_t nptbins=8;
720  const Int_t nvars=13;
721  Float_t* ptbins;
722  ptbins=new Float_t[nptbins+1];
723 
724  ptbins[0]=1.;
725  ptbins[1]=2.;
726  ptbins[2]=3.;
727  ptbins[3]=4.;
728  ptbins[4]=5.;
729  ptbins[5]=6.;
730  ptbins[6]=8.;
731  ptbins[7]=10.;
732  ptbins[8]=20.;
733 
734  SetGlobalIndex(nvars,nptbins);
735  SetPtBins(nptbins+1,ptbins);
736 
737  Float_t** prodcutsval;
738  prodcutsval=new Float_t*[nvars];
739  for(Int_t iv=0;iv<nvars;iv++){
740  prodcutsval[iv]=new Float_t[nptbins];
741  }
742 
743  for(Int_t ipt=0;ipt<nptbins;ipt++){
744  prodcutsval[0][ipt]=0.13;
745  prodcutsval[1][ipt]=0.4;
746  prodcutsval[2][ipt]=0.4;
747  prodcutsval[3][ipt]=0.;
748  prodcutsval[4][ipt]=0.;
749  prodcutsval[5][ipt]=0.;
750  prodcutsval[6][ipt]=0.06;
751  prodcutsval[7][ipt]=0.005;
752  prodcutsval[8][ipt]=0.;
753  prodcutsval[9][ipt]=0.;
754  prodcutsval[10][ipt]=0.;
755  prodcutsval[11][ipt]=0.05;
756  prodcutsval[12][ipt]=0.4;
757  }
758  SetCuts(nvars,nptbins,prodcutsval);
759 
760  AliAODPidHF* pidObjK=new AliAODPidHF();
761  Double_t sigmasK[5]={3.,1.,1.,3.,2.};
762  pidObjK->SetSigma(sigmasK);
763  pidObjK->SetAsym(kTRUE);
764  pidObjK->SetMatch(1);
765  pidObjK->SetTPC(kTRUE);
766  pidObjK->SetTOF(kTRUE);
767  pidObjK->SetITS(kTRUE);
768  Double_t plimK[2]={0.5,0.8};
769  pidObjK->SetPLimit(plimK,2);
770  pidObjK->SetTOFdecide(kTRUE);
771 
772  SetPidHF(pidObjK);
773 
774  AliAODPidHF* pidObjpi=new AliAODPidHF();
775  pidObjpi->SetTPC(kTRUE);
776  Double_t sigmaspi[5]={3.,0.,0.,0.,0.};
777  pidObjpi->SetSigma(sigmaspi);
778  pidObjpi->SetTOFdecide(kTRUE);
779  SetPidpion(pidObjpi);
780 
781  AliAODPidHF* pidObjp=new AliAODPidHF();
782  Double_t sigmasp[5]={3.,1.,1.,3.,2.};
783  pidObjp->SetSigma(sigmasp);
784  pidObjp->SetAsym(kTRUE);
785  pidObjp->SetMatch(1);
786  pidObjp->SetTPC(kTRUE);
787  pidObjp->SetTOF(kTRUE);
788  pidObjp->SetITS(kTRUE);
789  Double_t plimp[2]={1.,2.};
790  pidObjp->SetPLimit(plimp,2);
791  pidObjp->SetTOFdecide(kTRUE);
792 
793  SetPidprot(pidObjp);
794 
795  SetUsePID(kTRUE);
796  SetOptPileup(kTRUE);
797 
798  // PrintAll();
799 
800  for(Int_t iiv=0;iiv<nvars;iiv++){
801  delete [] prodcutsval[iiv];
802  }
803  delete [] prodcutsval;
804  prodcutsval=NULL;
805  delete [] ptbins;
806  ptbins=NULL;
807 
808  delete pidObjK;
809  pidObjK=NULL;
810  delete pidObjpi;
811  pidObjpi=NULL;
812  delete pidObjp;
813  pidObjp=NULL;
814 
815  return;
816 }
817 //------------------
819 
820  SetName("LctopKpiProdCuts");
821  SetTitle("Production cuts for Lc analysis");
822 
823  AliESDtrackCuts *esdTrackCuts = new AliESDtrackCuts("AliESDtrackCuts","default");
824 
825  esdTrackCuts->SetRequireTPCRefit(kTRUE);
826  esdTrackCuts->SetMinNClustersTPC(70);
827  esdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD,
828  AliESDtrackCuts::kAny);
829  esdTrackCuts->SetRequireITSRefit(kTRUE);
830  esdTrackCuts->SetMinNClustersITS(4);
831  esdTrackCuts->SetMinDCAToVertexXYPtDep("0.0100*TMath::Max(0.,(1-TMath::Floor(TMath::Abs(pt)/2.)))");
832  esdTrackCuts->SetEtaRange(-0.8,0.8);
833  esdTrackCuts->SetMaxDCAToVertexXY(1.);
834  esdTrackCuts->SetMaxDCAToVertexZ(1.);
835  esdTrackCuts->SetPtRange(0.49,1.e10);
836  AddTrackCuts(esdTrackCuts);
837  delete esdTrackCuts;
838  esdTrackCuts=NULL;
839 
840  const Int_t nptbins=8;
841  const Int_t nvars=13;
842  Float_t* ptbins;
843  ptbins=new Float_t[nptbins+1];
844 
845  ptbins[0]=1.;
846  ptbins[1]=2.;
847  ptbins[2]=3.;
848  ptbins[3]=4.;
849  ptbins[4]=5.;
850  ptbins[5]=6.;
851  ptbins[6]=8.;
852  ptbins[7]=10.;
853  ptbins[8]=99999.;
854 
855 
856  SetGlobalIndex(nvars,nptbins);
857  SetPtBins(nptbins+1,ptbins);
858 
859  Float_t** prodcutsval;
860  prodcutsval=new Float_t*[nvars];
861  for(Int_t iv=0;iv<nvars;iv++){
862  prodcutsval[iv]=new Float_t[nptbins];
863  }
864 
865  for(Int_t ipt=0;ipt<nptbins;ipt++){
866  prodcutsval[0][ipt]=0.13;
867  prodcutsval[1][ipt]=0.5;
868  prodcutsval[2][ipt]=0.6;
869  prodcutsval[3][ipt]=0.;
870  prodcutsval[4][ipt]=0.;
871  prodcutsval[5][ipt]=0.01;
872  prodcutsval[6][ipt]=0.04;
873  prodcutsval[7][ipt]=0.006;
874  prodcutsval[8][ipt]=0.8;
875  prodcutsval[9][ipt]=0.3;
876  prodcutsval[10][ipt]=0.;
877  prodcutsval[11][ipt]=0.05;
878  prodcutsval[12][ipt]=0.4;
879  }
880  SetCuts(nvars,nptbins,prodcutsval);
881 
882  AliAODPidHF* pidObj=new AliAODPidHF();
883  pidObj->SetTPC(kTRUE);
884  pidObj->SetTOF(kTRUE);
885  SetPidHF(pidObj);
886  SetPidpion(pidObj);
887  SetPidprot(pidObj);
888 
889 
890  // bayesian pid
891  GetPidHF()->SetUseCombined(kTRUE);
892  GetPidHF()->SetUseDefaultPriors(kTRUE);
894  for (Int_t ispecies=0;ispecies<AliPID::kSPECIES;++ispecies){
895  SetPIDThreshold(static_cast<AliPID::EParticleType>(ispecies),0);
896  }
898  SetUsePID(kTRUE);
899 
900 
901  // PrintAll();
902 
903  for(Int_t iiv=0;iiv<nvars;iiv++){
904  delete [] prodcutsval[iiv];
905  }
906  delete [] prodcutsval;
907  prodcutsval=NULL;
908  delete [] ptbins;
909  ptbins=NULL;
910 
911  delete pidObj;
912  pidObj=NULL;
913 
914  return;
915 }
916 //------------------
917 AliKFParticle* AliRDHFCutsLctopKpi::ReconstructKF(AliAODRecoDecayHF3Prong *d,Int_t *pdgs,Double_t field,Bool_t constraint) const{
918  // Method to construct the KF particle from the candidate
919 
920  const Int_t nprongs=d->GetNProngs();
921  if(nprongs<=0) return 0x0;
922 
923  Int_t iprongs[nprongs];
924  for(Int_t i=0;i<nprongs;i++) iprongs[i]=i;
925 
926  Double_t mass[2]={0.,0.};
927 
928  AliKFParticle *decay=d->ApplyVertexingKF(iprongs,nprongs,pdgs,constraint,field,mass);
929  if(!decay) return 0x0;
930  AliESDVertex *vertexESD = new AliESDVertex(decay->Parameters(),
931  decay->CovarianceMatrix(),
932  decay->GetChi2(),
933  nprongs);
934  Double_t pos[3],cov[6],chi2perNDF;
935  vertexESD->GetXYZ(pos);
936  vertexESD->GetCovMatrix(cov);
937  chi2perNDF = vertexESD->GetChi2toNDF();
938  delete vertexESD; vertexESD=NULL;
939  AliAODVertex *vertexAOD = new AliAODVertex(pos,cov,chi2perNDF,0x0,-1,AliAODVertex::kUndef,nprongs);
940  d->SetSecondaryVtx(vertexAOD);
941  return decay;
942 }
943 
944 //------------------
946 
947  // Default 2010 PbPb cut object
949 
950  //
951  // Enable all 2011 PbPb run triggers
952  //
953  SetTriggerClass("");
957 }
958 //-----------------
959 
961 {
962  //
963  // // Checking if Lc is in fiducial acceptance region
964  // //
965  //
966  if(fMaxRapidityCand>-998.){
967  if(TMath::Abs(y) > fMaxRapidityCand) return kFALSE;
968  else return kTRUE;
969  }
970 
971  if(pt > 5.) {
972  // applying cut for pt > 5 GeV
973  AliDebug(2,Form("pt of Lc = %f (> 5), cutting at |y| < 0.8",pt));
974  if (TMath::Abs(y) > 0.8) return kFALSE;
975 
976  } else {
977  // appliying smooth cut for pt < 5 GeV
978  Double_t maxFiducialY = -0.2/15*pt*pt+1.9/15*pt+0.5;
979  Double_t minFiducialY = 0.2/15*pt*pt-1.9/15*pt-0.5;
980  AliDebug(2,Form("pt of Lc = %f (< 5), cutting according to the fiducial zone [%f, %f]\n",pt,minFiducialY,maxFiducialY));
981  if (y < minFiducialY || y > maxFiducialY) return kFALSE;
982  }
983  //
984  return kTRUE;
985 }
986 //--------------------------------------------------------
988  if(!fUsePID || !obj) {return 3;}
989  Int_t okLcpKpi=0,okLcpiKp=0;
990  Int_t returnvalue=0;
991 
992  AliVTrack *track0=dynamic_cast<AliVTrack*>(obj->GetDaughter(0));
993  AliVTrack *track1=dynamic_cast<AliVTrack*>(obj->GetDaughter(1));
994  AliVTrack *track2=dynamic_cast<AliVTrack*>(obj->GetDaughter(2));
995  if (!track0 || !track1 || !track2) return 0;
996  Double_t prob0[AliPID::kSPECIES];
997  Double_t prob1[AliPID::kSPECIES];
998  Double_t prob2[AliPID::kSPECIES];
999 
1000  Bool_t isTOF0=fPidHF->CheckTOFPIDStatus((AliAODTrack*)obj->GetDaughter(0));
1001  Bool_t isTOF1=fPidHF->CheckTOFPIDStatus((AliAODTrack*)obj->GetDaughter(1));
1002  Bool_t isTOF2=fPidHF->CheckTOFPIDStatus((AliAODTrack*)obj->GetDaughter(2));
1003 
1004 Bool_t isK1=kFALSE;
1005  if(isTOF1){ //kaon
1006  if(track1->P()<1.8) {
1007  fPidHF->GetPidCombined()->SetDetectorMask(AliPIDResponse::kDetTPC|AliPIDResponse::kDetTOF);
1008  if(obj->Pt()<3. && track1->P()<0.55) fPidHF->GetPidCombined()->SetDetectorMask(AliPIDResponse::kDetTPC);
1009  fPidHF->GetPidCombined()->ComputeProbabilities(track1,fPidHF->GetPidResponse(),prob1);
1010 
1011  }else{
1012  AliAODTrack *trackaod1=(AliAODTrack*)(obj->GetDaughter(1));
1013  if(trackaod1->P()<0.55){
1014  fPidHF->SetTOF(kFALSE);
1015  fPidHF->SetTOFdecide(kFALSE);
1016  }
1017  Int_t isKaon=fPidHF->MakeRawPid(trackaod1,3);
1018  if(isKaon>=1) isK1=kTRUE;
1019  if(trackaod1->P()<0.55){
1020  fPidHF->SetTOF(kTRUE);
1021  fPidHF->SetTOFdecide(kTRUE);
1022  }
1023  }
1024  }else{
1025  if(track1->P()<0.8){
1026  fPidHF->GetPidCombined()->SetDetectorMask(AliPIDResponse::kDetTPC);
1027  fPidHF->GetPidCombined()->ComputeProbabilities(track1,fPidHF->GetPidResponse(),prob0);
1028  }else{
1029  AliAODTrack *trackaod1=(AliAODTrack*)(obj->GetDaughter(1));
1030  if(trackaod1->P()<0.55){
1031  fPidHF->SetTOF(kFALSE);
1032  fPidHF->SetTOFdecide(kFALSE);
1033  }
1034  Int_t isKaon=fPidHF->MakeRawPid(trackaod1,3);
1035  if(isKaon>=1) isK1=kTRUE;
1036  if(trackaod1->P()<0.55){
1037  fPidHF->SetTOF(kTRUE);
1038  fPidHF->SetTOFdecide(kTRUE);
1039  }
1040  }
1041  }
1042 
1043  Bool_t ispi0=kFALSE;
1044  Bool_t isp0=kFALSE;
1045  Bool_t ispi2=kFALSE;
1046  Bool_t isp2=kFALSE;
1047 
1048  if(isTOF0){ //proton
1049  if(track0->P()<2.2) {
1050  fPidHF->GetPidCombined()->SetDetectorMask(AliPIDResponse::kDetTPC|AliPIDResponse::kDetTOF);
1051  if(obj->Pt()<3. && track0->P()<1.) fPidHF->GetPidCombined()->SetDetectorMask(AliPIDResponse::kDetTPC);
1052  fPidHF->GetPidCombined()->ComputeProbabilities(track0,fPidHF->GetPidResponse(),prob0);
1053  }else{
1054  AliAODTrack *trackaod0=(AliAODTrack*)(obj->GetDaughter(0));
1055  if(trackaod0->P()<1.){
1056  fPidObjprot->SetTOF(kFALSE);
1057  fPidObjprot->SetTOFdecide(kFALSE);
1058  }
1059  Int_t isProton=fPidObjprot->MakeRawPid(trackaod0,4);
1060  if(isProton>=1) isp0=kTRUE;
1061  if(trackaod0->P()<1.){
1062  fPidObjprot->SetTOF(kTRUE);
1063  fPidObjprot->SetTOFdecide(kTRUE);
1064  }
1065  }
1066  }else{
1067  if(track0->P()<1.2){
1068  fPidHF->GetPidCombined()->SetDetectorMask(AliPIDResponse::kDetTPC);
1069  fPidHF->GetPidCombined()->ComputeProbabilities(track0,fPidHF->GetPidResponse(),prob0);
1070  }else{
1071  AliAODTrack *trackaod0=(AliAODTrack*)(obj->GetDaughter(0));
1072  if(trackaod0->P()<1.){
1073  fPidObjprot->SetTOF(kFALSE);
1074  fPidObjprot->SetTOFdecide(kFALSE);
1075  }
1076  Int_t isProton=fPidObjprot->MakeRawPid(trackaod0,4);
1077  if(isProton>=1) isp0=kTRUE;
1078  if(trackaod0->P()<1.){
1079  fPidObjprot->SetTOF(kTRUE);
1080  fPidObjprot->SetTOFdecide(kTRUE);
1081  }
1082  }
1083  }
1084 
1085  if(isTOF2){ //proton
1086  if(track2->P()<2.2) {
1087  fPidHF->GetPidCombined()->SetDetectorMask(AliPIDResponse::kDetTPC|AliPIDResponse::kDetTOF);
1088  if(obj->Pt()<3. && track2->P()<1.) fPidHF->GetPidCombined()->SetDetectorMask(AliPIDResponse::kDetTPC);
1089  fPidHF->GetPidCombined()->ComputeProbabilities(track2,fPidHF->GetPidResponse(),prob2);
1090  }else{
1091  AliAODTrack *trackaod2=(AliAODTrack*)(obj->GetDaughter(2));
1092  if(trackaod2->P()<1.){
1093  fPidObjprot->SetTOF(kFALSE);
1094  fPidObjprot->SetTOFdecide(kFALSE);
1095  }
1096  Int_t isProton=fPidObjprot->MakeRawPid(trackaod2,4);
1097  if(isProton>=1) isp2=kTRUE;
1098  if(trackaod2->P()<1.){
1099  fPidObjprot->SetTOF(kTRUE);
1100  fPidObjprot->SetTOFdecide(kTRUE);
1101  }
1102  }
1103  }else{
1104  if(track2->P()<1.2){
1105  fPidHF->GetPidCombined()->SetDetectorMask(AliPIDResponse::kDetTPC);
1106  fPidHF->GetPidCombined()->ComputeProbabilities(track2,fPidHF->GetPidResponse(),prob2);
1107  }else{
1108  AliAODTrack *trackaod2=(AliAODTrack*)(obj->GetDaughter(2));
1109  if(trackaod2->P()<1.){
1110  fPidObjprot->SetTOF(kFALSE);
1111  fPidObjprot->SetTOFdecide(kFALSE);
1112  }
1113  Int_t isProton=fPidObjprot->MakeRawPid(trackaod2,4);
1114  if(isProton>=1) isp2=kTRUE;
1115  if(trackaod2->P()<1.){
1116  fPidObjprot->SetTOF(kTRUE);
1117  fPidObjprot->SetTOFdecide(kTRUE);
1118  }
1119  }
1120  }
1121  AliAODTrack *trackaod2=(AliAODTrack*)(obj->GetDaughter(2));
1122  if(fPidObjpion->MakeRawPid(trackaod2,2)>=1)ispi2=kTRUE;
1123  AliAODTrack *trackaod0=(AliAODTrack*)(obj->GetDaughter(2));
1124  if(fPidObjpion->MakeRawPid(trackaod0,2)>=1)ispi0=kTRUE;
1125 
1126  if(TMath::MaxElement(AliPID::kSPECIES,prob1) == prob1[AliPID::kKaon]){
1127 
1128  if(TMath::MaxElement(AliPID::kSPECIES,prob0) == prob0[AliPID::kProton] && TMath::MaxElement(AliPID::kSPECIES,prob2) == prob2[AliPID::kPion]) okLcpKpi = 1;
1129  if(TMath::MaxElement(AliPID::kSPECIES,prob2) == prob2[AliPID::kProton] && TMath::MaxElement(AliPID::kSPECIES,prob0) == prob0[AliPID::kPion]) okLcpiKp = 1;
1130  }
1131 
1132  if(!isK1 && TMath::MaxElement(AliPID::kSPECIES,prob1) == prob1[AliPID::kKaon]) isK1=kTRUE;
1133  if(!ispi0 && TMath::MaxElement(AliPID::kSPECIES,prob0) == prob0[AliPID::kPion]) ispi0=kTRUE;
1134  if(!ispi2 && TMath::MaxElement(AliPID::kSPECIES,prob2) == prob2[AliPID::kPion]) ispi2=kTRUE;
1135  if(!isp0 && TMath::MaxElement(AliPID::kSPECIES,prob0) == prob0[AliPID::kProton]) isp0=kTRUE;
1136  if(!isp2 && TMath::MaxElement(AliPID::kSPECIES,prob2) == prob2[AliPID::kProton]) isp2=kTRUE;
1137  if(isK1 && ispi0 && isp2) okLcpiKp = 1;
1138  if(isK1 && isp0 && ispi2) okLcpKpi = 1;
1139 
1140  if(okLcpKpi) returnvalue=1; //cuts passed as Lc->pKpi
1141  if(okLcpiKp) returnvalue=2; //cuts passed as Lc->piKp
1142  if(okLcpKpi && okLcpiKp) returnvalue=3; //cuts passed as both pKpi and piKp
1143 
1144  return returnvalue;
1145 
1146 
1147 }
1148 //----------------------------------------------------------
1150 
1151 
1152  if(!fUsePID || !obj) return 3;
1153  Int_t okLcpKpi=0,okLcpiKp=0;
1154  Int_t returnvalue=0;
1155  Bool_t isPeriodd=fPidHF->GetOnePad();
1156  Bool_t isMC=fPidHF->GetMC();
1157  Bool_t ispion0=kTRUE,ispion2=kTRUE;
1158  Bool_t isproton0=kFALSE,isproton2=kFALSE;
1159  Bool_t iskaon1=kFALSE;
1160  if(isPeriodd) {
1161  fPidObjprot->SetOnePad(kTRUE);
1162  fPidObjpion->SetOnePad(kTRUE);
1163  }
1164  if(isMC) {
1165  fPidObjprot->SetMC(kTRUE);
1166  fPidObjpion->SetMC(kTRUE);
1167  }
1168 
1169  for(Int_t i=0;i<3;i++){
1170  AliAODTrack *track=(AliAODTrack*)obj->GetDaughter(i);
1171  if(!track) return 0;
1172  // identify kaon
1173  if(i==1) {
1174  Int_t isKaon=fPidHF->MakeRawPid(track,3);
1175  if(isKaon>=1) {
1176  iskaon1=kTRUE;
1177  if(fPidHF->MakeRawPid(track,2)>=1) iskaon1=kFALSE;
1178  }
1179  if(!iskaon1) return 0;
1180 
1181  }else{
1182  //pion or proton
1183 
1184  Int_t isProton=fPidObjprot->MakeRawPid(track,4);
1185  if(isProton>=1){
1186  if(fPidHF->MakeRawPid(track,2)>=1) isProton=-1;
1187  if(fPidHF->MakeRawPid(track,3)>=1) isProton=-1;
1188  }
1189 
1190  Int_t isPion=fPidObjpion->MakeRawPid(track,2);
1191  if(fPidHF->MakeRawPid(track,3)>=1) isPion=-1;
1192  if(fPidObjprot->MakeRawPid(track,4)>=1) isPion=-1;
1193 
1194 
1195  if(i==0) {
1196  if(isPion<0) ispion0=kFALSE;
1197  if(isProton>=1) isproton0=kTRUE;
1198 
1199  }
1200  if(!ispion0 && !isproton0) return 0;
1201  if(i==2) {
1202  if(isPion<0) ispion2=kFALSE;
1203  if(isProton>=1) isproton2=kTRUE;
1204  }
1205 
1206  }
1207  }
1208 
1209  if(ispion2 && isproton0 && iskaon1) okLcpKpi=1;
1210  if(ispion0 && isproton2 && iskaon1) okLcpiKp=1;
1211  if(okLcpKpi) returnvalue=1; //cuts passed as Lc->pKpi
1212  if(okLcpiKp) returnvalue=2; //cuts passed as Lc->piKp
1213  if(okLcpKpi && okLcpiKp) returnvalue=3; //cuts passed as both pKpi and piKp
1214 
1215  return returnvalue;
1216 }
1217 //--------------------
1219 
1220  if(!fUsePID || !obj) {return 3;}
1221  Int_t okLcpKpi=0,okLcpiKp=0;
1222  Int_t returnvalue=0;
1223 
1224  Bool_t isMC=fPidHF->GetMC();
1225 
1226 
1227  if(isMC) {
1228  fPidObjprot->SetMC(kTRUE);
1229  fPidObjpion->SetMC(kTRUE);
1230  }
1231 
1232  AliVTrack *track0=dynamic_cast<AliVTrack*>(obj->GetDaughter(0));
1233  AliVTrack *track1=dynamic_cast<AliVTrack*>(obj->GetDaughter(1));
1234  AliVTrack *track2=dynamic_cast<AliVTrack*>(obj->GetDaughter(2));
1235  if (!track0 || !track1 || !track2) return 0;
1236  Double_t prob0[AliPID::kSPECIES];
1237  Double_t prob1[AliPID::kSPECIES];
1238  Double_t prob2[AliPID::kSPECIES];
1239 
1240  fPidHF->GetPidCombined()->ComputeProbabilities(track0,fPidHF->GetPidResponse(),prob0);
1241  fPidHF->GetPidCombined()->ComputeProbabilities(track1,fPidHF->GetPidResponse(),prob1);
1242  fPidHF->GetPidCombined()->ComputeProbabilities(track2,fPidHF->GetPidResponse(),prob2);
1243 
1244 
1246  okLcpiKp= (prob0[AliPID::kPion ]>fPIDThreshold[AliPID::kPion ])
1249  okLcpKpi= (prob0[AliPID::kProton]>fPIDThreshold[AliPID::kProton])
1250  &&(prob1[AliPID::kKaon ]>fPIDThreshold[AliPID::kKaon ])
1252  }else{
1253  //pion or proton
1254 
1255 
1256  if(TMath::MaxElement(AliPID::kSPECIES,prob1) == prob1[AliPID::kKaon]){
1257  if(TMath::MaxElement(AliPID::kSPECIES,prob0) == prob0[AliPID::kProton] && TMath::MaxElement(AliPID::kSPECIES,prob2) == prob2[AliPID::kPion]) okLcpKpi = 1;
1258  if(TMath::MaxElement(AliPID::kSPECIES,prob2) == prob2[AliPID::kProton] && TMath::MaxElement(AliPID::kSPECIES,prob0) == prob0[AliPID::kPion]) okLcpiKp = 1;
1259  }
1260  }
1261 
1262  if(okLcpKpi) returnvalue=1; //cuts passed as Lc->pKpi
1263  if(okLcpiKp) returnvalue=2; //cuts passed as Lc->piKp
1264  if(okLcpKpi && okLcpiKp) returnvalue=3; //cuts passed as both pKpi and piKp
1265 
1266  return returnvalue;
1267 }
1268 //-----------------------
1270 
1271  Int_t returnvalue =0;
1272  Double_t thresholdK =0.7;
1273  Double_t thresholdPi =0.3;
1274  Double_t thresholdPr =0.7;
1275 
1276  AliVTrack *track0=dynamic_cast<AliVTrack*>(obj->GetDaughter(0));
1277  AliVTrack *track1=dynamic_cast<AliVTrack*>(obj->GetDaughter(1));
1278  AliVTrack *track2=dynamic_cast<AliVTrack*>(obj->GetDaughter(2));
1279 
1280  if (!track0 || !track1 || !track2) return 0;
1281  Double_t prob0[AliPID::kSPECIES];
1282  Double_t prob1[AliPID::kSPECIES];
1283  Double_t prob2[AliPID::kSPECIES];
1284 
1285  fPidHF->GetPidCombined()->ComputeProbabilities(track0,fPidHF->GetPidResponse(),prob0);
1286  fPidHF->GetPidCombined()->ComputeProbabilities(track1,fPidHF->GetPidResponse(),prob1);
1287  fPidHF->GetPidCombined()->ComputeProbabilities(track2,fPidHF->GetPidResponse(),prob2);
1288 
1289  if(prob1[AliPID::kKaon]>thresholdK){
1290  if(TMath::MaxElement(AliPID::kSPECIES,prob0)>TMath::MaxElement(AliPID::kSPECIES,prob2)){
1291  if(((prob0[AliPID::kPion ]>prob0[AliPID::kProton ])&& prob0[AliPID::kPion]>thresholdPi) && prob2[AliPID::kProton]>thresholdPr) returnvalue=2;//piKp
1292  else if(((prob0[AliPID::kProton ]>prob0[AliPID::kPion ])&& prob0[AliPID::kProton]>thresholdPr) && prob2[AliPID::kPion]>thresholdPi)returnvalue =1;//pKpi
1293  }
1294 
1295  else if(TMath::MaxElement(AliPID::kSPECIES,prob0)<TMath::MaxElement(AliPID::kSPECIES,prob2)){
1296  if(((prob2[AliPID::kPion ]>prob2[AliPID::kProton ])&& prob2[AliPID::kPion]>thresholdPi) && prob0[AliPID::kProton]>thresholdPr) returnvalue=1; //pKpi
1297  else if(((prob2[AliPID::kProton ]>prob2[AliPID::kPion ])&& prob2[AliPID::kProton]>thresholdPr) && prob0[AliPID::kPion]>thresholdPi)returnvalue =2; //piKp
1298  }
1299 
1300  }
1301  return returnvalue;
1302 
1303 }
1304 //------------------------------------------------------
1306 
1307  SetName("LctopKpiProdCuts");
1308  SetTitle("Production cuts for Lc analysis");
1309 
1310  AliESDtrackCuts *esdTrackCuts = new AliESDtrackCuts("AliESDtrackCuts","default");
1311  esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
1312  esdTrackCuts->SetRequireTPCRefit(kTRUE);
1313  esdTrackCuts->SetMinNClustersTPC(70);
1314  esdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD,
1315  AliESDtrackCuts::kAny);
1316  esdTrackCuts->SetRequireITSRefit(kTRUE);
1317  esdTrackCuts->SetMinNClustersITS(4);
1318  esdTrackCuts->SetMinDCAToVertexXY(0.);
1319  esdTrackCuts->SetEtaRange(-0.8,0.8);
1320  esdTrackCuts->SetPtRange(0.3,1.e10);
1321  AddTrackCuts(esdTrackCuts);
1322  delete esdTrackCuts;
1323  esdTrackCuts=NULL;
1324 
1325  const Int_t nvars=13;
1326  const Int_t nptbins=9;
1327  Float_t* ptbins;
1328  ptbins=new Float_t[nptbins+1];
1329  ptbins[0]=0.;
1330  ptbins[1]=1.;
1331  ptbins[2]=2.;
1332  ptbins[3]=3.;
1333  ptbins[4]=4.;
1334  ptbins[5]=5.;
1335  ptbins[6]=6.;
1336  ptbins[7]=8.;
1337  ptbins[8]=10.;
1338  ptbins[9]=99999.;
1339 
1340  SetGlobalIndex(nvars,nptbins);
1341  SetPtBins(nptbins+1,ptbins);
1342 
1343  Float_t** prodcutsval;
1344  prodcutsval=new Float_t*[nvars];
1345  for(Int_t iv=0;iv<nvars;iv++){
1346  prodcutsval[iv]=new Float_t[nptbins];
1347  }
1348 
1349  for(Int_t ipt=0;ipt<nptbins;ipt++){
1350  prodcutsval[0][ipt]=0.13;
1351  prodcutsval[1][ipt]=0.4;
1352  prodcutsval[2][ipt]=0.4;
1353  prodcutsval[3][ipt]=0.;
1354  prodcutsval[4][ipt]=0.;
1355  prodcutsval[5][ipt]=0.;
1356  prodcutsval[6][ipt]=0.06;
1357  prodcutsval[7][ipt]=0.;
1358  prodcutsval[8][ipt]=0.;
1359  prodcutsval[9][ipt]=0.;
1360  prodcutsval[10][ipt]=0.;
1361  prodcutsval[11][ipt]=0.05;
1362  prodcutsval[12][ipt]=0.4;
1363  }
1364  SetCuts(nvars,nptbins,prodcutsval);
1365 
1366  AliAODPidHF* pidObjK=new AliAODPidHF();
1367  Double_t sigmasK[5]={3.,1.,1.,3.,2.};
1368  pidObjK->SetSigma(sigmasK);
1369  pidObjK->SetAsym(kTRUE);
1370  pidObjK->SetMatch(1);
1371  pidObjK->SetTPC(kTRUE);
1372  pidObjK->SetTOF(kTRUE);
1373  pidObjK->SetITS(kTRUE);
1374  Double_t plimK[2]={0.5,0.8};
1375  pidObjK->SetPLimit(plimK,2);
1376  pidObjK->SetTOFdecide(kTRUE);
1377  SetPidHF(pidObjK);
1378 
1379  AliAODPidHF* pidObjpi=new AliAODPidHF();
1380  pidObjpi->SetTPC(kTRUE);
1381  Double_t sigmaspi[5]={3.,0.,0.,0.,0.};
1382  pidObjpi->SetSigma(sigmaspi);
1383  pidObjpi->SetTOFdecide(kTRUE);
1384  SetPidpion(pidObjpi);
1385 
1386  AliAODPidHF* pidObjp=new AliAODPidHF();
1387  Double_t sigmasp[5]={3.,1.,1.,3.,2.};
1388  pidObjp->SetSigma(sigmasp);
1389  pidObjp->SetAsym(kTRUE);
1390  pidObjp->SetMatch(1);
1391  pidObjp->SetTPC(kTRUE);
1392  pidObjp->SetTOF(kTRUE);
1393  pidObjp->SetITS(kTRUE);
1394  Double_t plimp[2]={1.,2.};
1395  pidObjp->SetPLimit(plimp,2);
1396  pidObjp->SetTOFdecide(kTRUE);
1397 
1398  SetUsePID(kTRUE);
1399 
1400  // PrintAll();
1401 
1402  for(Int_t iiv=0;iiv<nvars;iiv++){
1403  delete [] prodcutsval[iiv];
1404  }
1405  delete [] prodcutsval;
1406  prodcutsval=NULL;
1407  delete [] ptbins;
1408  ptbins=NULL;
1409 
1410  delete pidObjK;
1411  pidObjK=NULL;
1412  delete pidObjpi;
1413  pidObjpi=NULL;
1414  delete pidObjp;
1415  pidObjp=NULL;
1416 
1417  return;
1418 }
1419 //-----------------------
1421 
1422  Int_t returnvalue =0;
1423  Double_t thresholdPr=fPIDThreshold[AliPID::kProton ];
1424  Double_t thresholdK=fPIDThreshold[AliPID::kKaon ];
1425  Double_t thresholdPi=fPIDThreshold[AliPID::kPion ];
1426 
1427 
1428  AliVTrack *track0=dynamic_cast<AliVTrack*>(obj->GetDaughter(0));
1429  AliVTrack *track1=dynamic_cast<AliVTrack*>(obj->GetDaughter(1));
1430  AliVTrack *track2=dynamic_cast<AliVTrack*>(obj->GetDaughter(2));
1431 
1432  if (!track0 || !track1 || !track2) return 0;
1433  Double_t prob0[AliPID::kSPECIES];
1434  Double_t prob1[AliPID::kSPECIES];
1435  Double_t prob2[AliPID::kSPECIES];
1436 
1437  fPidHF->GetPidCombined()->ComputeProbabilities(track0,fPidHF->GetPidResponse(),prob0);
1438  fPidHF->GetPidCombined()->ComputeProbabilities(track1,fPidHF->GetPidResponse(),prob1);
1439  fPidHF->GetPidCombined()->ComputeProbabilities(track2,fPidHF->GetPidResponse(),prob2);
1440 
1441  if(prob1[AliPID::kKaon]<thresholdK) return 0;
1442  if(prob0[AliPID::kPion]<thresholdPi&&prob2[AliPID::kPion]<thresholdPi) return 0;
1443  if(prob0[AliPID::kProton]<thresholdPr&&prob2[AliPID::kProton]<thresholdPr) return 0;
1444  if((prob0[AliPID::kPion]>prob0[AliPID::kProton]&&prob2[AliPID::kPion]>prob2[AliPID::kProton])||(prob0[AliPID::kPion]<prob0[AliPID::kProton]&&prob2[AliPID::kPion]<prob2[AliPID::kProton])) return 0; //pKp or piKpi candidate
1445 
1446  if(prob0[AliPID::kPion]>prob0[AliPID::kProton]&&prob2[AliPID::kPion]<prob2[AliPID::kProton]) returnvalue=2; //piKp
1447  else if(prob0[AliPID::kPion]==prob0[AliPID::kProton]||prob2[AliPID::kPion]==prob2[AliPID::kProton]) returnvalue=3; //pKpi or piKp
1448  else returnvalue=1; //pKpi
1449 
1450  return returnvalue;
1451 
1452 }
1453 //--------------------------------
1454 Double_t AliRDHFCutsLctopKpi::ComputeInvMass3tracks(AliAODTrack* track1, AliAODTrack* track2, AliAODTrack* track3, Int_t pdg1, Int_t pdg2, Int_t pdg3) {
1455 
1456  Double_t mass1 = TDatabasePDG::Instance()->GetParticle(pdg1)->Mass();
1457  Double_t mass2 = TDatabasePDG::Instance()->GetParticle(pdg2)->Mass();
1458  Double_t mass3 = TDatabasePDG::Instance()->GetParticle(pdg3)->Mass();
1459 
1460  Double_t px1 = track1->Px();
1461  Double_t py1 = track1->Py();
1462  Double_t pz1 = track1->Pz();
1463  Double_t px2 = track2->Px();
1464  Double_t py2 = track2->Py();
1465  Double_t pz2 = track2->Pz();
1466  Double_t px12= px1+px2;
1467  Double_t py12= py1+py2;
1468  Double_t pz12= pz1+pz2;
1469 
1470  Double_t px3 = track3->Px();
1471  Double_t py3 = track3->Py();
1472  Double_t pz3 = track3->Pz();
1473 
1474  Double_t E123;
1475  Double_t E12 = TMath::Sqrt(mass1*mass1+px1*px1+py1*py1+pz1*pz1)+TMath::Sqrt(mass2*mass2+px2*px2+py2*py2+pz2*pz2);
1476  if(E12*E12-((px1+px2)*(px1+px2)+(py1+py2)*(py1+py2)+(pz1+pz2)*(pz1+pz2))<0) return false;
1477  Double_t mass12= TMath::Sqrt(E12*E12-((px1+px2)*(px1+px2)+(py1+py2)*(py1+py2)+(pz1+pz2)*(pz1+pz2)));
1478  if(mass3*mass3+px3*px3+py3*py3+pz3*pz3<0) return false;
1479  E123= TMath::Sqrt(mass12*mass12+px12*px12+py12*py12+pz12*pz12)+TMath::Sqrt(mass3*mass3+px3*px3+py3*py3+pz3*pz3);
1480  if(E123*E123-((px12+px3)*(px12+px3)+(py12+py3)*(py12+py3)+(pz12+pz3)*(pz12+pz3))<0) return false;
1481  Double_t mass123=TMath::Sqrt(E123*E123-((px12+px3)*(px12+px3)+(py12+py3)*(py12+py3)+(pz12+pz3)*(pz12+pz3)));
1482  return mass123;
1483 
1484 }
1485 //--------------------
1487  if (!fCutsRD) {
1488  AliFatal("Cut matrix not inizialized. Exit...");
1489  return 0;
1490  }
1491  Bool_t recoLc=true;
1492  Bool_t v=false;
1493  Int_t chargeLc=0;
1494  //compute pt and charge
1495  Double_t px=0, py=0;
1496  static Double_t mLcPDG = TDatabasePDG::Instance()->GetParticle(4122)->Mass();
1497  AliAODTrack *tracks[3];
1498  for(Int_t iDaught=0; iDaught<3; iDaught++) {
1499  tracks[iDaught]=(AliAODTrack*)aodTracks.At(iDaught);
1500  if(!tracks[iDaught]) return 0;
1501  else
1502  {
1503  px += tracks[iDaught]->Px();
1504  py += tracks[iDaught]->Py();
1505  chargeLc+=tracks[iDaught]->Charge();
1506  }
1507  }
1508  Double_t ptLc=TMath::Sqrt(px*px+py*py);
1509  Int_t ptbin=PtBin(ptLc);
1510  Double_t diff=fCutsRD[GetGlobalIndex(0,ptbin)];
1511  for(Int_t iDaught=0; iDaught<3; iDaught++) {
1512  if(tracks[iDaught]->Charge()==-1*chargeLc){
1513  for(Int_t i=0; i<3; i++) {
1514  if(i!=iDaught){
1515  for(Int_t j=0; j<3; j++) {
1516  if(j!=i && j!=iDaught){
1517  Double_t candmass1=ComputeInvMass3tracks(tracks[i], tracks[iDaught], tracks[j], 2212, 321, 211);//PKpi
1518  if(TMath::Abs(candmass1-mLcPDG)<diff) v=true;
1519  if(!v){
1520  Double_t candmass2=ComputeInvMass3tracks(tracks[i], tracks[iDaught], tracks[j], 211, 321, 2212);//piKP
1521  if(TMath::Abs(candmass2-mLcPDG)<diff) v=true;
1522  if(!v) recoLc=false;
1523  }
1524  }
1525  }
1526  }
1527  }
1528  }
1529  }
1530  return recoLc;
1531 }
1532 
Double_t ComputeInvMass3tracks(AliAODTrack *track1, AliAODTrack *track2, AliAODTrack *track3, Int_t pdg1, Int_t pdg2, Int_t pdg3)
ECutsStrategy fCutsStrategy
PID threshold for each species.
void SetAsym(Bool_t asym)
Definition: AliAODPidHF.h:101
Int_t PtBin(Float_t pt) const
Definition: AliRDHFCuts.h:330
double Double_t
Definition: External.C:58
Bool_t IsSignalMC(AliAODRecoDecay *d, AliAODEvent *aod, Int_t pdg) const
virtual void GetCutVarsForOpt(AliAODRecoDecayHF *d, Float_t *vars, Int_t nvars, Int_t *pdgdaughters)
virtual void SetStandardCutsPbPb2011()
Double_t mass
Bool_t CheckTOFPIDStatus(AliAODTrack *track) const
void SetPidpion(AliAODPidHF *pidPion)
void SetNVars(Int_t nVars)
Definition: AliRDHFCuts.h:445
virtual void SetStandardCutsPPb2013()
Double_t fMaxRapidityCand
minimum pt of the candidate
Definition: AliRDHFCuts.h:501
void EnableSemiCentralTrigger()
Definition: AliRDHFCuts.h:101
Int_t CombinePIDCuts(Int_t returnvalue, Int_t returnvaluePID) const
void SetGlobalIndex()
Definition: AliRDHFCuts.h:213
AliRDHFCuts & operator=(const AliRDHFCuts &source)
Bool_t fUsePID
Definition: AliRDHFCuts.h:476
Int_t MatchTPCTOFMin(AliAODTrack *track, Int_t specie)
PID nSigma strategy closer to the Bayesian approach with Max. prob.
Int_t IsSelectedCombinedPID(AliAODRecoDecayHF *obj)
void SetPidHF(AliAODPidHF *pidObj)
see enum below
Definition: AliRDHFCuts.h:227
AliAODPidHF * GetPidHF() const
Definition: AliRDHFCuts.h:264
void SetTOF(Bool_t tof)
Definition: AliAODPidHF.h:108
Bool_t HasBadDaughters() const
virtual void SetStandardCutsPP2010()
void SetUseCombined(Bool_t useCombined=kTRUE)
Definition: AliAODPidHF.h:213
void SetUseDefaultPriors(Bool_t defaultP)
Definition: AliAODPidHF.h:214
void SetCombDetectors(ECombDetectors pidComb)
Definition: AliAODPidHF.h:125
void SetPidprot(AliAODPidHF *pidProt)
int Int_t
Definition: External.C:63
Bool_t fUseTrackSelectionWithFilterBits
flag to reject kink daughters
Definition: AliRDHFCuts.h:512
void SetCuts(Int_t nVars, Int_t nPtBins, Float_t **cutsRD)
Int_t fnVarsForOpt
Definition: AliRDHFCuts.h:471
Int_t IsSelectedCombinedPIDpPb2(AliAODRecoDecayHF *obj)
void ResetMaskAndEnableMBTrigger()
Definition: AliRDHFCuts.h:81
AliRDHFCutsLctopKpi & operator=(const AliRDHFCutsLctopKpi &source)
AliPIDCombined * GetPidCombined() const
Definition: AliAODPidHF.h:174
float Float_t
Definition: External.C:68
const Double_t ptmax
Double_t fMaxPtCand
minimum pt of the candidate
Definition: AliRDHFCuts.h:500
virtual Bool_t IsInFiducialAcceptance(Double_t pt, Double_t y) const
Bool_t fKeepSignalMC
max rapidity of candidate (if !=-999 overrides IsInFiducialAcceptance)
Definition: AliRDHFCuts.h:502
Double_t GetSigmaVert(const AliAODEvent *aod=0x0)
Bool_t PreSelectMass(TObjArray aodTracks)
Int_t fIsSelectedPID
outcome of cuts selection
Definition: AliRDHFCuts.h:498
Int_t IsSelectedCombinedPIDProb(AliAODRecoDecayHF *obj)
virtual void SetStandardCutsPbPb2010()
Bool_t GetMC() const
Definition: AliAODPidHF.h:161
Int_t MakeRawPid(AliAODTrack *track, Int_t specie)
AliPIDResponse * GetPidResponse() const
Definition: AliAODPidHF.h:173
Int_t IsSelectedNSigmaPbPb(AliAODRecoDecayHF *obj)
void SetSigma(Double_t *sigma)
Definition: AliAODPidHF.h:52
Float_t * fCutsRD
fnVars*fnPtBins
Definition: AliRDHFCuts.h:474
Int_t IsSelectedCombinedPIDSoft(AliAODRecoDecayHF *obj)
virtual Int_t IsSelectedPID(AliAODRecoDecayHF *obj)
void SetVarsForOpt(Int_t nVars, Bool_t *forOpt)
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:472
Bool_t isMC
Bool_t AreDaughtersSelected(AliAODRecoDecayHF *rd, const AliAODEvent *aod=0x0) const
void EnableCentralTrigger()
Definition: AliRDHFCuts.h:89
decay
Definition: HFPtSpectrum.C:42
virtual Int_t IsSelected(TObject *obj, Int_t selectionLevel)
Bool_t GetOnePad() const
Definition: AliAODPidHF.h:162
void SetUsePID(Bool_t flag=kTRUE)
Definition: AliRDHFCuts.h:221
void SetMC(Bool_t mc)
Definition: AliAODPidHF.h:114
void SetPtBins(Int_t nPtBinLimits, Float_t *ptBinLimits)
EPIDStrategy fPIDStrategy
switch for cut on d0p*d0K vs. d0K*d0pi
void SetITS(Bool_t its)
Definition: AliAODPidHF.h:109
void SetPIDStrategy(EPIDStrategy pidStrategy)
void SetTOFdecide(Bool_t tOFdecide)
Definition: AliAODPidHF.h:120
void SetMatch(Int_t match)
Definition: AliAODPidHF.h:111
void AddTrackCuts(const AliESDtrackCuts *cuts)
Definition: AliRDHFCuts.h:219
void SetPLimit(Double_t *plim, Int_t npLim)
AliKFParticle * ApplyVertexingKF(Int_t *iprongs, Int_t nprongs, Int_t *pdgs, Bool_t topoCostraint, Double_t bzkG, Double_t *mass) const
vertexing KF:
Int_t IsSelectedPIDStrong(AliAODRecoDecayHF *obj)
void SetTPC(Bool_t tpc)
Definition: AliAODPidHF.h:107
bool Bool_t
Definition: External.C:53
Double_t CosPointingAngle() const
void SetPIDThreshold(AliPID::EParticleType species, Double_t threshold)
AliRDHFCutsLctopKpi(const char *name="CutsLctopKpi")
void SetTriggerClass(TString trclass0, TString trclass1="")
Definition: AliRDHFCuts.h:208
AliAODPidHF * fPidHF
enable AOD049 centrality cleanup
Definition: AliRDHFCuts.h:478
Int_t IsSelectedCombinedPIDpPb(AliAODRecoDecayHF *obj)
void SetOptPileup(Int_t opt=0)
Definition: AliRDHFCuts.h:235
Int_t GetGlobalIndex(Int_t iVar, Int_t iPtBin) const
Double_t DecayLength() const
AliKFParticle * ReconstructKF(AliAODRecoDecayHF3Prong *d, Int_t *pdgs, Double_t field, Bool_t constraint) const
Int_t nptbins
Double_t fMinPtCand
outcome of PID selection
Definition: AliRDHFCuts.h:499
Bool_t fUseSpecialCut
cut strategy (standard or KF)
void SetOnePad(Bool_t onepad)
Definition: AliAODPidHF.h:116
Double_t fPIDThreshold[AliPID::kSPECIES]
PIS strategy (nsigma, combined)
void SetPidResponse(AliPIDResponse *pidResp)
Definition: AliAODPidHF.h:124