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