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