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