AliPhysics  vAN-20150924 (e816f45)
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros
AliRDHFCutsOmegactoeleOmegafromAODtracks.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 Omegac->e+Omega
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 
31 #include "AliAnalysisManager.h"
32 #include "AliInputEventHandler.h"
33 #include "AliPIDResponse.h"
35 #include "AliAODRecoCascadeHF.h"
36 #include "AliAODTrack.h"
37 #include "AliESDtrack.h"
38 #include "AliESDVertex.h"
39 #include "AliAODVertex.h"
40 #include "AliAODv0.h"
41 #include "AliAODcascade.h"
42 #include "AliESDv0.h"
43 
44 using std::cout;
45 using std::endl;
46 
50 
51 //--------------------------------------------------------------------------
53 AliRDHFCuts(name),
54  fPIDStrategy(kNSigmaCuts),
55  fCombinedPIDThreshold(0.),
56  fUseCascadePID(kFALSE),
57  fPidObjCascPi(0),
58  fPidObjCascPr(0),
59  fPidObjCascKa(0),
60  fProdTrackTPCNclsPIDMin(0),
61  fProdTrackTPCNclsRatioMin(0.0),
62  fProdUseAODFilterBit(kTRUE),
63  fProdMassTolLambda(0.010),
64  fProdMassTolOmega(0.008),
65  fProdMassRejXi(0.008),
66  fProdRfidMinV0(0.6),
67  fProdRfidMaxV0(100.0),
68  fProdRfidMinOmega(0.6),
69  fProdRfidMaxOmega(100.0),
70  fProdCascProperDecayLengthMax(100.0),
71  fProdDcaOmegaDaughtersMax(100.),
72  fProdDcaV0DaughtersMax(100.),
73  fProdDcaBachToPrimVertexMin(0.),
74  fProdDcaV0ToPrimVertexMin(0.),
75  fProdDcaV0PrToPrimVertexMin(0.),
76  fProdDcaV0PiToPrimVertexMin(0.),
77  fProdXiCosineOfPoiningAngleMin(-1.),
78  fProdV0CosineOfPoiningAngleXiMin(-1.),
79  fProdCascNTPCClustersMin(0.0),
80  fProdCascEtaMin(-9999.),
81  fProdCascEtaMax(9999.),
82  fProdCascRapMin(-9999.),
83  fProdCascRapMax(9999.),
84  fProdRoughMassTol(0.25),
85  fProdRoughPtMin(0.0),
86  fExcludePionTPC(kFALSE),
87  fExcludeProtonTPC(kFALSE),
88  fExcludeKaonTPC(kFALSE),
89  fExcludenSigmaPionTPC(3.),
90  fExcludenSigmaProtonTPC(3.),
91  fExcludenSigmaKaonTPC(3.),
92  fSigmaElectronTPCMin(-9999.),
93  fSigmaElectronTPCMax(9999.),
94  fSigmaElectronTOFMin(-9999.),
95  fSigmaElectronTOFMax(9999.)
96 {
97  //
98  // Default Constructor
99  //
100 
101  const Int_t nvars=2;
102  SetNVars(nvars);
103  TString varNames[nvars]={
104  "InvMass [GeV/c2]", //0
105  "cos(Opening angle) [cos(rad)]" //1
106  };
107 
108  Bool_t isUpperCut[nvars]={
109  kTRUE, //0
110  kFALSE //1
111  };
112  SetVarNames(nvars,varNames,isUpperCut);
113  Bool_t forOpt[nvars]={
114  kTRUE, //0
115  kTRUE, //1
116  };
117  SetVarsForOpt(nvars,forOpt);
118 
119  Float_t limits[2]={0,999999999.};
120  SetPtBins(2,limits);
121 }
122 //--------------------------------------------------------------------------
124  AliRDHFCuts(source),
125  fPIDStrategy(source.fPIDStrategy),
126  fCombinedPIDThreshold(source.fCombinedPIDThreshold),
127  fUseCascadePID(source.fUseCascadePID),
128  fPidObjCascPi(source.fPidObjCascPi),
129  fPidObjCascPr(source.fPidObjCascPr),
130  fPidObjCascKa(source.fPidObjCascKa),
131  fProdTrackTPCNclsPIDMin(source.fProdTrackTPCNclsPIDMin),
132  fProdTrackTPCNclsRatioMin(source.fProdTrackTPCNclsRatioMin),
133  fProdUseAODFilterBit(source.fProdUseAODFilterBit),
134  fProdMassTolLambda(source.fProdMassTolLambda),
135  fProdMassTolOmega(source.fProdMassTolOmega),
136  fProdMassRejXi(source.fProdMassRejXi),
137  fProdRfidMinV0(source.fProdRfidMinV0),
138  fProdRfidMaxV0(source.fProdRfidMaxV0),
139  fProdRfidMinOmega(source.fProdRfidMinOmega),
140  fProdRfidMaxOmega(source.fProdRfidMaxOmega),
141  fProdCascProperDecayLengthMax(source.fProdCascProperDecayLengthMax),
142  fProdDcaOmegaDaughtersMax(source.fProdDcaOmegaDaughtersMax),
143  fProdDcaV0DaughtersMax(source.fProdDcaV0DaughtersMax),
144  fProdDcaBachToPrimVertexMin(source.fProdDcaBachToPrimVertexMin),
145  fProdDcaV0ToPrimVertexMin(source.fProdDcaV0ToPrimVertexMin),
146  fProdDcaV0PrToPrimVertexMin(source.fProdDcaV0PrToPrimVertexMin),
147  fProdDcaV0PiToPrimVertexMin(source.fProdDcaV0PiToPrimVertexMin),
148  fProdXiCosineOfPoiningAngleMin(source.fProdXiCosineOfPoiningAngleMin),
149  fProdV0CosineOfPoiningAngleXiMin(source.fProdV0CosineOfPoiningAngleXiMin),
150  fProdCascNTPCClustersMin(source.fProdCascNTPCClustersMin),
151  fProdCascEtaMin(source.fProdCascEtaMin),
152  fProdCascEtaMax(source.fProdCascEtaMax),
153  fProdCascRapMin(source.fProdCascRapMin),
154  fProdCascRapMax(source.fProdCascRapMax),
155  fProdRoughMassTol(source.fProdRoughMassTol),
156  fProdRoughPtMin(source.fProdRoughPtMin),
157  fExcludePionTPC(source.fExcludePionTPC),
158  fExcludeProtonTPC(source.fExcludeProtonTPC),
159  fExcludeKaonTPC(source.fExcludeKaonTPC),
160  fExcludenSigmaPionTPC(source.fExcludenSigmaPionTPC),
161  fExcludenSigmaProtonTPC(source.fExcludenSigmaProtonTPC),
162  fExcludenSigmaKaonTPC(source.fExcludenSigmaKaonTPC),
163  fSigmaElectronTPCMin(source.fSigmaElectronTPCMin),
164  fSigmaElectronTPCMax(source.fSigmaElectronTPCMax),
165  fSigmaElectronTOFMin(source.fSigmaElectronTOFMin),
166  fSigmaElectronTOFMax(source.fSigmaElectronTOFMax)
167 {
168  //
169  // Copy constructor
170  //
171 }
172 //--------------------------------------------------------------------------
174 {
175  //
176  // assignment operator
177  //
178 
179  if (this != &source) {
180  AliRDHFCuts::operator=(source);
181  }
182 
183  fPIDStrategy = source.fPIDStrategy;
186  fPidObjCascPi = source.fPidObjCascPi;
187  fPidObjCascPr = source.fPidObjCascPr;
188  fPidObjCascKa = source.fPidObjCascKa;
225 
226 
227  return *this;
228 }
229 
230 //---------------------------------------------------------------------------
232  //
233  // Default Destructor
234  //
235 
236 }
237 
238 //---------------------------------------------------------------------------
239 void AliRDHFCutsOmegactoeleOmegafromAODtracks::GetCutVarsForOpt(AliAODRecoDecayHF *d,Float_t *vars,Int_t nvars,Int_t *pdgdaughters) {
240  //
241  // Fills in vars the values of the variables
242  //
243 
244  if (pdgdaughters[0]==-9999) return; // dummy
245 
247  if(!dd){
248  AliError("No AliAODRecoCascadeHF object found\n");
249  return;
250  }
251 
252  if (nvars!=fnVarsForOpt) {
253  AliError("Cut object seems to have the wrong number of variables\n");
254  return;
255  }
256 
257  //Double_t ptD=d->Pt();
258  //Int_t ptbin=PtBin(ptD);
259  Int_t iter=-1;
260 
261  if(fVarsForOpt[0]){
262  iter++;
263  UInt_t pdgdg[2]={11,3334};
264  vars[iter]= dd->InvMass(2,pdgdg);
265  }
266  if(fVarsForOpt[1]){
267  iter++;
268  Double_t xipx = dd->PxProng(1);
269  Double_t xipy = dd->PyProng(1);
270  Double_t xipz = dd->PzProng(1);
271  Double_t epx = dd->PxProng(0);
272  Double_t epy = dd->PyProng(0);
273  Double_t epz = dd->PzProng(0);
274  vars[iter]= (xipx*epx+xipy*epy+xipz*epz)/sqrt(xipx*xipx+xipy*xipy+xipz*xipz)/sqrt(epx*epx+epy*epy+epz*epz);
275  }
276 
277  return;
278 }
279 
280 //---------------------------------------------------------------------------
281 Int_t AliRDHFCutsOmegactoeleOmegafromAODtracks::IsSelected(TObject* obj, Int_t selectionLevel) {
282  //
283  // Apply selection
284  //
285 
286  if (!fCutsRD) {
287  AliFatal("Cut matrix not inizialized. Exit...");
288  return 0;
289  }
290 
292  if(!d){
293  AliDebug(2,"AliAODRecoCascadeHF null");
294  return 0;
295  }
296 
297  Double_t ptD=d->Pt();
298  if(ptD<fMinPtCand) return 0;
299  if(ptD>fMaxPtCand) return 0;
300 
301  if (selectionLevel==AliRDHFCuts::kAll ||
302  selectionLevel==AliRDHFCuts::kTracks) {
303  //Performed in production stage
304  }
305 
306  Int_t returnvalueCuts=1;
307  // selection on candidate
308  if (selectionLevel==AliRDHFCuts::kAll ||
309  selectionLevel==AliRDHFCuts::kCandidate) {
310 
311  Double_t pt=d->Pt();
312  Int_t ptbin=PtBin(pt);
313  if (ptbin==-1) {
314  return 0;
315  }
316  Bool_t okcand=kTRUE;
317 
318  Double_t momegaPDG = TDatabasePDG::Instance()->GetParticle(3334)->Mass();
319  UInt_t pdgdg[2]={11,3334};
320  Double_t InvMassEleOmega = d->InvMass(2,pdgdg);
321  Double_t xipx = d->PxProng(1);
322  Double_t xipy = d->PyProng(1);
323  Double_t xipz = d->PzProng(1);
324  Double_t epx = d->PxProng(0);
325  Double_t epy = d->PyProng(0);
326  Double_t epz = d->PzProng(0);
327  Double_t cosoa = (xipx*epx+xipy*epy+xipz*epz)/sqrt(xipx*xipx+xipy*xipy+xipz*xipz)/sqrt(epx*epx+epy*epy+epz*epz);
328 
329  if(InvMassEleOmega > fCutsRD[GetGlobalIndex(0,ptbin)])
330  {
331  okcand = kFALSE;
332  }
333  if(cosoa < fCutsRD[GetGlobalIndex(1,ptbin)])
334  {
335  okcand = kFALSE;
336  }
337 
338  if(!okcand) return 0;
339  returnvalueCuts = 1;
340  }
341 
342  Int_t returnvaluePID=1;
343  if(selectionLevel==AliRDHFCuts::kAll ||
344  selectionLevel==AliRDHFCuts::kCandidate||
345  selectionLevel==AliRDHFCuts::kPID) {
346  //not used. applied at single level
347  }
348 
349  Int_t returnvalue = 0;
350  if(returnvalueCuts==1 && returnvaluePID==1) returnvalue=1;
351 
352  return returnvalue;
353 }
354 
355 //---------------------------------------------------------------------------
357 {
358  //
359  // IsSelectedPID
360  //
361 
362  if(!fUsePID || !obj) return 1;
363 
365  AliAODTrack *part = dd->GetBachelor();
366 
367  Int_t returnvalue=1;
368 
369  if(fPidHF->GetPidResponse()==0x0){
370  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
371  AliInputEventHandler *inputHandler=(AliInputEventHandler*)mgr->GetInputEventHandler();
372  AliPIDResponse *pidResp=inputHandler->GetPIDResponse();
373  fPidHF->SetPidResponse(pidResp);
374  }
375 
376  Int_t isElectron=fPidHF->MakeRawPid(part,0);
377  if(isElectron<1) returnvalue = 0;
378 
379  return returnvalue;
380 }
381 
382 //---------------------------------------------------------------------------
384  //
385  // IsSelectedCombinedPID
386  //
387 
388  if(!fUsePID || !obj) {return 1;}
389 
391  AliAODTrack *part = dd->GetBachelor();
392  if(!part) return 0;
393 
394  Int_t returnvalue=1;
395 
396  return returnvalue;
397 }
398 
399 //________________________________________________________________________
400 Bool_t AliRDHFCutsOmegactoeleOmegafromAODtracks::SingleTrkCuts(AliAODTrack *trk, AliAODVertex *primVert)
401 {
402  //
403  // Single Track Cut to be applied before object creation
404  //
405 
406  if(trk->GetStatus()&AliESDtrack::kITSpureSA) return kFALSE;
407  if(!(trk->GetStatus()&AliESDtrack::kITSin)) return kFALSE;
408  if(fProdUseAODFilterBit && !trk->TestFilterMask(BIT(4))) return kFALSE;
409 
410  Double_t pos[3]; primVert->GetXYZ(pos);
411  Double_t cov[6]; primVert->GetCovarianceMatrix(cov);
412  const AliESDVertex vESD(pos,cov,100.,100);
413  if(fTrackCuts&&!IsDaughterSelected(trk,&vESD,fTrackCuts)) return kFALSE;
414 
415  if(trk->GetTPCsignalN()<fProdTrackTPCNclsPIDMin) return kFALSE;
416  if(trk->GetTPCNclsF()>0){
417  Float_t tpcratio = (Float_t)trk->GetTPCncls()/(Float_t)trk->GetTPCNclsF();
418  if(tpcratio<fProdTrackTPCNclsRatioMin) return kFALSE;
419  }
420 
421  if(fUsePID)
422  {
423  if(fPidHF->GetPidResponse()==0x0){
424  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
425  AliInputEventHandler *inputHandler=(AliInputEventHandler*)mgr->GetInputEventHandler();
426  AliPIDResponse *pidResp=inputHandler->GetPIDResponse();
427  fPidHF->SetPidResponse(pidResp);
428  }
429 
430  switch(fPIDStrategy){
431  case kNSigmaCuts:
432  return IsSelectedeID(trk);
433  break;
435  return IsSelectedCustomizedeID(trk);
436  break;
437  case kCombinedCuts:
438  return IsSelectedCombinedeID(trk);
439  break;
440  }
441 
442  }
443 
444  return kTRUE;
445 }
446 //________________________________________________________________________
448 {
449  //
450  // electron ID first shot
451  //
452 
453  Double_t nSigmaPion = fPidHF->GetPidResponse()->NumberOfSigmasTPC(trk,AliPID::kPion);
454  if(fExcludePionTPC){
455  if(TMath::Abs(nSigmaPion)<fExcludenSigmaPionTPC){
456  return kFALSE;
457  }
458  }
459 
460  Double_t nSigmaProton = fPidHF->GetPidResponse()->NumberOfSigmasTPC(trk,AliPID::kProton);
461  if(fExcludeProtonTPC){
462  if(TMath::Abs(nSigmaProton)<fExcludenSigmaProtonTPC){
463  return kFALSE;
464  }
465  }
466 
467  Double_t nSigmaKaon = fPidHF->GetPidResponse()->NumberOfSigmasTPC(trk,AliPID::kKaon);
468  if(fExcludeKaonTPC){
469  if(TMath::Abs(nSigmaKaon)<fExcludenSigmaKaonTPC){
470  return kFALSE;
471  }
472  }
473 
474  Int_t isElectron=fPidHF->MakeRawPid(trk,0);
475  if(isElectron<1) return kFALSE;
476 
477  return kTRUE;
478 }
479 //________________________________________________________________________
481 {
482  //
483  // electron ID first shot
484  //
485 
486  Double_t nSigmaPion = fPidHF->GetPidResponse()->NumberOfSigmasTPC(trk,AliPID::kPion);
487  if(fExcludePionTPC){
488  if(TMath::Abs(nSigmaPion)<fExcludenSigmaPionTPC){
489  return kFALSE;
490  }
491  }
492 
493  Double_t nSigmaProton = fPidHF->GetPidResponse()->NumberOfSigmasTPC(trk,AliPID::kProton);
494  if(fExcludeProtonTPC){
495  if(TMath::Abs(nSigmaProton)<fExcludenSigmaProtonTPC){
496  return kFALSE;
497  }
498  }
499 
500  Double_t nSigmaKaon = fPidHF->GetPidResponse()->NumberOfSigmasTPC(trk,AliPID::kKaon);
501  if(fExcludeKaonTPC){
502  if(TMath::Abs(nSigmaKaon)<fExcludenSigmaKaonTPC){
503  return kFALSE;
504  }
505  }
506 
507  Double_t nSigmaTPCele = fPidHF->GetPidResponse()->NumberOfSigmasTPC(trk,AliPID::kElectron);
508  Double_t nSigmaTOFele = fPidHF->GetPidResponse()->NumberOfSigmasTOF(trk,AliPID::kElectron);
509 
510  if(nSigmaTPCele<fSigmaElectronTPCMin) return kFALSE;
511  if(nSigmaTPCele>fSigmaElectronTPCMax) return kFALSE;
512  if(nSigmaTOFele<fSigmaElectronTOFMin) return kFALSE;
513  if(nSigmaTOFele>fSigmaElectronTOFMax) return kFALSE;
514 
515  return kTRUE;
516 }
517 //________________________________________________________________________
519 {
520  //
521  // electron ID Basyian not implemented
522  //
523 
524  return kTRUE;
525 }
526 //________________________________________________________________________
527 Bool_t AliRDHFCutsOmegactoeleOmegafromAODtracks::SingleCascadeCuts(AliAODcascade *casc,Double_t *primvert)
528 {
529  //
530  // Single Cascade Cut
531  //
532 
533  if(!casc) return kFALSE;
534  if(!(casc->GetSecondaryVtx())) return kFALSE;
535  if(!(casc->GetDecayVertexXi())) return kFALSE;
536 
537  AliAODTrack *ptrack = (AliAODTrack*) (casc->GetDaughter(0));
538  AliAODTrack *ntrack = (AliAODTrack*) (casc->GetDaughter(1));
539  AliAODTrack *btrack = (AliAODTrack*) (casc->GetDecayVertexXi()->GetDaughter(0));
540 
541  if(!ptrack||!ntrack||!btrack) return kFALSE;
542 
543  if(ptrack->Charge()<0 && ntrack->Charge()>0){
544  ptrack = (AliAODTrack*) (casc->GetDaughter(1));
545  ntrack = (AliAODTrack*) (casc->GetDaughter(0));
546  }
547 
548  if(ptrack->GetTPCClusterInfo(2,1)<fProdCascNTPCClustersMin) return kFALSE;
549  if(ntrack->GetTPCClusterInfo(2,1)<fProdCascNTPCClustersMin) return kFALSE;
550  if(btrack->GetTPCClusterInfo(2,1)<fProdCascNTPCClustersMin) return kFALSE;
551 
552 
553  Double_t mLPDG = TDatabasePDG::Instance()->GetParticle(3122)->Mass();
554  Double_t mxiPDG = TDatabasePDG::Instance()->GetParticle(3312)->Mass();
555  Double_t momegaPDG = TDatabasePDG::Instance()->GetParticle(3334)->Mass();
556 
557  Double_t massLambda = casc->MassLambda();
558  Double_t massAntiLambda = casc->MassAntiLambda();
559  if(TMath::Abs(massLambda-mLPDG)>fProdMassTolLambda && TMath::Abs(massAntiLambda-mLPDG)>fProdMassTolLambda)
560  return kFALSE;
561 
562  Bool_t isparticle = kTRUE;
563  if(TMath::Abs(massAntiLambda-mLPDG)<fProdMassTolLambda) isparticle = kFALSE;
564 
565  Double_t massXi = casc->MassXi();
566  Double_t massOmega = casc->MassOmega();
567 
568  if(TMath::Abs(massOmega-momegaPDG)>fProdMassTolOmega)
569  return kFALSE;
570 
571  if(TMath::Abs(massXi-mxiPDG)<fProdMassRejXi)
572  return kFALSE;
573 
574  Double_t lPosXi[3];
575  lPosXi[0] = casc->DecayVertexXiX();
576  lPosXi[1] = casc->DecayVertexXiY();
577  lPosXi[2] = casc->DecayVertexXiZ();
578  Double_t decayvertXi = TMath::Sqrt(lPosXi[0]*lPosXi[0]+lPosXi[1]*lPosXi[1]);
579  Double_t lPosV0[3];
580  lPosV0[0] = casc->DecayVertexV0X();
581  lPosV0[1] = casc->DecayVertexV0Y();
582  lPosV0[2] = casc->DecayVertexV0Z();
583  Double_t decayvertV0 = TMath::Sqrt(lPosV0[0]*lPosV0[0]+lPosV0[1]*lPosV0[1]);
584 
585  if(decayvertV0<fProdRfidMinV0 || decayvertV0>fProdRfidMaxV0) return kFALSE;
586  if(decayvertXi<fProdRfidMinOmega || decayvertXi>fProdRfidMaxOmega) return kFALSE;
587 
588  Double_t ptotxi = TMath::Sqrt(pow(casc->MomXiX(),2)+pow(casc->MomXiY(),2)+pow(casc->MomXiZ(),2));
589  Double_t properdl = casc->DecayLengthXi(primvert[0],primvert[1],primvert[2])*mxiPDG/ptotxi;
590  if(properdl>fProdCascProperDecayLengthMax) return kFALSE;
591 
592  Double_t lDcaXiDaughters = casc->DcaXiDaughters();
593  Double_t lDcaV0Daughters = casc->DcaV0Daughters();
594  if(lDcaXiDaughters > fProdDcaOmegaDaughtersMax) return kFALSE;
595  if(lDcaV0Daughters > fProdDcaV0DaughtersMax) return kFALSE;
596 
597  Double_t lDcaBachToPrimVertex = casc->DcaBachToPrimVertex();
598  Double_t lDcaV0ToPrimVertex = casc->DcaV0ToPrimVertex();
599  Double_t lDcaPosToPrimVertex = casc->DcaPosToPrimVertex();
600  Double_t lDcaNegToPrimVertex = casc->DcaNegToPrimVertex();
601  if(lDcaBachToPrimVertex < fProdDcaBachToPrimVertexMin) return kFALSE;
602  if(lDcaV0ToPrimVertex < fProdDcaV0ToPrimVertexMin) return kFALSE;
603  if(isparticle){
604  if(lDcaPosToPrimVertex < fProdDcaV0PrToPrimVertexMin) return kFALSE;
605  if(lDcaNegToPrimVertex < fProdDcaV0PiToPrimVertexMin) return kFALSE;
606  }else{
607  if(lDcaPosToPrimVertex < fProdDcaV0PiToPrimVertexMin) return kFALSE;
608  if(lDcaNegToPrimVertex < fProdDcaV0PrToPrimVertexMin) return kFALSE;
609  }
610 
611  Double_t lXiCosineOfPointingAngle = casc->CosPointingAngleXi(primvert[0],primvert[1],primvert[2]);
612  Double_t lV0CosineOfPointingAngleXi = casc->CosPointingAngle(lPosXi);
613 
614  if(lXiCosineOfPointingAngle < fProdXiCosineOfPoiningAngleMin) return kFALSE;
615  if(lV0CosineOfPointingAngleXi < fProdV0CosineOfPoiningAngleXiMin) return kFALSE;
616 
617  if(fUseCascadePID)
618  {
619  if(fPidObjCascPi->GetPidResponse()==0x0){
620  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
621  AliInputEventHandler *inputHandler=(AliInputEventHandler*)mgr->GetInputEventHandler();
622  AliPIDResponse *pidResp=inputHandler->GetPIDResponse();
623  fPidObjCascPi->SetPidResponse(pidResp);
624  }
625  if(fPidObjCascPr->GetPidResponse()==0x0){
626  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
627  AliInputEventHandler *inputHandler=(AliInputEventHandler*)mgr->GetInputEventHandler();
628  AliPIDResponse *pidResp=inputHandler->GetPIDResponse();
629  fPidObjCascPr->SetPidResponse(pidResp);
630  }
631  if(fPidObjCascKa->GetPidResponse()==0x0){
632  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
633  AliInputEventHandler *inputHandler=(AliInputEventHandler*)mgr->GetInputEventHandler();
634  AliPIDResponse *pidResp=inputHandler->GetPIDResponse();
635  fPidObjCascKa->SetPidResponse(pidResp);
636  }
637  if(isparticle){
638  Int_t isProton=fPidObjCascPr->MakeRawPid(ptrack,4);
639  Int_t isKaon =fPidObjCascKa->MakeRawPid(btrack,3);
640  Int_t isPion =fPidObjCascPi->MakeRawPid(ntrack,2);
641  if(isProton<1) return kFALSE;
642  if(isKaon<1) return kFALSE;
643  if(isPion<1) return kFALSE;
644  }else{
645  Int_t isProton=fPidObjCascPr->MakeRawPid(ntrack,4);
646  Int_t isKaon =fPidObjCascKa->MakeRawPid(btrack,3);
647  Int_t isPion =fPidObjCascPi->MakeRawPid(ptrack,2);
648  if(isProton<1) return kFALSE;
649  if(isKaon<1) return kFALSE;
650  if(isPion<1) return kFALSE;
651  }
652  }
653 
654  Double_t RapOmega = casc->RapOmega();
655  if(RapOmega<fProdCascRapMin || RapOmega>fProdCascRapMax) return kFALSE;
656 
657  Double_t EtaOmega = 0.5*TMath::Log((ptotxi+casc->MomXiZ())/(ptotxi-casc->MomXiZ()));
658  if(EtaOmega<fProdCascEtaMin || EtaOmega>fProdCascEtaMax) return kFALSE;
659 
660 
661  return kTRUE;
662 }
663 
664 //________________________________________________________________________
665 Bool_t AliRDHFCutsOmegactoeleOmegafromAODtracks::SelectWithRoughCuts(AliAODcascade *casc, AliAODTrack *part)
666 {
667  //
668  // Mass and pT Cut to be applied before object creation
669  // Not used now
670  //
671  if(!casc) return kFALSE;
672  if(!part) return kFALSE;
673 
674  return kTRUE;
675 
676 }
Double_t fProdMassRejXi
Tolerance of Xi mass from PDG value.
virtual Int_t IsSelected(TObject *obj, Int_t selectionLevel)
ClassImp(AliAnalysisTaskTriggerRates) AliAnalysisTaskTriggerRates
Bool_t fExcludePionTPC
pT cut for Lc used before object creation
Double_t fProdMassTolLambda
Flag for AOD filter Bit used before object creation.
Double_t fSigmaElectronTOFMin
nSigma to exclude for Kaon band
Double_t fExcludenSigmaPionTPC
Flag wheter to exlude proton band.
Bool_t fUseCascadePID
Threshold used in IsSelectedCombinedPID.
Bool_t SingleCascadeCuts(AliAODcascade *casc, Double_t *vert)
Double_t fSigmaElectronTPCMax
nSigma to exclude for Kaon band
Double_t fProdDcaBachToPrimVertexMin
Max Dca between V0 daughters.
void SetNVars(Int_t nVars)
Definition: AliRDHFCuts.h:361
AliAODPidHF * fPidObjCascPr
PID object for cascade-pion.
AliRDHFCuts & operator=(const AliRDHFCuts &source)
virtual void GetCutVarsForOpt(AliAODRecoDecayHF *d, Float_t *vars, Int_t nvars, Int_t *pdgdaughters)
Bool_t fUsePID
Definition: AliRDHFCuts.h:388
AliRDHFCutsOmegactoeleOmegafromAODtracks(const char *name="CutsOmegactoeleOmega")
Int_t fnVarsForOpt
Definition: AliRDHFCuts.h:383
Double_t fProdDcaV0PiToPrimVertexMin
Min Dca between v0-proton and PV.
Double_t fMaxPtCand
minimum pt of the candidate
Definition: AliRDHFCuts.h:410
Bool_t fExcludeKaonTPC
Flag wheter to exlude proton band.
AliESDtrackCuts * fTrackCuts
quality cuts on the daughter tracks
Definition: AliRDHFCuts.h:376
Bool_t IsDaughterSelected(AliAODTrack *track, const AliESDVertex *primary, AliESDtrackCuts *cuts) const
AliAODPidHF * fPidObjCascKa
PID object for cascade-proton.
AliAODTrack * GetBachelor() const
Double_t fExcludenSigmaProtonTPC
nSigma to exclude for pion band
Int_t MakeRawPid(AliAODTrack *track, Int_t specie)
AliPIDResponse * GetPidResponse() const
Definition: AliAODPidHF.h:160
Double_t fProdV0CosineOfPoiningAngleXiMin
Min Xi cos pointing angle to PV.
Float_t * fCutsRD
fnVars*fnPtBins
Definition: AliRDHFCuts.h:386
Double_t fProdCascNTPCClustersMin
Min V0 cos pointing angle to Xi vertex.
void SetVarsForOpt(Int_t nVars, Bool_t *forOpt)
void SetVarNames(Int_t nVars, TString *varNames, Bool_t *isUpperCut)
Bool_t SingleTrkCuts(AliAODTrack *trk, AliAODVertex *primvert)
Bool_t * fVarsForOpt
number of cut vars to be optimized for candidates
Definition: AliRDHFCuts.h:384
Double_t fSigmaElectronTPCMin
nSigma to exclude for Kaon band
Double_t fSigmaElectronTOFMax
nSigma to exclude for Kaon band
void SetPtBins(Int_t nPtBinLimits, Float_t *ptBinLimits)
Bool_t SelectWithRoughCuts(AliAODcascade *casc, AliAODTrack *trk1)
Double_t fProdMassTolOmega
Tolerance of Lambda mass from PDG value.
Double_t fProdTrackTPCNclsRatioMin
Min. Number of TPC PID cluster.
AliAODPidHF * fPidHF
enable AOD049 centrality cleanup
Definition: AliRDHFCuts.h:390
Double_t fProdDcaV0ToPrimVertexMin
Min Dca between Bachelor and PV.
Int_t PtBin(Double_t pt) const
Int_t GetGlobalIndex(Int_t iVar, Int_t iPtBin) const
Double_t fMinPtCand
outcome of PID selection
Definition: AliRDHFCuts.h:409
Double_t fProdRoughPtMin
Mass cut for Lc used before object creation.
Double_t fExcludenSigmaKaonTPC
nSigma to exclude for proton band
Double_t fProdRfidMinV0
Rejection range of Omega mass from PDG value.
void SetPidResponse(AliPIDResponse *pidResp)
Definition: AliAODPidHF.h:111
Double_t fProdXiCosineOfPoiningAngleMin
Min Dca between v0-pion and PV.
AliRDHFCutsOmegactoeleOmegafromAODtracks & operator=(const AliRDHFCutsOmegactoeleOmegafromAODtracks &source)