AliPhysics  5a28df1 (5a28df1)
AliRDHFCutsLctoeleLambdafromAODtracks.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->e+Lambda
21 //
22 // Modified by Y.S Watanabe - wyosuke@cns.s.u-tokyo.ac.jp
23 //
25 
26 #include <Riostream.h>
27 
28 #include <TDatabasePDG.h>
29 #include <TMath.h>
30 #include <TVector3.h>
31 
32 #include "AliAnalysisManager.h"
33 #include "AliInputEventHandler.h"
34 #include "AliPIDResponse.h"
36 #include "AliAODRecoCascadeHF.h"
37 #include "AliAODTrack.h"
38 #include "AliESDtrack.h"
39 #include "AliESDVertex.h"
40 #include "AliAODVertex.h"
41 #include "AliAODv0.h"
42 #include "AliAODcascade.h"
43 #include "AliESDv0.h"
44 
45 using std::cout;
46 using std::endl;
47 
51 
52 //--------------------------------------------------------------------------
54 AliRDHFCuts(name),
55  fPIDStrategy(kNSigmaCuts),
56  fCombinedPIDThreshold(0.),
57  fUseLambdaPID(kFALSE),
58  fPidObjProton(0),
59  fPidObjPion(0),
60  fUseOnTheFlyV0(kFALSE),
61  fUseV0Topology(0),
62  fBzkG(0),
63  fProdTrackTPCNclsPIDMin(0),
64  fProdTrackTPCNclsRatioMin(0.0),
65  fProdUseAODFilterBit(kTRUE),
66  fProdAODFilterBit(4),
67  fProdRejectTrackWithShared(kFALSE),
68  fProdITSSharedFractionMax(-9999),
69  fProdITSChi2OverNclsMax(-9999),
70  fProdV0KinkRejection(kTRUE),
71  fProdV0MassTolLambda(0.01),
72  fProdV0MassTolLambdaRough(0.01),
73  fProdV0PtMin(0.5),
74  fProdV0PtMax(9999.),
75  fProdV0CosPointingAngleToPrimVtxMin(0.99),
76  fProdV0DcaDaughtersMax(1.5),
77  fProdV0DaughterEtaRange(0.8),
78  fProdV0DaughterPtMin(0.0),
79  fProdV0DaughterTPCClusterMin(70),
80  fProdV0DaughterTPCCrossRatioMin(0.0),
81  fProdRfidMinV0(0.6),
82  fProdRfidMaxV0(100.0),
83  fProdDcaV0ToPrimVertexMin(0.),
84  fProdDcaV0ToPrimVertexMax(9999.),
85  fProdDcaV0PrToPrimVertexMin(0.),
86  fProdDcaV0PiToPrimVertexMin(0.),
87  fProdV0ProperDecayLengthMax(99999.),
88  fProdMassRejK0s(0.),
89  fProdV0EtaMin(-9999.),
90  fProdV0EtaMax(9999.),
91  fProdV0RapMin(-9999.),
92  fProdV0RapMax(9999.),
93  fProdRoughMassTol(0.25),
94  fProdRoughPtMin(0.0),
95  fExcludePionTPC(kFALSE),
96  fExcludeProtonTPC(kFALSE),
97  fExcludeKaonTPC(kFALSE),
98  fExcludenSigmaPionTPC(3.),
99  fExcludenSigmaProtonTPC(3.),
100  fExcludenSigmaKaonTPC(3.),
101  fSigmaElectronTPCMin(-9999.),
102  fSigmaElectronTPCPtDepPar0(-9999.),
103  fSigmaElectronTPCPtDepPar1(-9999.),
104  fSigmaElectronTPCPtDepPar2(0.),
105  fSigmaElectronTPCMax(9999.),
106  fSigmaElectronTOFMin(-9999.),
107  fSigmaElectronTOFMax(9999.),
108  fSigmaElectronITSMin(-9999.),
109  fSigmaElectronITSMax(9999.),
110  fConversionMassMax(-1.),
111  fConversionUseStrongerCut(kFALSE),
112  fEleLambdaMassMax(2.3)
113 {
114  //
115  // Default Constructor
116  //
117  for(Int_t i=0;i<3;i++){
118  fPrimVert[i] = 0.;
119  }
120 
121  const Int_t nvars=4;
122  SetNVars(nvars);
123  TString varNames[nvars]={
124  "InvMass [GeV/c2]", //0
125  "cos(Opening angle) [cos(rad)]", //1
126  "dPhiS", //2
127  "dEtaS" //3
128  };
129 
130  Bool_t isUpperCut[nvars]={
131  kTRUE, //0
132  kFALSE, //1
133  kFALSE, //2
134  kFALSE //3
135  };
136  SetVarNames(nvars,varNames,isUpperCut);
137  Bool_t forOpt[nvars]={
138  kTRUE, //0
139  kTRUE, //1
140  kTRUE, //2
141  kTRUE, //3
142  };
143  SetVarsForOpt(nvars,forOpt);
144 
145  Float_t limits[2]={0,999999999.};
146  SetPtBins(2,limits);
147 }
148 //--------------------------------------------------------------------------
150  AliRDHFCuts(source),
151  fPIDStrategy(source.fPIDStrategy),
155  fPidObjPion(source.fPidObjPion),
158  fBzkG(source.fBzkG),
169  fProdV0PtMin(source.fProdV0PtMin),
170  fProdV0PtMax(source.fProdV0PtMax),
209 {
210  //
211  // Copy constructor
212  //
213  for(Int_t i=0;i<3;i++){
214  fPrimVert[i] = source.fPrimVert[i];
215  }
216 }
217 //--------------------------------------------------------------------------
219 {
220  //
221  // assignment operator
222  //
223 
224  if (this != &source) {
225  AliRDHFCuts::operator=(source);
226  }
227 
228  fPIDStrategy = source.fPIDStrategy;
230  fUseLambdaPID = source.fUseLambdaPID;
231  fPidObjProton = source.fPidObjProton;
232  fPidObjPion = source.fPidObjPion;
235  fBzkG = source.fBzkG;
246  fProdV0PtMin = source.fProdV0PtMin;
247  fProdV0PtMax = source.fProdV0PtMax;
262  fProdV0EtaMin = source.fProdV0EtaMin;
263  fProdV0EtaMax = source.fProdV0EtaMax;
264  fProdV0RapMin = source.fProdV0RapMin;
265  fProdV0RapMax = source.fProdV0RapMax;
286 
287  for(Int_t i=0;i<3;i++){
288  fPrimVert[i] = source.fPrimVert[i];
289  }
290 
291  return *this;
292 }
293 
294 //---------------------------------------------------------------------------
296  //
297  // Default Destructor
298  //
299 
300 }
301 
302 //---------------------------------------------------------------------------
304  //
305  // Fills in vars the values of the variables
306  //
307 
308  if (pdgdaughters[0]==-9999) return; // dummy
309 
311  if(!dd){
312  AliError("No AliAODRecoCascadeHF object found\n");
313  return;
314  }
315 
316  if (nvars!=fnVarsForOpt) {
317  AliError("Cut object seems to have the wrong number of variables\n");
318  return;
319  }
320 
321  //Double_t ptD=d->Pt();
322  //Int_t ptbin=PtBin(ptD);
323  Int_t iter=-1;
324 
325 
326  if(fVarsForOpt[0]){
327  iter++;
328  UInt_t pdgdg[2]={11,3122};
329  vars[iter]= dd->InvMass(2,pdgdg);
330  }
331  if(fVarsForOpt[1]){
332  iter++;
333  Double_t v0px = dd->PxProng(1);
334  Double_t v0py = dd->PyProng(1);
335  Double_t v0pz = dd->PzProng(1);
336  Double_t epx = dd->PxProng(0);
337  Double_t epy = dd->PyProng(0);
338  Double_t epz = dd->PzProng(0);
339  vars[iter]= (v0px*epx+v0py*epy+v0pz*epz)/sqrt(v0px*v0px+v0py*v0py+v0pz*v0pz)/sqrt(epx*epx+epy*epy+epz*epz);
340  }
341 
342  return;
343 }
344 
345 //---------------------------------------------------------------------------
347  //
348  // Apply selection
349  //
350 
351  if (!fCutsRD) {
352  AliFatal("Cut matrix not inizialized. Exit...");
353  return 0;
354  }
355 
357  if(!d){
358  AliDebug(2,"AliAODRecoCascadeHF null");
359  return 0;
360  }
361 
362  Double_t ptD=d->Pt();
363  if(ptD<fMinPtCand) return 0;
364  if(ptD>fMaxPtCand) return 0;
365 
366  if (selectionLevel==AliRDHFCuts::kAll ||
367  selectionLevel==AliRDHFCuts::kTracks) {
368  //Performed in production stage
369  }
370 
371  Int_t returnvalueCuts=1;
372  // selection on candidate
373  if (selectionLevel==AliRDHFCuts::kAll ||
374  selectionLevel==AliRDHFCuts::kCandidate) {
375 
376  Double_t pt=d->Pt();
377  Int_t ptbin=PtBin(pt);
378  if (ptbin==-1) {
379  return 0;
380  }
381  Bool_t okcand=kTRUE;
382 
383  Double_t mlamPDG = TDatabasePDG::Instance()->GetParticle(3122)->Mass();
384  UInt_t pdgdg[2]={11,3122};
385  Double_t InvMassEleLambda = d->InvMass(2,pdgdg);
386 
387  Double_t v0px = d->PxProng(1);
388  Double_t v0py = d->PyProng(1);
389  Double_t v0pz = d->PzProng(1);
390  Double_t epx = d->PxProng(0);
391  Double_t epy = d->PyProng(0);
392  Double_t epz = d->PzProng(0);
393  Double_t cosoa = (v0px*epx+v0py*epy+v0pz*epz)/sqrt(v0px*v0px+v0py*v0py+v0pz*v0pz)/sqrt(epx*epx+epy*epy+epz*epz);
394 
395  Double_t dphis_e_pr, detas_e_pr, dphis_e_pi, detas_e_pi;
396  dphis_e_pr = 9999.;
397  detas_e_pr = 9999.;
398  dphis_e_pi = 9999.;
399  detas_e_pi = 9999.;
400  if(fCutsRD[GetGlobalIndex(2,ptbin)]>0 || fCutsRD[GetGlobalIndex(3,ptbin)]>0){
401  AliAODTrack *trke = (AliAODTrack*)d->GetDaughter(0);
402  AliAODv0 *v0 = (AliAODv0*)d->GetDaughter(1);
403  if(trke && v0){
404  Bool_t isparticle = kTRUE;
405  if(TMath::Abs(v0->MassAntiLambda()-mlamPDG)<fProdV0MassTolLambdaRough) isparticle = kFALSE;
406  AliAODTrack *cprtrk = 0;
407  AliAODTrack *cpitrk = 0;
408  if(isparticle){
409  cprtrk = (AliAODTrack*)v0->GetDaughter(0);
410  cpitrk = (AliAODTrack*)v0->GetDaughter(1);
411  }else{
412  cprtrk = (AliAODTrack*)v0->GetDaughter(1);
413  cpitrk = (AliAODTrack*)v0->GetDaughter(0);
414  }
415  if(cprtrk && cpitrk)
416  GetdPhiSdEtaSR125(trke,cprtrk,cpitrk,fBzkG,fPrimVert, dphis_e_pr,detas_e_pr,dphis_e_pi,detas_e_pi);
417  }
418  }
419 
420  if(InvMassEleLambda > fCutsRD[GetGlobalIndex(0,ptbin)])
421  {
422  okcand = kFALSE;
423  }
424  if(cosoa < fCutsRD[GetGlobalIndex(1,ptbin)])
425  {
426  okcand = kFALSE;
427  }
428  if(fabs(dphis_e_pr) < fCutsRD[GetGlobalIndex(2,ptbin)] && fabs(detas_e_pr) < fCutsRD[GetGlobalIndex(3,ptbin)])
429  {
430  okcand = kFALSE;
431  }
432  if(fabs(dphis_e_pi) < fCutsRD[GetGlobalIndex(2,ptbin)] && fabs(detas_e_pi) < fCutsRD[GetGlobalIndex(3,ptbin)])
433  {
434  okcand = kFALSE;
435  }
436 
437  if(!okcand) return 0;
438  returnvalueCuts = 1;
439  }
440 
441  Int_t returnvaluePID=1;
442  if(selectionLevel==AliRDHFCuts::kAll ||
443  selectionLevel==AliRDHFCuts::kCandidate||
444  selectionLevel==AliRDHFCuts::kPID) {
445  //Not used
446  }
447 
448  Int_t returnvalue = 0;
449  if(returnvalueCuts==1 && returnvaluePID==1) returnvalue=1;
450 
451  return returnvalue;
452 }
453 
454 //---------------------------------------------------------------------------
456 {
457  //
458  // IsSelectedPID (not used)
459  //
460 
461  if(!fUsePID || !obj) return 1;
462 
464  AliAODTrack *part = dd->GetBachelor();
465 
466  Int_t returnvalue=1;
467 
468  if(fPidHF->GetPidResponse()==0x0){
469  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
470  AliInputEventHandler *inputHandler=(AliInputEventHandler*)mgr->GetInputEventHandler();
471  AliPIDResponse *pidResp=inputHandler->GetPIDResponse();
472  fPidHF->SetPidResponse(pidResp);
473  }
474 
475  Int_t isElectron=fPidHF->MakeRawPid(part,0);
476  if(isElectron<1) returnvalue = 0;
477 
478  return returnvalue;
479 }
480 
481 //---------------------------------------------------------------------------
483  //
484  // IsSelectedCombinedPID (not used)
485  //
486 
487  if(!fUsePID || !obj) {return 1;}
488 
490  AliAODTrack *part = dd->GetBachelor();
491  if(!part) return 0;
492 
493  Int_t returnvalue=1;
494 
495  return returnvalue;
496 }
497 
498 //________________________________________________________________________
499 Bool_t AliRDHFCutsLctoeleLambdafromAODtracks::SingleTrkCuts(AliAODTrack *trk, AliAODTrack *trkpid, AliAODVertex *primVert)
500 {
501  //
502  // Single Track Cut to be applied before object creation
503  //
504 
505  //if(trk->GetStatus()&AliESDtrack::kITSpureSA) return kFALSE;
506  //if(!(trk->GetStatus()&AliESDtrack::kITSin)) return kFALSE;
507  //if(fProdUseAODFilterBit && !trk->TestFilterMask(BIT(fProdAODFilterBit))) return kFALSE;
508  if(fTrackCuts){
509  if(fProdAODFilterBit==7){
511  fTrackCuts->GetPtRange(ptmin,ptmax);
512  fTrackCuts->GetEtaRange(etamin,etamax);
513  if(trk->Pt()<ptmin || trk->Pt()>ptmax) return kFALSE;
514  if(trk->Eta()<etamin || trk->Eta()>etamax) return kFALSE;
515  }else{
516  Double_t pos[3]; primVert->GetXYZ(pos);
517  Double_t cov[6]; primVert->GetCovarianceMatrix(cov);
518  const AliESDVertex vESD(pos,cov,100.,100);
519  if(!IsDaughterSelected(trk,&vESD,fTrackCuts)) return kFALSE;
520  }
521  }
522 
523  if(trkpid->GetTPCsignalN()<fProdTrackTPCNclsPIDMin) return kFALSE;
524  if(trk->GetTPCNclsF()>0){
525  Float_t tpcratio = (Float_t)trk->GetTPCncls()/(Float_t)trk->GetTPCNclsF();
526  if(tpcratio<fProdTrackTPCNclsRatioMin) return kFALSE;
527  }
528 
530  const TBits sharedMap = trk->GetTPCSharedMap();
531  if((sharedMap.CountBits()) >= 1){
532  return kFALSE;
533  }
534  }
535 
537  Int_t ncls_its = 0;
538  Int_t ncls_its_shared = 0;
539  for(Int_t i=0;i<6;i++){
540  if(trk->HasPointOnITSLayer(i)) ncls_its++;
541  if(trk->HasPointOnITSLayer(i) && trk->HasSharedPointOnITSLayer(i)) ncls_its_shared++;
542  }
543 
544  if(ncls_its>0){
545  Float_t frac_shared = (Float_t)ncls_its_shared/(Float_t)ncls_its;
546  if(frac_shared>fProdITSSharedFractionMax) return kFALSE;
547  }
548  }
549 
551  Float_t chi2 = trk->GetITSchi2();
552  Int_t ncls_its = 0;
553  for(Int_t i=0;i<6;i++){
554  if(trk->HasPointOnITSLayer(i)) ncls_its++;
555  }
556  if(ncls_its>0){
557  Float_t chi2_ncls = chi2/(Float_t) ncls_its;
558  if(chi2_ncls>fProdITSChi2OverNclsMax) return kFALSE;
559  }
560  }
561 
562  if(fUsePID)
563  {
564  if(fPidHF->GetPidResponse()==0x0){
565  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
566  AliInputEventHandler *inputHandler=(AliInputEventHandler*)mgr->GetInputEventHandler();
567  AliPIDResponse *pidResp=inputHandler->GetPIDResponse();
568  fPidHF->SetPidResponse(pidResp);
569  }
570 
571  switch(fPIDStrategy){
572  case kNSigmaCuts:
573  return IsSelectedeID(trkpid);
574  break;
576  return IsSelectedCustomizedeID(trkpid);
577  break;
579  return IsSelectedCustomizedPtDepeID(trk,trkpid);
580  break;
581  case kCombinedCuts:
582  return IsSelectedCombinedeID(trkpid);
583  break;
584  }
585 
586  }
587 
588  return kTRUE;
589 }
590 //________________________________________________________________________
591 Bool_t AliRDHFCutsLctoeleLambdafromAODtracks::SingleTrkCutsNoPID(AliAODTrack *trk, AliAODTrack *trkpid, AliAODVertex *primVert)
592 {
593  //
594  // Single Track Cut to be applied before object creation
595  //
596 
597  //if(trk->GetStatus()&AliESDtrack::kITSpureSA) return kFALSE;
598  //if(!(trk->GetStatus()&AliESDtrack::kITSin)) return kFALSE;
599  //if(fProdUseAODFilterBit && !trk->TestFilterMask(BIT(4))) return kFALSE;
600  if(fTrackCuts){
601  if(fProdAODFilterBit==7){
603  fTrackCuts->GetPtRange(ptmin,ptmax);
604  fTrackCuts->GetEtaRange(etamin,etamax);
605  if(trk->Pt()<ptmin || trk->Pt()>ptmax) return kFALSE;
606  if(trk->Eta()<etamin || trk->Eta()>etamax) return kFALSE;
607  }else{
608  Double_t pos[3]; primVert->GetXYZ(pos);
609  Double_t cov[6]; primVert->GetCovarianceMatrix(cov);
610  const AliESDVertex vESD(pos,cov,100.,100);
611  if(!IsDaughterSelected(trk,&vESD,fTrackCuts)) return kFALSE;
612  }
613  }
614 
615  if(trkpid->GetTPCsignalN()<fProdTrackTPCNclsPIDMin) return kFALSE;
616  if(trk->GetTPCNclsF()>0){
617  Float_t tpcratio = (Float_t)trk->GetTPCncls()/(Float_t)trk->GetTPCNclsF();
618  if(tpcratio<fProdTrackTPCNclsRatioMin) return kFALSE;
619  }
620 
622  const TBits sharedMap = trk->GetTPCSharedMap();
623  if((sharedMap.CountBits()) >= 1){
624  return kFALSE;
625  }
626  }
627 
628  return kTRUE;
629 }
630 //________________________________________________________________________
632 {
633  //
634  // electron ID first shot
635  //
636 
637  Double_t nSigmaPion = fPidHF->GetPidResponse()->NumberOfSigmasTPC(trk,AliPID::kPion);
638  if(fExcludePionTPC){
639  if(TMath::Abs(nSigmaPion)<fExcludenSigmaPionTPC){
640  return kFALSE;
641  }
642  }
643 
644  Double_t nSigmaProton = fPidHF->GetPidResponse()->NumberOfSigmasTPC(trk,AliPID::kProton);
645  if(fExcludeProtonTPC){
646  if(TMath::Abs(nSigmaProton)<fExcludenSigmaProtonTPC){
647  return kFALSE;
648  }
649  }
650 
651  Double_t nSigmaKaon = fPidHF->GetPidResponse()->NumberOfSigmasTPC(trk,AliPID::kKaon);
652  if(fExcludeKaonTPC){
653  if(TMath::Abs(nSigmaKaon)<fExcludenSigmaKaonTPC){
654  return kFALSE;
655  }
656  }
657 
658  Int_t isElectron=fPidHF->MakeRawPid(trk,0);
659  if(isElectron<1) return kFALSE;
660 
661  return kTRUE;
662 }
663 //________________________________________________________________________
665 {
666  //
667  // electron ID first shot
668  //
669 
670  Double_t nSigmaPion = fPidHF->GetPidResponse()->NumberOfSigmasTPC(trk,AliPID::kPion);
671  if(fExcludePionTPC){
672  if(TMath::Abs(nSigmaPion)<fExcludenSigmaPionTPC){
673  return kFALSE;
674  }
675  }
676 
677  Double_t nSigmaProton = fPidHF->GetPidResponse()->NumberOfSigmasTPC(trk,AliPID::kProton);
678  if(fExcludeProtonTPC){
679  if(TMath::Abs(nSigmaProton)<fExcludenSigmaProtonTPC){
680  return kFALSE;
681  }
682  }
683 
684  Double_t nSigmaKaon = fPidHF->GetPidResponse()->NumberOfSigmasTPC(trk,AliPID::kKaon);
685  if(fExcludeKaonTPC){
686  if(TMath::Abs(nSigmaKaon)<fExcludenSigmaKaonTPC){
687  return kFALSE;
688  }
689  }
690 
691  Double_t nSigmaTPCele = fPidHF->GetPidResponse()->NumberOfSigmasTPC(trk,AliPID::kElectron);
692  Double_t nSigmaTOFele = fPidHF->GetPidResponse()->NumberOfSigmasTOF(trk,AliPID::kElectron);
693  Double_t nSigmaITSele = fPidHF->GetPidResponse()->NumberOfSigmasITS(trk,AliPID::kElectron);
694 
695  if(nSigmaTPCele<fSigmaElectronTPCMin) return kFALSE;
696  if(nSigmaTPCele>fSigmaElectronTPCMax) return kFALSE;
697  if(nSigmaTOFele<fSigmaElectronTOFMin) return kFALSE;
698  if(nSigmaTOFele>fSigmaElectronTOFMax) return kFALSE;
699  if(nSigmaITSele<fSigmaElectronITSMin) return kFALSE;
700  if(nSigmaITSele>fSigmaElectronITSMax) return kFALSE;
701 
702  return kTRUE;
703 }
704 //________________________________________________________________________
706 {
707  //
708  // electron ID first shot
709  //
710 
711  Double_t nSigmaPion = fPidHF->GetPidResponse()->NumberOfSigmasTPC(trkpid,AliPID::kPion);
712  if(fExcludePionTPC){
713  if(TMath::Abs(nSigmaPion)<fExcludenSigmaPionTPC){
714  return kFALSE;
715  }
716  }
717 
718  Double_t nSigmaProton = fPidHF->GetPidResponse()->NumberOfSigmasTPC(trkpid,AliPID::kProton);
719  if(fExcludeProtonTPC){
720  if(TMath::Abs(nSigmaProton)<fExcludenSigmaProtonTPC){
721  return kFALSE;
722  }
723  }
724 
725  Double_t nSigmaKaon = fPidHF->GetPidResponse()->NumberOfSigmasTPC(trkpid,AliPID::kKaon);
726  if(fExcludeKaonTPC){
727  if(TMath::Abs(nSigmaKaon)<fExcludenSigmaKaonTPC){
728  return kFALSE;
729  }
730  }
731 
732  Double_t nSigmaTPCele = fPidHF->GetPidResponse()->NumberOfSigmasTPC(trkpid,AliPID::kElectron);
733  Double_t nSigmaTOFele = fPidHF->GetPidResponse()->NumberOfSigmasTOF(trkpid,AliPID::kElectron);
734  Double_t nSigmaITSele = fPidHF->GetPidResponse()->NumberOfSigmasITS(trkpid,AliPID::kElectron);
735 
736  if(fabs(fSigmaElectronTOFMin)<999.|| fabs(fSigmaElectronTOFMax)<999.)
737  {
738  if(nSigmaTOFele<fSigmaElectronTOFMin) return kFALSE;
739  if(nSigmaTOFele>fSigmaElectronTOFMax) return kFALSE;
740  }
741 
742  if(fabs(fSigmaElectronITSMin)<999.|| fabs(fSigmaElectronITSMax)<999.)
743  {
744  if(nSigmaITSele<fSigmaElectronITSMin) return kFALSE;
745  if(nSigmaITSele>fSigmaElectronITSMax) return kFALSE;
746  }
747 
748  Double_t pte = trk->Pt();
751  if(nSigmaTPCele<nsigmamin) return kFALSE;
752  if(nSigmaTPCele>fSigmaElectronTPCMax) return kFALSE;
753 
754  return kTRUE;
755 }
756 //________________________________________________________________________
758 {
759  //
760  // electron ID Basyian not implemented
761  //
762 
763  return kTRUE;
764 }
765 
766 //________________________________________________________________________
767 Bool_t AliRDHFCutsLctoeleLambdafromAODtracks::SingleV0Cuts(AliAODv0 *v0, AliAODVertex *primVert)
768 {
769  //
770  // Single V0 Cut to be applied before object creation
771  //
772 
773  Bool_t onFlyV0 = v0->GetOnFlyStatus(); // on-the-flight V0s
774  if ( onFlyV0 && !fUseOnTheFlyV0 ) return kFALSE;
775  if ( !onFlyV0 && fUseOnTheFlyV0 ) return kFALSE;
776  if(!v0) return kFALSE;
777  if(!(v0->GetSecondaryVtx())) return kFALSE;
778 
779  AliAODTrack *cptrack = (AliAODTrack*)(v0->GetDaughter(0));
780  AliAODTrack *cntrack = (AliAODTrack*)(v0->GetDaughter(1));
781  if(!cptrack || !cntrack) return kFALSE;
782 // if(cptrack->Charge()<0 && cntrack->Charge()>0){
783 // //In case sign is wrong
784 // cptrack = (AliAODTrack*)(v0->GetDaughter(1));
785 // cntrack = (AliAODTrack*)(v0->GetDaughter(0));
786 // }
787 
788  if ( cptrack->Charge() == cntrack->Charge() ) return kFALSE;
789  if(!(cptrack->GetStatus() & AliESDtrack::kTPCrefit) ||
790  !(cntrack->GetStatus() & AliESDtrack::kTPCrefit)) return kFALSE;
791  AliAODVertex *maybeKinkPos = (AliAODVertex*)cptrack->GetProdVertex();
792  AliAODVertex *maybeKinkNeg = (AliAODVertex*)cntrack->GetProdVertex();
793  if (fProdV0KinkRejection && (maybeKinkPos->GetType()==AliAODVertex::kKink || maybeKinkNeg->GetType()==AliAODVertex::kKink))
794  return kFALSE;
795 
796  if ( ( ( cptrack->GetTPCClusterInfo(2,1) ) < (Float_t)fProdV0DaughterTPCClusterMin ) ||
797  ( ( cntrack->GetTPCClusterInfo(2,1) ) < (Float_t)fProdV0DaughterTPCClusterMin) ) return kFALSE;
798 
799 
800  if((cptrack->GetTPCNclsF()>0)&&(cptrack->GetTPCClusterInfo(2,1)/cptrack->GetTPCNclsF()<fProdV0DaughterTPCCrossRatioMin)) return kFALSE;
801  if((cntrack->GetTPCNclsF()>0)&&(cntrack->GetTPCClusterInfo(2,1)/cntrack->GetTPCNclsF()<fProdV0DaughterTPCCrossRatioMin)) return kFALSE;
802 
803  Double_t massLambda = v0->MassLambda();
804  Double_t massAntiLambda = v0->MassAntiLambda();
805  Double_t mlamPDG = TDatabasePDG::Instance()->GetParticle(3122)->Mass();
806  Double_t mk0sPDG = TDatabasePDG::Instance()->GetParticle(310)->Mass();
807  if(!(fabs(massAntiLambda-mlamPDG)<fProdV0MassTolLambdaRough) && !(fabs(massLambda-mlamPDG)<fProdV0MassTolLambdaRough)) return kFALSE;
808 
809  Double_t massK0s = v0->MassK0Short();
810  if(TMath::Abs(massK0s-mk0sPDG)<fProdMassRejK0s)
811  return kFALSE;
812 
813  Bool_t isparticle = kTRUE;
814  if(TMath::Abs(massAntiLambda-mlamPDG)<fProdV0MassTolLambdaRough) isparticle = kFALSE;
815 
816 
817  if(TMath::Abs(v0->DcaV0Daughters())>fProdV0DcaDaughtersMax) return kFALSE;
818  Double_t posVtx[3] = {0.,0.,0.};
819  primVert->GetXYZ(posVtx);
820  Double_t cospav0 = v0->CosPointingAngle(posVtx);
821  if(cospav0<fProdV0CosPointingAngleToPrimVtxMin) return kFALSE;
822  if(v0->Pt()<fProdV0PtMin) return kFALSE;
823  if(v0->Pt()>fProdV0PtMax) return kFALSE;
824  if(fabs(cptrack->Eta())>fProdV0DaughterEtaRange) return kFALSE;
825  if(fabs(cntrack->Eta())>fProdV0DaughterEtaRange) return kFALSE;
826  if(cptrack->Pt()<fProdV0DaughterPtMin) return kFALSE;
827  if(cntrack->Pt()<fProdV0DaughterPtMin) return kFALSE;
828 
829  Double_t lDcaV0ToPrimVertex = v0->DcaV0ToPrimVertex();
830  Double_t lDcaPosToPrimVertex = v0->DcaPosToPrimVertex();
831  Double_t lDcaNegToPrimVertex = v0->DcaNegToPrimVertex();
832  if(lDcaV0ToPrimVertex < fProdDcaV0ToPrimVertexMin) return kFALSE;
833  if(lDcaV0ToPrimVertex > fProdDcaV0ToPrimVertexMax) return kFALSE;
834  if(isparticle){
835  if(lDcaPosToPrimVertex < fProdDcaV0PrToPrimVertexMin) return kFALSE;
836  if(lDcaNegToPrimVertex < fProdDcaV0PiToPrimVertexMin) return kFALSE;
837  }else{
838  if(lDcaPosToPrimVertex < fProdDcaV0PiToPrimVertexMin) return kFALSE;
839  if(lDcaNegToPrimVertex < fProdDcaV0PrToPrimVertexMin) return kFALSE;
840  }
841  Double_t lPosV0[3];
842  lPosV0[0] = v0->DecayVertexV0X();
843  lPosV0[1] = v0->DecayVertexV0Y();
844  lPosV0[2] = v0->DecayVertexV0Z();
845  Double_t decayvertV0 = TMath::Sqrt(lPosV0[0]*lPosV0[0]+lPosV0[1]*lPosV0[1]);
846 
847  if(decayvertV0<fProdRfidMinV0 || decayvertV0>fProdRfidMaxV0) return kFALSE;
848 
849  Double_t ptotlam = TMath::Sqrt(pow(v0->Px(),2)+pow(v0->Py(),2)+pow(v0->Pz(),2));
850  Double_t properdl = v0->DecayLengthV0(posVtx)*mlamPDG/ptotlam;
851  if(properdl>fProdV0ProperDecayLengthMax) return kFALSE;
852 
853 
854  if(fUseLambdaPID)
855  {
856  if(fPidObjProton->GetPidResponse()==0x0){
857  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
858  AliInputEventHandler *inputHandler=(AliInputEventHandler*)mgr->GetInputEventHandler();
859  AliPIDResponse *pidResp=inputHandler->GetPIDResponse();
860  fPidObjProton->SetPidResponse(pidResp);
861  }
862  if(fPidObjPion->GetPidResponse()==0x0){
863  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
864  AliInputEventHandler *inputHandler=(AliInputEventHandler*)mgr->GetInputEventHandler();
865  AliPIDResponse *pidResp=inputHandler->GetPIDResponse();
866  fPidObjPion->SetPidResponse(pidResp);
867  }
868 
869  Int_t isProton= 1;
870  Int_t isPion= 1;
871  Double_t nsigmatpc_proton = fPidObjProton->GetSigma(0);
872  Double_t nsigmatpc_pion = fPidObjPion->GetSigma(0);
873  Double_t nsigmatof_proton = fPidObjProton->GetSigma(3);
874  Double_t nsigmatof_pion = fPidObjPion->GetSigma(3);
875 
876  if(isparticle){
877  Double_t nSigmaTPCpr = fPidObjProton->GetPidResponse()->NumberOfSigmasTPC(cptrack,AliPID::kProton);
878  Double_t nSigmaTPCpi = fPidObjPion->GetPidResponse()->NumberOfSigmasTPC(cntrack,AliPID::kPion);
879  Double_t nSigmaTOFpr = fPidObjProton->GetPidResponse()->NumberOfSigmasTOF(cptrack,AliPID::kProton);
880  Double_t nSigmaTOFpi = fPidObjPion->GetPidResponse()->NumberOfSigmasTOF(cntrack,AliPID::kPion);
881  if(fabs(nSigmaTPCpr)>nsigmatpc_proton) isProton = 0;
882  if(fabs(nSigmaTPCpi)>nsigmatpc_pion) isPion = 0;
883  if(nsigmatof_proton>0.01 && nsigmatof_proton<999.){
884  if(nSigmaTOFpr>-998 && fabs(nSigmaTOFpr)>nsigmatof_proton) isProton = 0; // OR approach
885  }
886  if(nsigmatof_pion>0.01 && nsigmatof_pion<999.){
887  if(nSigmaTOFpi>-998 && fabs(nSigmaTOFpi)>nsigmatof_pion) isPion = 0; // OR approach
888  }
889  }else{
890  Double_t nSigmaTPCpr = fPidObjProton->GetPidResponse()->NumberOfSigmasTPC(cntrack,AliPID::kProton);
891  Double_t nSigmaTPCpi = fPidObjPion->GetPidResponse()->NumberOfSigmasTPC(cptrack,AliPID::kPion);
892  Double_t nSigmaTOFpr = fPidObjProton->GetPidResponse()->NumberOfSigmasTOF(cntrack,AliPID::kProton);
893  Double_t nSigmaTOFpi = fPidObjPion->GetPidResponse()->NumberOfSigmasTOF(cptrack,AliPID::kPion);
894  if(fabs(nSigmaTPCpr)>nsigmatpc_proton) isProton = 0;
895  if(fabs(nSigmaTPCpi)>nsigmatpc_pion) isPion = 0;
896  if(nsigmatof_proton>0.01 && nsigmatof_proton<999.){
897  if(nSigmaTOFpr>-998 && fabs(nSigmaTOFpr)>nsigmatof_proton) isProton = 0; // OR approach
898  }
899  if(nsigmatof_pion>0.01 && nsigmatof_pion<999.){
900  if(nSigmaTOFpi>-998 && fabs(nSigmaTOFpi)>nsigmatof_pion) isPion = 0; // OR approach
901  }
902  }
903  if(isProton<1) return kFALSE;
904  if(isPion<1) return kFALSE;
905  }
906 
907  Double_t RapLambda = v0->RapLambda();
908  if(RapLambda<fProdV0RapMin || RapLambda>fProdV0RapMax) return kFALSE;
909 
910  Double_t EtaLambda = v0->PseudoRapV0();
911  if(EtaLambda<fProdV0EtaMin || EtaLambda>fProdV0EtaMax) return kFALSE;
912 
914  const TBits sharedMap1 = cptrack->GetTPCSharedMap();
915  const TBits sharedMap2 = cntrack->GetTPCSharedMap();
916  if((sharedMap1.CountBits() >= 1) ||
917  (sharedMap2.CountBits() >= 1))
918  {
919  return kFALSE;
920  }
921  }
922 
923  if(fUseV0Topology>0){
924  Double_t dphiprlam = 0.;
925  if(isparticle){
926  TVector3 v3v0pr(v0->MomPosX(),v0->MomPosY(),v0->MomPosZ());
927  TVector3 v3lam(v0->Px(),v0->Py(),v0->Pz());
928  dphiprlam = v3v0pr.DeltaPhi(v3lam);
929  }else{
930  TVector3 v3v0pr(v0->MomNegX(),v0->MomNegY(),v0->MomNegZ());
931  TVector3 v3lam(v0->Px(),v0->Py(),v0->Pz());
932  dphiprlam = -1.*v3v0pr.DeltaPhi(v3lam);
933  }
934  if(fUseV0Topology==1){
935  if(dphiprlam>0) return kFALSE;
936  }else if(fUseV0Topology==2){
937  if(dphiprlam<0) return kFALSE;
938  }
939  }
940 
941  return kTRUE;
942 }
943 
944 //________________________________________________________________________
946 {
947  //
948  // Mass and pT Cut to be applied before object creation
949  // Not used now
950  //
951  if(!v0) return kFALSE;
952  if(!part) return kFALSE;
953 
954  return kTRUE;
955 
956 }
957 
958 //________________________________________________________________________
960 {
961  Double_t mLPDG = TDatabasePDG::Instance()->GetParticle(3122)->Mass();
962  Double_t massL = v0->MassLambda();
963  if(TMath::Abs(massL-mLPDG)>fProdV0MassTolLambdaRough)
964  massL = v0->MassAntiLambda();
965 
966  if(TMath::Abs(massL-mLPDG)<fProdV0MassTolLambda)
967  return kTRUE;
968  return kFALSE;
969 }
970 
971 //________________________________________________________________________
973 {
974  Double_t mLPDG = TDatabasePDG::Instance()->GetParticle(3122)->Mass();
975  Double_t massL = v0->M();
976  if(TMath::Abs(massL-mLPDG)<fProdV0MassTolLambda)
977  return kTRUE;
978  return kFALSE;
979 }
980 
981 //________________________________________________________________________
983 {
984  Double_t mLPDG = TDatabasePDG::Instance()->GetParticle(3122)->Mass();
985  Double_t massL = v0->MassLambda();
986  if(TMath::Abs(massL-mLPDG)>fProdV0MassTolLambdaRough)
987  massL = v0->MassAntiLambda();
988 
989  Bool_t issideband = kFALSE;
990  if((massL-mLPDG)>fProdV0MassTolLambdaRough-fProdV0MassTolLambda) issideband = kTRUE;
991  if((massL-mLPDG)<-fProdV0MassTolLambdaRough+fProdV0MassTolLambda) issideband = kTRUE;
992  return issideband;
993 }
994 
995 //________________________________________________________________________
997 {
998  Double_t mLPDG = TDatabasePDG::Instance()->GetParticle(3122)->Mass();
999  Double_t massL = v0->M();
1000  Bool_t issideband = kFALSE;
1001  if((massL-mLPDG)>fProdV0MassTolLambdaRough-fProdV0MassTolLambda) issideband = kTRUE;
1002  if((massL-mLPDG)<-fProdV0MassTolLambdaRough+fProdV0MassTolLambda) issideband = kTRUE;
1003  return issideband;
1004 }
1005 
1006 //________________________________________________________________________
1008 {
1009  //
1010  // Tag conversion electron tracks
1011  //
1012  if(fConversionMassMax<0.) return kFALSE;
1013 
1014  Bool_t isconv = kFALSE;
1015  minmass = 9999.;
1016  Int_t trkid = etrk->GetID();
1017 
1018  Double_t px1 = etrk->Px();
1019  Double_t py1 = etrk->Py();
1020  Double_t pz1 = etrk->Pz();
1021  Double_t E1 = sqrt(px1*px1+py1*py1+pz1*pz1+0.000511*0.000511);
1022 
1023  for(Int_t it=0;it<ntrk;it++){
1024  AliAODTrack *trk2 = (AliAODTrack*) evt->GetTrack(it);
1025  if(!trk2) continue;
1026  Int_t trkid2 = trk2->GetID();
1027  if(abs(trkid)==abs(trkid2)) continue;
1028  if(etrk->Charge()*trk2->Charge()>0) continue;
1029  if(fProdAODFilterBit==7){
1030  if(!trk2->TestFilterBit(BIT(fProdAODFilterBit))) continue;
1031  }else{
1032  if(!trk2->TestFilterMask(BIT(fProdAODFilterBit))) continue;
1033  }
1034 
1035  Double_t nSigmaTPCele = 9999.;
1036  Double_t nSigmaITSele = 9999.;
1037  if(fProdAODFilterBit==7){
1038  if(-trkid2-1>=19000) continue;
1039  if(-trkid2-1<0) continue;
1040  Int_t index = id2index[-trkid2-1];
1041  AliAODTrack *partpid = (AliAODTrack*)evt->GetTrack(index);
1042  nSigmaTPCele = fPidHF->GetPidResponse()->NumberOfSigmasTPC(partpid,AliPID::kElectron);
1043  nSigmaITSele = fPidHF->GetPidResponse()->NumberOfSigmasITS(partpid,AliPID::kElectron);
1044  }else{
1045  nSigmaTPCele = fPidHF->GetPidResponse()->NumberOfSigmasTPC(trk2,AliPID::kElectron);
1046  nSigmaITSele = fPidHF->GetPidResponse()->NumberOfSigmasITS(trk2,AliPID::kElectron);
1047  }
1048  if(fabs(nSigmaTPCele)>5.) continue;
1049 
1051  Double_t pte = trk2->Pt();
1054  if(nSigmaTPCele<nsigmamin) continue;
1055  if(nSigmaTPCele<-3.) continue;
1056  if(nSigmaTPCele>fSigmaElectronTPCMax) continue;
1057  //if(nSigmaITSele<fSigmaElectronITSMin) continue;
1058  //if(nSigmaITSele>fSigmaElectronITSMax) continue;
1059  if(nSigmaITSele<-2.) continue;
1060  if(nSigmaITSele>2.) continue;
1061  }
1062 
1063  Double_t px2 = trk2->Px();
1064  Double_t py2 = trk2->Py();
1065  Double_t pz2 = trk2->Pz();
1066  Double_t E2 = sqrt(px2*px2+py2*py2+pz2*pz2+0.000511*0.000511);
1067 
1068  Double_t mass = sqrt(pow(E1+E2,2)-pow(px1+px2,2)-pow(py1+py2,2)-pow(pz1+pz2,2));
1069  //Double_t mass = CalculatePhotonMass(etrk,trk2);
1070  if(mass<minmass) minmass = mass;
1071  }
1072 
1073  if(minmass<fConversionMassMax) isconv = kTRUE;
1074 
1075  return isconv;
1076 }
1077 
1078 //________________________________________________________________________
1080 {
1081  //
1082  // Tag conversion electron tracks
1083  //
1084  if(fConversionMassMax<0.) return kFALSE;
1085 
1086  Bool_t isconv = kFALSE;
1087  minmass = 9999.;
1088 
1089  Int_t trkid = etrk->GetID();
1090  Double_t px1 = etrk->Px();
1091  Double_t py1 = etrk->Py();
1092  Double_t pz1 = etrk->Pz();
1093  Double_t E1 = sqrt(px1*px1+py1*py1+pz1*pz1+0.000511*0.000511);
1094 
1095  for(Int_t it=0;it<ntrk;it++){
1096  AliAODTrack *trk2 = (AliAODTrack*) evt->GetTrack(it);
1097  if(!trk2) continue;
1098  Int_t trkid2 = trk2->GetID();
1099  if(abs(trkid)==abs(trkid2)) continue;
1100  if(etrk->Charge()*trk2->Charge()<0) continue;
1101  if(fProdAODFilterBit==7){
1102  if(!trk2->TestFilterBit(BIT(fProdAODFilterBit))) continue;
1103  }else{
1104  if(!trk2->TestFilterMask(BIT(fProdAODFilterBit))) continue;
1105  }
1106 
1107  Double_t nSigmaTPCele = 9999.;
1108  Double_t nSigmaITSele = 9999.;
1109  if(fProdAODFilterBit==7){
1110  if(-trkid2-1>=19000) continue;
1111  if(-trkid2-1<0) continue;
1112  Int_t index = id2index[-trkid2-1];
1113  AliAODTrack *partpid = (AliAODTrack*)evt->GetTrack(index);
1114  nSigmaTPCele = fPidHF->GetPidResponse()->NumberOfSigmasTPC(partpid,AliPID::kElectron);
1115  nSigmaITSele = fPidHF->GetPidResponse()->NumberOfSigmasITS(partpid,AliPID::kElectron);
1116  }else{
1117  nSigmaTPCele = fPidHF->GetPidResponse()->NumberOfSigmasTPC(trk2,AliPID::kElectron);
1118  nSigmaITSele = fPidHF->GetPidResponse()->NumberOfSigmasITS(trk2,AliPID::kElectron);
1119  }
1120  if(fabs(nSigmaTPCele)>5.) continue;
1121 
1123  Double_t pte = trk2->Pt();
1126  if(nSigmaTPCele<nsigmamin) continue;
1127  if(nSigmaTPCele<-3.) continue;
1128  if(nSigmaTPCele>fSigmaElectronTPCMax) continue;
1129  //if(nSigmaITSele<fSigmaElectronITSMin) continue;
1130  //if(nSigmaITSele>fSigmaElectronITSMax) continue;
1131  if(nSigmaITSele<-2.) continue;
1132  if(nSigmaITSele>2.) continue;
1133  }
1134 
1135  Double_t px2 = trk2->Px();
1136  Double_t py2 = trk2->Py();
1137  Double_t pz2 = trk2->Pz();
1138  Double_t E2 = sqrt(px2*px2+py2*py2+pz2*pz2+0.000511*0.000511);
1139 
1140  Double_t mass = sqrt(pow(E1+E2,2)-pow(px1+px2,2)-pow(py1+py2,2)-pow(pz1+pz2,2));
1141  if(mass<minmass) minmass = mass;
1142  }
1143 
1144  if(minmass<fConversionMassMax) isconv = kTRUE;
1145 
1146  return isconv;
1147 }
1148 
1149 //________________________________________________________________________
1150 void AliRDHFCutsLctoeleLambdafromAODtracks::SetSftPosR125(AliAODTrack *track,Double_t bfield,Double_t priVtx[3],Double_t *XSftR125)
1151 {
1152  //
1153  // Sets the spatial position of the track at the radius R=1.25m in the shifted coordinate system
1154  //
1155 
1156  // Initialize the array to something indicating there was no propagation
1157  XSftR125[0]=-9999.;
1158  XSftR125[1]=-9999.;
1159  XSftR125[2]=-9999.;
1160  // Make a copy of the track to not change parameters of the track
1161  AliExternalTrackParam etp;
1162  etp.CopyFromVTrack(track);
1163 
1164  // The global position of the the track
1165  Double_t xyz[3]={-9999.,-9999.,-9999.};
1166 
1167  // The radius we want to propagate to, squared
1168  const Float_t RSquaredWanted(125.*125.);
1169 
1170 
1171  // Propagation is done in local x of the track
1172  for (Float_t x = 58.;x<247.;x+=1.){
1173  // Starts at 83 / Sqrt(2) and goes outwards. 85/Sqrt(2) is the smallest local x
1174  // for global radius 85 cm. x = 245 is the outer radial limit of the TPC when
1175  // the track is straight, i.e. has inifinite pt and doesn't get bent.
1176  // If the track's momentum is smaller than infinite, it will develop a y-component,
1177  // which adds to the global radius
1178  // We don't change the propagation steps to not mess up things!
1179 
1180  // Stop if the propagation was not succesful. This can happen for low pt tracks
1181  // that don't reach outer radii
1182  if(!etp.PropagateTo(x,(Float_t)bfield))break;
1183  etp.GetXYZ(xyz); // GetXYZ returns global coordinates
1184 
1185  // Calculate the shifted radius we are at, squared.
1186  // Compare squared radii for faster code
1187  Float_t shiftedRadiusSquared = (xyz[0]-priVtx[0])*(xyz[0]-priVtx[0])
1188  + (xyz[1]-priVtx[1])*(xyz[1]-priVtx[1]);
1189 
1190  // Roughly reached the radius we want
1191  if(shiftedRadiusSquared > RSquaredWanted){
1192 
1193  // Bigger loop has bad precision, we're nearly one centimeter too far,
1194  // go back in small steps.
1195  while (shiftedRadiusSquared>RSquaredWanted){
1196  // Propagate a mm inwards
1197  x-=.1;
1198  if(!etp.PropagateTo(x,bfield)){
1199  // Propagation failed but we're already with a
1200  // cm precision at R=1.25m so we only break the
1201  // inner loop
1202  break;
1203  }
1204  // Get the global position
1205  etp.GetXYZ(xyz);
1206  // Calculate shifted radius, squared
1207  shiftedRadiusSquared = (xyz[0]-priVtx[0])*(xyz[0]-priVtx[0])
1208  + (xyz[1]-priVtx[1])*(xyz[1]-priVtx[1]);
1209  }
1210  // We reached R=1.25m with a precission of a cm to a mm,
1211  // set the spatial position
1212  XSftR125[0]=xyz[0]-priVtx[0];
1213  XSftR125[1]=xyz[1]-priVtx[1];
1214  XSftR125[2]=xyz[2]-priVtx[2];
1215  // Done
1216  return;
1217  } // End of if roughly reached radius
1218  } // End of coarse propagation loop
1219 }
1220 
1221 //________________________________________________________________________
1222 void AliRDHFCutsLctoeleLambdafromAODtracks::SetSftPosR(AliAODTrack *track,Double_t bfield,Double_t R, Double_t priVtx[3],Double_t *XSftR)
1223 {
1224  //
1225  // Sets the spatial position of the track at the radius R in the shifted coordinate system
1226  //
1227 
1228  // Initialize the array to something indicating there was no propagation
1229  XSftR[0]=-9999.;
1230  XSftR[1]=-9999.;
1231  XSftR[2]=-9999.;
1232  if(R<3.5) return;
1233 
1234  // Make a copy of the track to not change parameters of the track
1235  AliExternalTrackParam etp;
1236  etp.CopyFromVTrack(track);
1237 
1238  // The global position of the the track
1239  Double_t xyz[3]={-9999.,-9999.,-9999.};
1240 
1241  // The radius we want to propagate to, squared
1242  const Float_t RSquaredWanted(R*R);
1243 
1244 
1245  // Propagation is done in local x of the track
1246  for (Float_t x = 2.;x<247.;x+=1.){
1247  // Starts at 83 / Sqrt(2) and goes outwards. 85/Sqrt(2) is the smallest local x
1248  // for global radius 85 cm. x = 245 is the outer radial limit of the TPC when
1249  // the track is straight, i.e. has inifinite pt and doesn't get bent.
1250  // If the track's momentum is smaller than infinite, it will develop a y-component,
1251  // which adds to the global radius
1252  // We don't change the propagation steps to not mess up things!
1253 
1254  // Stop if the propagation was not succesful. This can happen for low pt tracks
1255  // that don't reach outer radii
1256  if(!etp.PropagateTo(x,(Float_t)bfield))break;
1257  etp.GetXYZ(xyz); // GetXYZ returns global coordinates
1258 
1259  // Calculate the shifted radius we are at, squared.
1260  // Compare squared radii for faster code
1261  Float_t shiftedRadiusSquared = (xyz[0]-priVtx[0])*(xyz[0]-priVtx[0])
1262  + (xyz[1]-priVtx[1])*(xyz[1]-priVtx[1]);
1263 
1264  // Roughly reached the radius we want
1265  if(shiftedRadiusSquared > RSquaredWanted){
1266 
1267  // Bigger loop has bad precision, we're nearly one centimeter too far,
1268  // go back in small steps.
1269  while (shiftedRadiusSquared>RSquaredWanted){
1270  // Propagate a mm inwards
1271  x-=.1;
1272  if(!etp.PropagateTo(x,bfield)){
1273  // Propagation failed but we're already with a
1274  // cm precision at R=1.25m so we only break the
1275  // inner loop
1276  break;
1277  }
1278  // Get the global position
1279  etp.GetXYZ(xyz);
1280  // Calculate shifted radius, squared
1281  shiftedRadiusSquared = (xyz[0]-priVtx[0])*(xyz[0]-priVtx[0])
1282  + (xyz[1]-priVtx[1])*(xyz[1]-priVtx[1]);
1283  }
1284  // We reached R=1.25m with a precission of a cm to a mm,
1285  // set the spatial position
1286  XSftR[0]=xyz[0]-priVtx[0];
1287  XSftR[1]=xyz[1]-priVtx[1];
1288  XSftR[2]=xyz[2]-priVtx[2];
1289  // Done
1290  return;
1291  } // End of if roughly reached radius
1292  } // End of coarse propagation loop
1293 }
1294 
1295 //________________________________________________________________________
1297 {
1298  //
1299  // Returns the pseudorapidity star difference
1300  //
1301 
1302  // It is important to keep the calculations easy and separated.
1303  // The calculation of EtaS is straight forward, one just has to
1304  // do it step by step to not get confused.
1305  Double_t ThetaS1 = TMath::Pi()/2. - TMath::ATan(postrack1[2]/125.);
1306  Double_t ThetaS2 = TMath::Pi()/2. - TMath::ATan(postrack2[2]/125.);
1307  Double_t EtaS1 = -TMath::Log( TMath::Tan(ThetaS1/2.) );
1308  Double_t EtaS2 = -TMath::Log( TMath::Tan(ThetaS2/2.) );
1309 
1310  return EtaS1-EtaS2;
1311 }
1312 
1313 //________________________________________________________________________
1315 {
1316  //
1317  // returns delta phi star at R=1.25m
1318  // position5 at R=1.2m is stored as second radius
1319  //
1320  //
1321  Double_t distSft= TMath::Sqrt(TMath::Power(postrack1[0] - postrack2[0],2)
1322  +TMath::Power(postrack1[1] - postrack2[1],2));
1323  return 2.0 * TMath::ATan(distSft/2./(125.));
1324 }
1325 
1326 //________________________________________________________________________
1327 void AliRDHFCutsLctoeleLambdafromAODtracks::GetdPhiSdEtaSR125(AliAODTrack *tracke, AliAODTrack *trackp,
1328  AliAODTrack *trackn, Double_t bfield, Double_t priVtx[3], Double_t &dPhiS_ep, Double_t &dEtaS_ep,
1329  Double_t &dPhiS_en, Double_t &dEtaS_en)
1330 {
1331  //
1332  // Returns dPhi and dEta at R 125
1333  //
1334  Double_t XSftR125_e[3];
1335  SetSftPosR125(tracke,bfield,priVtx, XSftR125_e);
1336  Double_t XSftR125_p[3];
1337  SetSftPosR125(trackp,bfield,priVtx, XSftR125_p);
1338  Double_t XSftR125_n[3];
1339  SetSftPosR125(trackn,bfield,priVtx, XSftR125_n);
1340  dPhiS_ep = dPhiSR125(XSftR125_e,XSftR125_p);
1341  dEtaS_ep = dEtaSR125(XSftR125_e,XSftR125_p);
1342  dPhiS_en = dPhiSR125(XSftR125_e,XSftR125_n);
1343  dEtaS_en = dEtaSR125(XSftR125_e,XSftR125_n);
1344 }
1345 
1346 //---------------------------------------------------------------------------
1347 Int_t AliRDHFCutsLctoeleLambdafromAODtracks::IsSelected(TLorentzVector* vtrk, TLorentzVector *vv0, Double_t *cutvars, Int_t selectionLevel)
1348 {
1349  //
1350  // Apply selection on mixed event tracks
1351  //
1352 
1353  if (!fCutsRD) {
1354  AliFatal("Cut matrix not inizialized. Exit...");
1355  return 0;
1356  }
1357 
1358  Double_t ptD=sqrt(pow(vtrk->Px()+vv0->Px(),2)+pow(vtrk->Px()+vv0->Py(),2));
1359  if(ptD<fMinPtCand) return 0;
1360  if(ptD>fMaxPtCand) return 0;
1361 
1362  Double_t pt=ptD;
1363  Int_t ptbin=PtBin(pt);
1364  if (ptbin==-1) {
1365  return 0;
1366  }
1367 
1368  if (selectionLevel==AliRDHFCuts::kAll ||
1369  selectionLevel==AliRDHFCuts::kTracks) {
1370  //Performed in production stage
1371  }
1372 
1373  Int_t returnvalueCuts=1;
1374  // selection on candidate
1375  if (selectionLevel==AliRDHFCuts::kAll ||
1376  selectionLevel==AliRDHFCuts::kCandidate) {
1377 
1378  Bool_t okcand=kTRUE;
1379 
1380  Double_t mlcPDG = TDatabasePDG::Instance()->GetParticle(4122)->Mass();
1381  Double_t melePDG = TDatabasePDG::Instance()->GetParticle(11)->Mass();
1382  Double_t mlamPDG = TDatabasePDG::Instance()->GetParticle(3122)->Mass();
1383  Double_t v0px = vv0->Px();
1384  Double_t v0py = vv0->Py();
1385  Double_t v0pz = vv0->Pz();
1386  Double_t epx = vtrk->Px();
1387  Double_t epy = vtrk->Py();
1388  Double_t epz = vtrk->Pz();
1389  Double_t cosoa = (v0px*epx+v0py*epy+v0pz*epz)/sqrt(v0px*v0px+v0py*v0py+v0pz*v0pz)/sqrt(epx*epx+epy*epy+epz*epz);
1390 
1391  TLorentzVector vele, vlam,vlc;
1392  vele.SetXYZM(epx,epy,epz,melePDG);
1393  vlam.SetXYZM(v0px,v0py,v0pz,mlamPDG);
1394  vlc = vele + vlam;
1395 
1396  Double_t dphis_e_pr = 9999.;
1397  Double_t detas_e_pr = 9999.;
1398  Double_t dphis_e_pi = 9999.;
1399  Double_t detas_e_pi = 9999.;
1400  if(fCutsRD[GetGlobalIndex(2,ptbin)]>0 || fCutsRD[GetGlobalIndex(3,ptbin)]>0){
1401  Double_t xyzR125_e[3], xyzR125_pr[3], xyzR125_pi[3];
1402  xyzR125_e[0] = cutvars[0];
1403  xyzR125_e[1] = cutvars[1];
1404  xyzR125_e[2] = cutvars[2];
1405  xyzR125_pr[0] = cutvars[3];
1406  xyzR125_pr[1] = cutvars[4];
1407  xyzR125_pr[2] = cutvars[5];
1408  xyzR125_pi[0] = cutvars[6];
1409  xyzR125_pi[1] = cutvars[7];
1410  xyzR125_pi[2] = cutvars[8];
1411  dphis_e_pr = dPhiSR125(xyzR125_e,xyzR125_pr);
1412  detas_e_pr = dPhiSR125(xyzR125_e,xyzR125_pr);
1413  dphis_e_pi = dPhiSR125(xyzR125_e,xyzR125_pi);
1414  detas_e_pi = dPhiSR125(xyzR125_e,xyzR125_pi);
1415  }
1416 
1417  if(vlc.M() > fCutsRD[GetGlobalIndex(0,ptbin)])
1418  {
1419  okcand = kFALSE;
1420  }
1421  if(cosoa < fCutsRD[GetGlobalIndex(1,ptbin)])
1422  {
1423  okcand = kFALSE;
1424  }
1425  if(fabs(dphis_e_pr) < fCutsRD[GetGlobalIndex(2,ptbin)] && fabs(detas_e_pr) < fCutsRD[GetGlobalIndex(3,ptbin)])
1426  {
1427  okcand = kFALSE;
1428  }
1429  if(fabs(dphis_e_pi) < fCutsRD[GetGlobalIndex(2,ptbin)] && fabs(detas_e_pi) < fCutsRD[GetGlobalIndex(3,ptbin)])
1430  {
1431  okcand = kFALSE;
1432  }
1433 
1434  if(!okcand) return 0;
1435  returnvalueCuts = 1;
1436  }
1437 
1438  Int_t returnvaluePID=1;
1439  if(selectionLevel==AliRDHFCuts::kAll ||
1440  selectionLevel==AliRDHFCuts::kCandidate||
1441  selectionLevel==AliRDHFCuts::kPID) {
1442  }
1443 
1444  Int_t returnvalue = 0;
1445  if(returnvalueCuts==1 && returnvaluePID==1) returnvalue=1;
1446 
1447  return returnvalue;
1448 }
1449 //---------------------------------------------------------------------------
1451 {
1452  //
1453  // Calculate invariant mass of two tracks at the points where they are parallel
1454  //
1455  Double_t pol = 1.;
1456  if(fBzkG<0.) pol = -1.;
1457 
1458  Double_t xyz[3];
1459 
1460  Double_t mass = 9999.;
1461 
1462  Double_t Rcurv1 = trk1->Pt()/0.3/(0.1*fabs(fBzkG))*100.;
1463  Double_t charge1 = (Double_t) trk1->Charge();
1464  Double_t ux1 = trk1->Px()/trk1->Pt();
1465  Double_t uy1 = trk1->Py()/trk1->Pt();
1466  trk1->GetXYZ(xyz);
1467  Double_t x1 = xyz[0];
1468  Double_t y1 = xyz[1];
1469  Double_t xc1 = x1 + charge1*Rcurv1*(uy1)*pol;
1470  Double_t yc1 = y1 + charge1*Rcurv1*(-1.*ux1)*pol;
1471 
1472  Double_t Rcurv2 = trk2->Pt()/0.3/(0.1*fabs(fBzkG))*100.;
1473  Double_t charge2 = (Double_t) trk2->Charge();
1474  Double_t ux2 = trk2->Px()/trk2->Pt();
1475  Double_t uy2 = trk2->Py()/trk2->Pt();
1476  trk2->GetXYZ(xyz);
1477  Double_t x2 = xyz[0];
1478  Double_t y2 = xyz[1];
1479  Double_t xc2 = x2 + charge2*Rcurv2*(uy2)*pol;
1480  Double_t yc2 = y2 + charge2*Rcurv2*(-1.*ux2)*pol;
1481 
1482  if(fabs(sqrt((xc2-xc1)*(xc2-xc1)+(yc2-yc1)*(yc2-yc1))-(Rcurv1+Rcurv2))>5.) return 9999.;//not photon candidate
1483 
1484 
1485  Double_t dxc = xc2-xc1;
1486  Double_t dyc = yc2-yc1;
1487  Double_t nux = dyc/sqrt(dxc*dxc+dyc*dyc);
1488  Double_t nuy = -1.*dxc/sqrt(dxc*dxc+dyc*dyc);
1489  Double_t vertx1 = xc1 + (xc2-xc1)*Rcurv1/sqrt(dxc*dxc+dyc*dyc);
1490  Double_t verty1 = yc1 + (yc2-yc1)*Rcurv1/sqrt(dxc*dxc+dyc*dyc);
1491  Double_t vertx2 = xc2 + (xc1-xc2)*Rcurv2/sqrt(dxc*dxc+dyc*dyc);
1492  Double_t verty2 = yc2 + (yc1-yc2)*Rcurv2/sqrt(dxc*dxc+dyc*dyc);
1493  Double_t vertxmid = (vertx1+vertx2)/2.;
1494  Double_t vertymid = (verty1+verty2)/2.;
1495 
1496  if(vertxmid*nux+vertymid*nuy<0.) return 9999.;
1497 
1498  Double_t px1_new = trk1->Pt()*nux;
1499  Double_t py1_new = trk1->Pt()*nuy;
1500  Double_t pz1_new = trk1->Pz();
1501  Double_t E1_new = sqrt(px1_new*px1_new+py1_new*py1_new+pz1_new*pz1_new+0.000511);
1502  Double_t px2_new = trk2->Pt()*nux;
1503  Double_t py2_new = trk2->Pt()*nuy;
1504  Double_t pz2_new = trk2->Pz();
1505  Double_t E2_new = sqrt(px2_new*px2_new+py2_new*py2_new+pz2_new*pz2_new+0.000511);
1506 
1507 
1508  mass = sqrt(pow(E1_new+E2_new,2)-pow(px1_new+px2_new,2)-pow(py1_new+py2_new,2)-pow(pz1_new+pz2_new,2));
1509 
1510  //check
1511 // cout<<mass<<endl;
1512 // cout<<"Track 1: "<<charge1<<" "<<trk1->Px()<<" "<<trk1->Py()<<" "<<trk1->Pz()<<endl;
1513 // cout<<"Track 2: "<<charge2<<" "<<trk2->Px()<<" "<<trk2->Py()<<" "<<trk2->Pz()<<endl;
1514 // cout<<"Circle info 1: "<<Rcurv1<<" "<<xc1<<" "<<yc1<<endl;
1515 // cout<<"Circle info 2: "<<Rcurv2<<" "<<xc2<<" "<<yc2<<endl;
1516 // cout<<"New momenta 1: "<<px1_new<<" "<<py1_new<<" "<<pz1_new<<endl;
1517 // cout<<"New momenta 2: "<<px2_new<<" "<<py2_new<<" "<<pz2_new<<endl;
1518 // AliExternalTrackParam etp1;
1519 // etp1.CopyFromVTrack(trk1);
1520 // if(!etp1.PropagateTo(80.,(Float_t)fBzkG)) return 9999.;
1521 // etp1.GetXYZ(xyz);
1522 // cout<<"At 80 cm 1: "<<xyz[0]<<" "<<xyz[1]<<" "<<xyz[2]<<" -> "<<pow(xyz[0]-xc1,2)+pow(xyz[1]-yc1,2)-Rcurv1*Rcurv1<<endl;
1523 // if(!etp1.PropagateTo(120.,(Float_t)fBzkG)) return 9999.;
1524 // etp1.GetXYZ(xyz);
1525 // cout<<"At 120 cm 1: "<<xyz[0]<<" "<<xyz[1]<<" "<<xyz[2]<<" -> "<<pow(xyz[0]-xc1,2)+pow(xyz[1]-yc1,2)-Rcurv1*Rcurv1<<endl;
1526 // AliExternalTrackParam etp2;
1527 // etp2.CopyFromVTrack(trk2);
1528 // if(!etp2.PropagateTo(80.,(Float_t)fBzkG)) return 9999.;
1529 // etp2.GetXYZ(xyz);
1530 // cout<<"At 80 cm 2: "<<xyz[0]<<" "<<xyz[1]<<" "<<xyz[2]<<" -> "<<pow(xyz[0]-xc2,2)+pow(xyz[1]-yc2,2)-Rcurv2*Rcurv2<<endl;
1531 // if(!etp2.PropagateTo(120.,(Float_t)fBzkG)) return 9999.;
1532 // etp2.GetXYZ(xyz);
1533 // cout<<"At 120 cm 2: "<<xyz[0]<<" "<<xyz[1]<<" "<<xyz[2]<<" -> "<<pow(xyz[0]-xc2,2)+pow(xyz[1]-yc2,2)-Rcurv2*Rcurv2<<endl;
1534 // cout<<endl;
1535 
1536  return mass;
1537 }
1538 
1539 //________________________________________________________________________
1541 {
1542  //
1543  // Calculate Delta phi
1544  //
1545  Double_t phiv = v0->Phi();
1546  Double_t phie = trk->Phi();
1547  Double_t dphi = phiv - phie;
1548  if(dphi<-M_PI) dphi += 2 *M_PI;
1549  if(dphi> M_PI) dphi -= 2 *M_PI;
1550  return dphi;
1551 }
1552 //________________________________________________________________________
1554 {
1555  //
1556  // Calculate Delta Eta
1557  //
1558  Double_t etav = v0->Eta();
1559  Double_t etae = trk->Eta();
1560  Double_t deta = etav - etae;
1561  return deta;
1562 }
1563 
1564 //________________________________________________________________________
1566 {
1567  //
1568  // Calculate Opening angle
1569  //
1570  Double_t v0px = v0->Px();
1571  Double_t v0py = v0->Py();
1572  Double_t v0pz = v0->Pz();
1573  Double_t epx = trk->Px();
1574  Double_t epy = trk->Py();
1575  Double_t epz = trk->Pz();
1576  Double_t cosoa = (v0px*epx+v0py*epy+v0pz*epz)/sqrt(v0px*v0px+v0py*v0py+v0pz*v0pz)/sqrt(epx*epx+epy*epy+epz*epz);
1577 
1578  return cosoa;
1579 }
Bool_t SingleV0Cuts(AliAODv0 *v0, AliAODVertex *vert)
Double_t fProdV0DaughterTPCCrossRatioMin
V0 daughter Minimum TPC cluster pT used before object creation.
Double_t fProdV0ProperDecayLengthMax
Min Dca between v0-pion and PV.
double Double_t
Definition: External.C:58
Double_t fSigmaElectronTPCMin
nSigma to exclude for Kaon band
AliAODPidHF * fPidObjProton
Use PID for proton from Lc.
Double_t fProdRoughMassTol
Maximum rapidity of cascade.
AliRDHFCutsLctoeleLambdafromAODtracks & operator=(const AliRDHFCutsLctoeleLambdafromAODtracks &source)
Bool_t TagConversions(AliAODTrack *etrk, Int_t *id2index, AliAODEvent *evt, Int_t ntrk, Double_t &minmass)
Double_t GetSigma(Int_t idet) const
Definition: AliAODPidHF.h:134
Double_t fProdV0CosPointingAngleToPrimVtxMin
Max Lambda pT used before object creation.
Double_t fProdV0PtMin
Lambda mass selection used before object creation.
Int_t fUseV0Topology
Flag to check if we use on-the-fly v0.
Double_t mass
Double_t fProdV0PtMax
Minimum Lambda pT used before object creation.
Float_t fProdITSChi2OverNclsMax
Cut on fraction of shared clusters in ITS.
void SetSftPosR125(AliAODTrack *track, Double_t bfield, Double_t priVtx[3], Double_t *XSftR125)
Double_t fExcludenSigmaKaonTPC
nSigma to exclude for proton band
void SetNVars(Int_t nVars)
Definition: AliRDHFCuts.h:392
Bool_t fProdRejectTrackWithShared
AOD filter Bit used before object creation.
Bool_t SingleTrkCuts(AliAODTrack *trk, AliAODTrack *trkpid, AliAODVertex *vert)
AliRDHFCuts & operator=(const AliRDHFCuts &source)
Bool_t fExcludePionTPC
pT cut for Lc used before object creation
Double_t fProdTrackTPCNclsRatioMin
Min. Number of TPC PID cluster.
Bool_t fUsePID
Definition: AliRDHFCuts.h:422
Double_t fSigmaElectronTPCPtDepPar1
nSigma electron lower limit (par0)
Double_t fSigmaElectronTPCPtDepPar0
nSigma to select electron band
TString part
use mixed event to constrain combinatorial background
Definition: InvMassFit.C:52
Double_t fExcludenSigmaProtonTPC
nSigma to exclude for pion band
Double_t fProdDcaV0PrToPrimVertexMin
Max Dca between v0 and PV.
Int_t fProdAODFilterBit
Flag for AOD filter Bit used before object creation.
virtual void GetCutVarsForOpt(AliAODRecoDecayHF *d, Float_t *vars, Int_t nvars, Int_t *pdgdaughters)
const Double_t etamin
Double_t fProdV0DaughterEtaRange
Max DCA between V0 daughters used before object creation.
int Int_t
Definition: External.C:63
Int_t fnVarsForOpt
Definition: AliRDHFCuts.h:417
unsigned int UInt_t
Definition: External.C:33
Bool_t fUseLambdaPID
Threshold used in IsSelectedCombinedPID.
float Float_t
Definition: External.C:68
const Double_t ptmax
Double_t fMaxPtCand
minimum pt of the candidate
Definition: AliRDHFCuts.h:446
AliESDtrackCuts * fTrackCuts
quality cuts on the daughter tracks
Definition: AliRDHFCuts.h:410
Bool_t fExcludeKaonTPC
Flag wheter to exlude proton band.
Double_t fProdRoughPtMin
Mass cut for Lc used before object creation.
Double_t fProdDcaV0PiToPrimVertexMin
Min Dca between v0-proton and PV.
AliAODTrack * GetBachelor() const
Double_t fBzkG
0: Cowboy+Sailor 1: Cowboy 2:Sailor
Bool_t TagConversionsSameSign(AliAODTrack *etrk, Int_t *id2index, AliAODEvent *evt, Int_t ntrk, Double_t &minmass)
Bool_t fUseOnTheFlyV0
PID object for proton from Lc.
Double_t fSigmaElectronTPCPtDepPar2
nSigma electron lower limit (par1)
void SetSftPosR(AliAODTrack *track, Double_t bfield, Double_t R, Double_t priVtx[3], Double_t *XSftR)
const Double_t ptmin
Double_t fProdDcaV0ToPrimVertexMax
Min Dca between v0 and PV.
Bool_t SelectWithRoughCuts(AliAODv0 *v0, AliAODTrack *trk1)
Int_t MakeRawPid(AliAODTrack *track, Int_t specie)
AliPIDResponse * GetPidResponse() const
Definition: AliAODPidHF.h:160
void GetdPhiSdEtaSR125(AliAODTrack *tracke, AliAODTrack *trackp, AliAODTrack *trackn, Double_t bfield, Double_t priVtx[3], Double_t &dPhiS_ep, Double_t &dEtaS_ep, Double_t &dPhiS_en, Double_t &dEtaS_en)
Double_t CosOpeningAngle(AliAODv0 *v0, AliAODTrack *trk)
Double_t fSigmaElectronITSMax
nSigma to select electron band
Float_t * fCutsRD
fnVars*fnPtBins
Definition: AliRDHFCuts.h:420
Double_t fProdV0EtaMin
Rejection range of Omega mass from PDG value.
void SetVarsForOpt(Int_t nVars, Bool_t *forOpt)
Double_t fProdV0DaughterTPCClusterMin
V0 Daughter pT min used before object creation.
Double_t fExcludenSigmaPionTPC
Flag wheter to exlude proton band.
void SetVarNames(Int_t nVars, TString *varNames, Bool_t *isUpperCut)
Bool_t fExcludeProtonTPC
Flag wheter to exlude pion band.
Bool_t * fVarsForOpt
number of cut vars to be optimized for candidates
Definition: AliRDHFCuts.h:418
Bool_t SingleTrkCutsNoPID(AliAODTrack *trk, AliAODTrack *trkpid, AliAODVertex *vert)
Double_t fConversionMassMax
nSigma to select electron band
Double_t fProdV0MassTolLambdaRough
Lambda mass selection used before object creation.
Bool_t IsSelectedCustomizedPtDepeID(AliAODTrack *trk, AliAODTrack *trkpid)
Bool_t fProdUseAODFilterBit
Min. Number of TPC PID cluster.
void SetPtBins(Int_t nPtBinLimits, Float_t *ptBinLimits)
const Double_t etamax
Double_t fSigmaElectronTPCMax
nSigma electron lower limit (par2)
virtual Int_t IsSelected(TObject *obj, Int_t selectionLevel)
Double_t fProdRfidMinV0
V0 daughter Minimum TPC cluster pT used before object creation.
Double_t fProdV0DcaDaughtersMax
V0 pointing angle used before object creation.
Double_t dPhiSR125(Double_t *postrack1, Double_t *postrack2)
bool Bool_t
Definition: External.C:53
AliRDHFCutsLctoeleLambdafromAODtracks(const char *name="CutsLctoeleLambda")
AliAODPidHF * fPidHF
enable AOD049 centrality cleanup
Definition: AliRDHFCuts.h:424
Float_t fProdITSSharedFractionMax
Flag to Reject tracks with shared clusters.
Int_t PtBin(Double_t pt) const
Int_t GetGlobalIndex(Int_t iVar, Int_t iPtBin) const
Double_t dEtaSR125(Double_t *postrack1, Double_t *postrack2)
Double_t fMinPtCand
outcome of PID selection
Definition: AliRDHFCuts.h:445
AliAODPidHF * fPidObjPion
PID object for proton from Lc.
Double_t fProdV0DaughterPtMin
V0Daughter eta range used before object creation.
Bool_t IsDaughterSelected(AliAODTrack *track, const AliESDVertex *primary, AliESDtrackCuts *cuts, const AliAODEvent *aod=0x0) const
Double_t CalculatePhotonMass(AliAODTrack *track1, AliAODTrack *track2)
void SetPidResponse(AliPIDResponse *pidResp)
Definition: AliAODPidHF.h:111