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