AliPhysics  v5-06-40-01 (42bb456)
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros
AliRDHFCutsLctoV0.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->V0+X
21 //
22 // Modified by A.De Caro - decaro@sa.infn.it
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"
34 #include "AliRDHFCutsLctoV0.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 "AliESDv0.h"
42 
43 using std::cout;
44 using std::endl;
45 
49 
50 
51 //--------------------------------------------------------------------------
52 AliRDHFCutsLctoV0::AliRDHFCutsLctoV0(const char* name, Short_t /*v0channel*/) :
53 AliRDHFCuts(name),
54  fPidSelectionFlag(0),
55  fV0daughtersCuts(0),
56  fV0Type(0),
57  fHighPtCut(2.5),
58  fLowPtCut(1.0),
59  fExcludedCut(-1)
60 {
61  //
62  // Default Constructor
63  //
64 
65  const Int_t nvars=17;
66  SetNVars(nvars);
67  TString varNames[nvars]={"Lc inv. mass if K0S [GeV/c2]", // 0
68  "Lc inv. mass if Lambda [GeV/c2]", // 1
69  "K0S inv. mass [GeV/c2]", // 2
70  "Lambda/LambdaBar inv. mass[GeV/c2]", // 3
71  "pT min bachelor track [GeV/c]", // 4
72  "pT min V0-positive track [GeV/c]", // 5
73  "pT min V0-negative track [GeV/c]", // 6
74  "dca cascade (prong-to-prong) cut [cm]", // 7
75  "dca V0 (prong-to-prong) cut [number of sigmas]", // 8
76  "V0 cosPA min wrt PV", // 9
77  "d0 max bachelor wrt PV [cm]", // 10
78  "d0 max V0 wrt PV [cm]", // 11
79  "mass K0S veto [GeV/c2]", // 12
80  "mass Lambda/LambdaBar veto [GeV/c2]", // 13
81  "mass Gamma veto [GeV/c2]", // 14
82  "pT min V0 track [GeV/c]", // 15
83  "V0 type" // 16
84  };
85 
86  Bool_t isUpperCut[nvars]={kTRUE, // 0
87  kTRUE, // 1
88  kTRUE, // 2
89  kTRUE, // 3
90  kFALSE, // 4
91  kFALSE, // 5
92  kFALSE, // 6
93  kTRUE, // 7
94  kTRUE, // 8
95  kFALSE, // 9
96  kTRUE, // 10
97  kTRUE, // 11
98  kFALSE, // 12
99  kFALSE, // 13
100  kFALSE, // 14
101  kFALSE, // 15
102  kFALSE // 16
103  };
104  SetVarNames(nvars,varNames,isUpperCut);
105  Bool_t forOpt[nvars]={kFALSE, // 0
106  kFALSE, // 1
107  kTRUE, // 2
108  kTRUE, // 3
109  kTRUE, // 4
110  kTRUE, // 5
111  kTRUE, // 6
112  kTRUE, // 7
113  kTRUE, // 8
114  kTRUE, // 9
115  kTRUE, // 10
116  kTRUE, // 11
117  kTRUE, // 12
118  kTRUE, // 13
119  kTRUE, // 14
120  kTRUE, // 15
121  kFALSE // 16
122  };
123  SetVarsForOpt(nvars,forOpt);
124 
125  Float_t limits[2]={0,999999999.};
126  SetPtBins(2,limits);
127 
128  /*
129  switch (v0channel) {
130  case 0:
131  fV0channel = 0x0001;
132  break;
133  case 1:
134  fV0channel = 0x0002;
135  break;
136  case 2:
137  fV0channel = 0x0004;
138  break;
139  }
140  */
141 
142 }
143 //--------------------------------------------------------------------------
145  AliRDHFCuts(source),
146  fPidSelectionFlag(source.fPidSelectionFlag),
147  fV0daughtersCuts(0),
148  fV0Type(source.fV0Type),
149  fHighPtCut(source.fHighPtCut),
150  fLowPtCut(source.fLowPtCut),
151  fExcludedCut(source.fExcludedCut)
152  /*fV0channel(source.fV0channel)*/
153 {
154  //
155  // Copy constructor
156  //
157 
159  else fV0daughtersCuts = new AliESDtrackCuts();
160 
161 }
162 //--------------------------------------------------------------------------
164 {
165  //
166  // assignment operator
167  //
168 
169  if (this != &source) {
170 
171  AliRDHFCuts::operator=(source);
173 
174  delete fV0daughtersCuts;
175  fV0daughtersCuts = new AliESDtrackCuts(*(source.fV0daughtersCuts));
176 
177  fV0Type = source.fV0Type;
178 
179  fHighPtCut = source.fHighPtCut;
180  fLowPtCut = source.fLowPtCut;
181 
182  }
183 
184  return *this;
185 }
186 
187 
188 //---------------------------------------------------------------------------
190  //
191  // Default Destructor
192  //
193 
194  if (fV0daughtersCuts) {
195  delete fV0daughtersCuts;
197  }
198 
199 }
200 
201 //---------------------------------------------------------------------------
202 void AliRDHFCutsLctoV0::GetCutVarsForOpt(AliAODRecoDecayHF *d,Float_t *vars,Int_t nvars,Int_t *pdgdaughters) {
203  //
204  // Fills in vars the values of the variables
205  //
206 
207  if (pdgdaughters[0]==-9999) return; // dummy
208 
209  if (nvars!=fnVarsForOpt) {
210  printf("AliRDHFCutsLctoV0::GetCutVarsForOpt: wrong number of variables\n");
211  return;
212  }
213 
214  Double_t mLcPDG = TDatabasePDG::Instance()->GetParticle(4122)->Mass();
215  Double_t mk0sPDG = TDatabasePDG::Instance()->GetParticle(310)->Mass();
216  Double_t mLPDG = TDatabasePDG::Instance()->GetParticle(3122)->Mass();
217 
219 
220  // Get the v0 and all daughter tracks
221  AliAODTrack *bachelorTrack = (AliAODTrack*)dd->GetBachelor();
222  AliAODv0 *v0 = (AliAODv0*)dd->Getv0();
223  AliAODTrack *v0positiveTrack = (AliAODTrack*)dd->Getv0PositiveTrack();
224  AliAODTrack *v0negativeTrack = (AliAODTrack*)dd->Getv0NegativeTrack();
225 
226  Int_t iter=-1;
227  // cut on cascade mass, if K0S + p
228  if (fVarsForOpt[0]) {
229  iter++;
230  vars[iter]=TMath::Abs(dd->InvMassLctoK0sP()-mLcPDG);
231  }
232  // cut on cascade mass, if Lambda/LambdaBar + pi
233  if (fVarsForOpt[1]) {
234  iter++;
235  vars[iter]=TMath::Abs(dd->InvMassLctoLambdaPi()-mLcPDG);
236  }
237 
238  // cut on V0 mass if K0S
239  if (fVarsForOpt[2]) {
240  iter++;
241  vars[iter]=TMath::Abs(v0->MassK0Short()-mk0sPDG);
242  }
243 
244  // cut on V0 mass if Lambda/LambdaBar
245  if (fVarsForOpt[3]) {
246 
247  if (bachelorTrack->Charge()==1) {
248  iter++;
249  vars[iter]=TMath::Abs(v0->MassLambda()-mLPDG);
250  } else if (bachelorTrack->Charge()==-1) {
251  iter++;
252  vars[iter]=TMath::Abs(v0->MassAntiLambda()-mLPDG);
253  }
254 
255  }
256 
257  // cut bachelor min pt
258  if (fVarsForOpt[4]) {
259  iter++;
260  vars[iter]=bachelorTrack->Pt();
261  }
262 
263  // cut on V0-positive min pt
264  if (fVarsForOpt[5]) {
265  iter++;
266  vars[iter]=v0positiveTrack->Pt();
267  }
268 
269  // cut on V0-negative min pt
270  if (fVarsForOpt[6]) {
271  iter++;
272  vars[iter]=v0negativeTrack->Pt();
273  }
274 
275  // cut on cascade dca (prong-to-prong)
276  if (fVarsForOpt[7]) {
277  iter++;
278  vars[iter]=dd->GetDCA(); // prong-to-prong cascade DCA
279  }
280 
281  // cut on V0 dca (prong-to-prong)
282  if (fVarsForOpt[8]) {
283  iter++;
284  vars[iter]=v0->GetDCA(); // prong-to-prong V0 DCA
285  }
286 
287  // cut on V0 cosPA wrt PV
288  if (fVarsForOpt[9]) {
289  iter++;
290  vars[iter]=dd->CosV0PointingAngle(); // cosine of V0 pointing angle wrt primary vertex
291  }
292 
293  // cut on bachelor transverse impact parameter wrt PV
294  if (fVarsForOpt[10]) {
295  iter++;
296  vars[iter]=dd->Getd0Prong(0); // bachelor transverse impact parameter wrt primary vertex
297  }
298 
299  // cut on V0 transverse impact parameter wrt PV
300  if (fVarsForOpt[11]) {
301  iter++;
302  vars[iter]=dd->Getd0Prong(1); // V0 transverse impact parameter wrt primary vertex
303  }
304 
305  // cut on K0S invariant mass veto
306  if (fVarsForOpt[12]) {
307  iter++;
308  vars[iter]=TMath::Abs(v0->MassK0Short()-mk0sPDG); // K0S invariant mass veto
309  }
310 
311  // cut on Lambda/LambdaBar invariant mass veto
312  if (fVarsForOpt[13]) {
313 
314  if (bachelorTrack->Charge()==1) {
315  iter++;
316  vars[iter]=TMath::Abs(v0->MassLambda()-mLPDG);
317  } else if (bachelorTrack->Charge()==-1) {
318  iter++;
319  vars[iter]=TMath::Abs(v0->MassAntiLambda()-mLPDG);
320  }
321 
322  }
323 
324  // cut on gamma invariant mass veto
325  if (fVarsForOpt[14]) {
326  iter++;
327  vars[iter]= v0->InvMass2Prongs(0,1,11,11); // gamma invariant mass veto
328  }
329 
330 
331  // cut on V0 pT min
332  if (fVarsForOpt[15]) {
333  iter++;
334  vars[iter]= v0->Pt(); // V0 pT min
335  }
336 
337 
338  return;
339 }
340 //---------------------------------------------------------------------------
341 Int_t AliRDHFCutsLctoV0::IsSelected(TObject* obj,Int_t selectionLevel) {
342  //
343  // Apply selection
344  //
345 
346  if (!fCutsRD) {
347  AliFatal("Cut matrice not inizialized. Exit...");
348  return 0;
349  }
350 
352  if (!d) {
353  AliDebug(2,"AliAODRecoCascadeHF null");
354  return 0;
355  }
356 
357  if (!d->GetSecondaryVtx()) {
358  AliDebug(2,"No secondary vertex for cascade");
359  return 0;
360  }
361 
362  if (d->GetNDaughters()!=2) {
363  AliDebug(2,Form("No 2 daughters for current cascade (nDaughters=%d)",d->GetNDaughters()));
364  return 0;
365  }
366 
367  AliAODv0 * v0 = dynamic_cast<AliAODv0*>(d->Getv0());
368 
369  if ( v0 && ((v0->GetOnFlyStatus() == kTRUE && GetV0Type() == AliRDHFCuts::kOnlyOfflineV0s) ||
370  (v0->GetOnFlyStatus() == kFALSE && GetV0Type() == AliRDHFCuts::kOnlyOnTheFlyV0s)) ) return 0;
371 
372  AliAODTrack * bachelorTrack = dynamic_cast<AliAODTrack*>(d->GetBachelor());
373  if (!v0 || !bachelorTrack) {
374  AliDebug(2,"No V0 or no bachelor for current cascade");
375  return 0;
376  }
377 
378  if (bachelorTrack->GetID()<0) {
379  AliDebug(2,Form("Bachelor has negative ID %d",bachelorTrack->GetID()));
380  return 0;
381  }
382 
383  if (!v0->GetSecondaryVtx()) {
384  AliDebug(2,"No secondary vertex for V0 by cascade");
385  return 0;
386  }
387 
388  if (v0->GetNDaughters()!=2) {
389  AliDebug(2,Form("No 2 daughters for V0 of current cascade (onTheFly=%d, nDaughters=%d)",v0->GetOnFlyStatus(),v0->GetNDaughters()));
390  return 0;
391  }
392 
393 
394  // Get the V0 daughter tracks
395  AliAODTrack *v0positiveTrack = dynamic_cast<AliAODTrack*>(d->Getv0PositiveTrack());
396  AliAODTrack *v0negativeTrack = dynamic_cast<AliAODTrack*>(d->Getv0NegativeTrack());
397  if (!v0positiveTrack || !v0negativeTrack ) {
398  AliDebug(2,"No V0 daughters' objects");
399  return 0;
400  }
401 
402  if (v0positiveTrack->GetID()<0 || v0negativeTrack->GetID()<0) {
403  AliDebug(2,Form("At least one of V0 daughters has negative ID %d %d",v0positiveTrack->GetID(),v0negativeTrack->GetID()));
404  return 0;
405  }
406 
407  //if(fUseTrackSelectionWithFilterBits && d->HasBadDaughters()) return 0;
408  if ( fUseTrackSelectionWithFilterBits && !(bachelorTrack->TestFilterMask(BIT(4))) ) {
409  AliDebug(2,"Check on the bachelor FilterBit: no BIT(4). Candidate rejected.");
410  return 0;
411  }
412 
413  Int_t returnvalueTrack = 7;
414 
415  // selection on daughter tracks
416  if (selectionLevel==AliRDHFCuts::kAll ||
417  selectionLevel==AliRDHFCuts::kTracks) {
418 
419  if (!AreLctoV0DaughtersSelected(d)) return 0;
420 
421  }
422 
423  Bool_t okLck0sp=kTRUE, okLcLpi=kTRUE, okLcLBarpi=kTRUE;
424 
425  // selection on candidate
426  if (selectionLevel==AliRDHFCuts::kAll ||
427  selectionLevel==AliRDHFCuts::kCandidate) {
428 
429  Double_t pt = d->Pt();
430  Int_t ptbin = PtBin(pt);
431 
432  Double_t mLcPDG = TDatabasePDG::Instance()->GetParticle(4122)->Mass();
433  Double_t mk0sPDG = TDatabasePDG::Instance()->GetParticle(310)->Mass();
434  Double_t mLPDG = TDatabasePDG::Instance()->GetParticle(3122)->Mass();
435 
436  // K0S + p
437  Double_t mk0s = v0->MassK0Short();
438  Double_t mLck0sp = d->InvMassLctoK0sP();
439 
440  // Lambda + pi
441  Double_t mlambda = v0->MassLambda();
442  Double_t malambda = v0->MassAntiLambda();
443  Double_t mLcLpi = d->InvMassLctoLambdaPi();
444 
445  Bool_t okK0spipi=kTRUE, okLppi=kTRUE, okLBarpip=kTRUE;
446  Bool_t isNotK0S = kTRUE, isNotLambda = kTRUE, isNotLambdaBar = kTRUE, isNotGamma = kTRUE;
447 
448  // cut on Lc mass with K0S+p hypothesis
449  if (TMath::Abs(mLck0sp-mLcPDG) > fCutsRD[GetGlobalIndex(0,ptbin)] && fExcludedCut!=0) {
450  okLck0sp = kFALSE;
451  AliDebug(4,Form(" cascade mass is %2.2e and does not correspond to Lambda_c into K0S+p cut",mLck0sp));
452  }
453 
454  // cuts on the V0 mass: K0S case
455  if (TMath::Abs(mk0s-mk0sPDG) > fCutsRD[GetGlobalIndex(2,ptbin)] && fExcludedCut!=2) {
456  okK0spipi = kFALSE;
457  AliDebug(4,Form(" V0 mass is %2.2e and does not correspond to K0S cut",mk0s));
458  }
459 
460  // cut on Lc mass with Lambda+pi hypothesis
461  if (TMath::Abs(mLcLpi-mLcPDG) > fCutsRD[GetGlobalIndex(1,ptbin)] && fExcludedCut!=1) {
462  okLcLpi = kFALSE;
463  okLcLBarpi = kFALSE;
464  AliDebug(4,Form(" cascade mass is %2.2e and does not correspond to Lambda_c into Lambda+pi cut",mLcLpi));
465  }
466 
467  // cuts on the V0 mass: Lambda/LambdaBar case
468  //if ( !(bachelorTrack->Charge()==+1 && TMath::Abs(mlambda-mLPDG) <= fCutsRD[GetGlobalIndex(3,ptbin)] ) ) {
469  if ( TMath::Abs(mlambda-mLPDG) > fCutsRD[GetGlobalIndex(3,ptbin)] && fExcludedCut!=3) {
470  okLppi = kFALSE;
471  AliDebug(4,Form(" V0 mass is %2.2e and does not correspond to LambdaBar cut",mlambda));
472  }
473 
474  //if ( !(bachelorTrack->Charge()==-1 && TMath::Abs(malambda-mLPDG) <= fCutsRD[GetGlobalIndex(3,ptbin)] ) ) {
475  if ( TMath::Abs(malambda-mLPDG) > fCutsRD[GetGlobalIndex(3,ptbin)] && fExcludedCut!=3) {
476  okLBarpip = kFALSE;
477  AliDebug(4,Form(" V0 mass is %2.2e and does not correspond to LambdaBar cut",malambda));
478  }
479 
480  // cut on K0S invariant mass veto
481  if (TMath::Abs(v0->MassK0Short()-mk0sPDG) < fCutsRD[GetGlobalIndex(12,ptbin)] && fExcludedCut!=12) { // K0S invariant mass veto
482  AliDebug(4,Form(" veto on K0S invariant mass doesn't pass the cut"));
483  //return 0;
484  isNotK0S=kFALSE;
485  }
486 
487  // cut on Lambda/LambdaBar invariant mass veto
488  if (TMath::Abs(v0->MassLambda()-mLPDG) < fCutsRD[GetGlobalIndex(13,ptbin)] && fExcludedCut!=13) { // Lambda invariant mass veto
489  AliDebug(4,Form(" veto on Lambda invariant mass doesn't pass the cut"));
490  isNotLambda=kFALSE;
491  //return 0;
492  }
493  if (TMath::Abs(v0->MassAntiLambda()-mLPDG) < fCutsRD[GetGlobalIndex(13,ptbin)] && fExcludedCut!=13) { // LambdaBar invariant mass veto
494  AliDebug(4,Form(" veto on LambdaBar invariant mass doesn't pass the cut"));
495  isNotLambdaBar=kFALSE;
496  //return 0;
497  }
498 
499  // cut on gamma invariant mass veto
500  if (v0->InvMass2Prongs(0,1,11,11) < fCutsRD[GetGlobalIndex(14,ptbin)] && fExcludedCut!=14) { // K0S invariant mass veto
501  AliDebug(4,Form(" veto on gamma invariant mass doesn't pass the cut"));
502  isNotGamma=kFALSE;
503  //return 0;
504  }
505 
506  okLck0sp = okLck0sp && okK0spipi && isNotLambda && isNotLambdaBar && isNotGamma;
507  okLcLpi = okLcLpi && okLppi && isNotK0S && isNotLambdaBar && isNotGamma;
508  okLcLBarpi = okLcLBarpi && okLBarpip && isNotK0S && isNotLambda && isNotGamma;
509 
510  if (!okLck0sp && !okLcLpi && !okLcLBarpi) return 0;
511 
512  // cuts on the minimum pt of the tracks
513  if (TMath::Abs(bachelorTrack->Pt()) < fCutsRD[GetGlobalIndex(4,ptbin)] && fExcludedCut!=4) {
514  AliDebug(4,Form(" bachelor track Pt=%2.2e > %2.2e",bachelorTrack->Pt(),fCutsRD[GetGlobalIndex(4,ptbin)]));
515  return 0;
516  }
517  if (TMath::Abs(v0positiveTrack->Pt()) < fCutsRD[GetGlobalIndex(5,ptbin)] && fExcludedCut!=5) {
518  AliDebug(4,Form(" V0-positive track Pt=%2.2e > %2.2e",v0positiveTrack->Pt(),fCutsRD[GetGlobalIndex(5,ptbin)]));
519  return 0;
520  }
521  if (TMath::Abs(v0negativeTrack->Pt()) < fCutsRD[GetGlobalIndex(6,ptbin)] && fExcludedCut!=6) {
522  AliDebug(4,Form(" V0-negative track Pt=%2.2e > %2.2e",v0negativeTrack->Pt(),fCutsRD[GetGlobalIndex(6,ptbin)]));
523  return 0;
524  }
525 
526  // cut on cascade dca (prong-to-prong)
527  if ( TMath::Abs(d->GetDCA()) > fCutsRD[GetGlobalIndex(7,ptbin)] && fExcludedCut!=7) { // prong-to-prong cascade DCA
528  AliDebug(4,Form(" cascade tracks DCA don't pass the cut"));
529  return 0;
530  }
531 
532  // cut on V0 dca (prong-to-prong)
533  if ( TMath::Abs(v0->GetDCA()) > fCutsRD[GetGlobalIndex(8,ptbin)] && fExcludedCut!=8) { // prong-to-prong V0 DCA
534  AliDebug(4,Form(" V0 DCA don't pass the cut"));
535  return 0;
536  }
537 
538  // cut on V0 cosine of pointing angle wrt PV
539  if (d->CosV0PointingAngle() < fCutsRD[GetGlobalIndex(9,ptbin)] && fExcludedCut!=9) { // cosine of V0 pointing angle wrt primary vertex
540  AliDebug(4,Form(" V0 cosine of pointing angle doesn't pass the cut"));
541  return 0;
542  }
543 
544  // cut on bachelor transverse impact parameter wrt PV
545  if (TMath::Abs(d->Getd0Prong(0)) > fCutsRD[GetGlobalIndex(10,ptbin)] && fExcludedCut!=10) { // bachelor transverse impact parameter wrt PV
546  AliDebug(4,Form(" bachelor transverse impact parameter doesn't pass the cut"));
547  return 0;
548  }
549 
550  // cut on V0 transverse impact parameter wrt PV
551  if (TMath::Abs(d->Getd0Prong(1)) > fCutsRD[GetGlobalIndex(11,ptbin)] && fExcludedCut!=11) { // V0 transverse impact parameter wrt PV
552  AliDebug(4,Form(" V0 transverse impact parameter doesn't pass the cut"));
553  return 0;
554  }
555 
556  // cut on V0 pT min
557  if (v0->Pt() < fCutsRD[GetGlobalIndex(15,ptbin)] && fExcludedCut!=15) { // V0 pT min
558  AliDebug(4,Form(" V0 track Pt=%2.2e > %2.2e",v0->Pt(),fCutsRD[GetGlobalIndex(15,ptbin)]));
559  return 0;
560  }
561 
562  }
563 
564  Int_t returnvalue = okLck0sp+2*okLcLBarpi+4*okLcLpi;
565  /*
566  retvalue case
567  1 Lc->K0S + p
568  2 Lc->LambdaBar + pi
569  3 Lc->K0S + p AND Lc->LambdaBar + pi
570  4 Lc->Lambda + pi
571  5 Lc->K0S + p AND Lc->Lambda + pi
572  6 Lc->LambdaBar + pi AND Lc->Lambda + pi
573  7 Lc->K0S + p AND Lc->LambdaBar + pi AND Lc->Lambda + pi
574  */
575 
576  Int_t returnvaluePID = 7;
577 
578  // selection on candidate
579  if (selectionLevel==AliRDHFCuts::kAll ||
580  selectionLevel==AliRDHFCuts::kCandidate ||
581  selectionLevel==AliRDHFCuts::kPID )
582  returnvaluePID = IsSelectedPID(d);
583 
584  //if (fUsePID && returnvaluePID==0) return 0;
585 
586  Int_t returnvalueTot = 0;
587  if ( fUsePID )
588  returnvalueTot = CombineCuts(returnvalueTrack,returnvalue,returnvaluePID);
589  else
590  returnvalueTot = CombineCuts(returnvalueTrack,returnvalue,7);
591 
592  return returnvalueTot;
593 
594 }
595 //---------------------------------------------------------------------------
597 
598  // fPidHF -> PID object for bachelor
599 
600  if (!fUsePID || !obj) {
601  AliDebug(2,"PID selection inactive. Candidate accepted.");
602  return 7; // all hypothesis are valid
603  }
604 
606 
607  AliAODv0 * v0 = dynamic_cast<AliAODv0*>(objD->Getv0());
608  if ( v0 && ((v0->GetOnFlyStatus() == kTRUE && GetV0Type() == AliRDHFCuts::kOnlyOfflineV0s) ||
609  (v0->GetOnFlyStatus() == kFALSE && GetV0Type() == AliRDHFCuts::kOnlyOnTheFlyV0s)) ) return 0;
610 
611  AliAODTrack *bachelor = (AliAODTrack*)objD->GetBachelor();
612  AliAODTrack *v0Pos = (AliAODTrack*)objD->Getv0PositiveTrack();
613  AliAODTrack *v0Neg = (AliAODTrack*)objD->Getv0NegativeTrack();
614 
615  if (!bachelor || !v0Pos || !v0Neg) return 0;
616 
617  Bool_t okLcK0Sp = kTRUE; // K0S case
618  Bool_t okLcLambdaBarPi = kTRUE; // LambdaBar case
619  Bool_t okLcLambdaPi = kTRUE; // Lambda case
620 
621  CheckPID(bachelor,v0Neg,v0Pos,okLcK0Sp,okLcLambdaBarPi,okLcLambdaPi);
622 
623  Int_t returnvalue = okLcK0Sp+2*okLcLambdaBarPi+4*okLcLambdaPi;
624 
625  return returnvalue;
626 }
627 //-----------------------
628 void AliRDHFCutsLctoV0::CheckPID(AliAODTrack *bachelor,
629  AliAODTrack * /*v0Neg*/, AliAODTrack * /*v0Pos*/,
630  Bool_t &isBachelorID1, Bool_t &isBachelorID2, Bool_t &isBachelorID4) {
631  // identification strategy
632 
633  Int_t idxIDbyTOF = -1;
634  Int_t idxIDbyTPC = -1;
635 
636  Int_t tpcID = -1;
637  Int_t tofID = -1;
638  Double_t nTPCsigmas = -999;
639  Double_t nTOFsigmas = -999;
640 
641  Bool_t trackIDByTOF = -1;
642  Bool_t trackIDByTPC = -1;
643 
644  Bool_t dummy = kFALSE;
645 
646  switch (fPidSelectionFlag) {
647 
648  case 0:
649 
650  // identify bachelor
651  idxIDbyTOF = fPidHF->ApplyPidTOFRaw(bachelor,4);
652  idxIDbyTPC = fPidHF->ApplyPidTPCRaw(bachelor,4);
653  isBachelorID1 = (idxIDbyTOF==4) && (idxIDbyTPC==4); // K0S case
654 
655  idxIDbyTOF = fPidHF->ApplyPidTOFRaw(bachelor,2);
656  idxIDbyTPC = fPidHF->ApplyPidTPCRaw(bachelor,2);
657  isBachelorID2 = (idxIDbyTOF==2) && (idxIDbyTPC==2); // LambdaBar case
658 
659  isBachelorID4 = isBachelorID2; // Lambda case
660 
661  break;
662 
663  case 1:
664 
665  // identify bachelor
666  idxIDbyTOF = fPidHF->ApplyPidTOFRaw(bachelor,4);
667  idxIDbyTPC = fPidHF->ApplyPidTPCRaw(bachelor,4);
668  dummy = ( !(fPidHF->CheckTOFPIDStatus(bachelor)) && (idxIDbyTPC==4) &&
669  fPidHF->IsExcluded(bachelor,2,2.,"TPC") && fPidHF->IsExcluded(bachelor,3,2.,"TPC") ); // K0S case
670  isBachelorID1 = ( (idxIDbyTOF==4) || dummy );
671 
672  idxIDbyTOF = fPidHF->ApplyPidTOFRaw(bachelor,2);
673  idxIDbyTPC = fPidHF->ApplyPidTPCRaw(bachelor,2);
674  dummy = ( !(fPidHF->CheckTOFPIDStatus(bachelor)) && (idxIDbyTPC==2) &&
675  fPidHF->IsExcluded(bachelor,3,2.,"TPC") && fPidHF->IsExcluded(bachelor,4,2.,"TPC") ); // LambdaBar case
676  isBachelorID2 = ( (idxIDbyTOF==2) || dummy );
677 
678  isBachelorID4 = isBachelorID2; // Lambda case
679 
680  break;
681 
682  case 2:
683 
684  // identify bachelor
685  nTOFsigmas = -999;
686  tofID = fPidHF->GetnSigmaTOF(bachelor,4,nTOFsigmas);
687  nTPCsigmas = -999;
688  tpcID = fPidHF->GetnSigmaTPC(bachelor,4,nTPCsigmas);
689  trackIDByTOF = ( (tofID==1) && ( (bachelor->P()>=fLowPtCut && bachelor->P()<fHighPtCut && TMath::Abs(nTOFsigmas)<3) ||
690  (bachelor->P()>=fHighPtCut && nTOFsigmas>-2 && nTOFsigmas<3) ) );
691  trackIDByTPC = ( (tpcID==1) && ( (bachelor->P()<fLowPtCut && TMath::Abs(nTPCsigmas)<2) ||
692  (bachelor->P()>=fLowPtCut && TMath::Abs(nTPCsigmas)<3) ) );
693  isBachelorID1 = (bachelor->P()<fLowPtCut && trackIDByTPC) || (bachelor->P()>=fLowPtCut && trackIDByTPC && trackIDByTOF); // K0S case
694 
695  nTOFsigmas = -999;
696  tofID = fPidHF->GetnSigmaTOF(bachelor,2,nTOFsigmas);
697  nTPCsigmas = -999;
698  tpcID = fPidHF->GetnSigmaTPC(bachelor,2,nTPCsigmas);
699  trackIDByTOF = ( (tofID==1) && ( (bachelor->P()>=fLowPtCut && bachelor->P()<fHighPtCut && TMath::Abs(nTOFsigmas)<3) ||
700  (bachelor->P()>=fHighPtCut && nTOFsigmas>-2 && nTOFsigmas<3) ) );
701  trackIDByTPC = ( (tpcID==1) && ( (bachelor->P()<fLowPtCut && TMath::Abs(nTPCsigmas)<2) ||
702  (bachelor->P()>=fLowPtCut && TMath::Abs(nTPCsigmas)<3) ) );
703  isBachelorID2 = (bachelor->P()<fLowPtCut && trackIDByTPC) || (bachelor->P()>=fLowPtCut && trackIDByTPC && trackIDByTOF); // LambdaBar case
704 
705  isBachelorID4 = isBachelorID2; // Lambda case
706 
707  break;
708 
709  case 3:
710 
711  // identify bachelor
712  nTOFsigmas = -999;
713  tofID = fPidHF->GetnSigmaTOF(bachelor,4,nTOFsigmas);
714  nTPCsigmas = -999;
715  tpcID = fPidHF->GetnSigmaTPC(bachelor,4,nTPCsigmas);
716  trackIDByTOF = ( (tofID==1) && ( (bachelor->P()>=fLowPtCut && bachelor->P()<fHighPtCut && TMath::Abs(nTOFsigmas)<3) ||
717  (bachelor->P()>=fHighPtCut && nTOFsigmas>-2 && nTOFsigmas<3) ) );
718  trackIDByTPC = ( (tpcID==1) && ( (bachelor->P()<fLowPtCut && TMath::Abs(nTPCsigmas)<2) ||
719  (bachelor->P()>=fLowPtCut && bachelor->P()<fHighPtCut && TMath::Abs(nTPCsigmas)<3) ||
720  (bachelor->P()>=fHighPtCut && nTPCsigmas>-3 && nTPCsigmas<2) ) );
721  isBachelorID1 = (bachelor->P()<fLowPtCut && trackIDByTPC) || (bachelor->P()>=fLowPtCut && trackIDByTPC && trackIDByTOF); // K0S case
722 
723  nTOFsigmas = -999;
724  tofID = fPidHF->GetnSigmaTOF(bachelor,2,nTOFsigmas);
725  nTPCsigmas = -999;
726  tpcID = fPidHF->GetnSigmaTPC(bachelor,2,nTPCsigmas);
727  trackIDByTOF = ( (tofID==1) && ( (bachelor->P()>=fLowPtCut && bachelor->P()<fHighPtCut && TMath::Abs(nTOFsigmas)<3) ||
728  (bachelor->P()>=fHighPtCut && nTOFsigmas>-2 && nTOFsigmas<3) ) );
729  trackIDByTPC = ( (tpcID==1) && ( (bachelor->P()<fLowPtCut && TMath::Abs(nTPCsigmas)<2) ||
730  (bachelor->P()>=fLowPtCut && bachelor->P()<fHighPtCut && TMath::Abs(nTPCsigmas)<3) ||
731  (bachelor->P()>=fHighPtCut && nTPCsigmas>-3 && nTPCsigmas<2) ) );
732  isBachelorID2 = (bachelor->P()<fLowPtCut && trackIDByTPC) || (bachelor->P()>=fLowPtCut && trackIDByTPC && trackIDByTOF); // LambdaBar case
733 
734  isBachelorID4 = isBachelorID2; // Lambda case
735 
736  break;
737 
738  case 4:
739 
740  // identify bachelor
741  nTOFsigmas = -999;
742  tofID = fPidHF->GetnSigmaTOF(bachelor,4,nTOFsigmas);
743  nTPCsigmas = -999;
744  tpcID = fPidHF->GetnSigmaTPC(bachelor,4,nTPCsigmas);
745  trackIDByTOF = ( (tofID==1) && ( (bachelor->P()>=fLowPtCut && bachelor->P()<fHighPtCut && TMath::Abs(nTOFsigmas)<3) ||
746  (bachelor->P()>=fHighPtCut && nTOFsigmas>-2 && nTOFsigmas<3) ) );
747  trackIDByTPC = ( (tpcID==1) && (TMath::Abs(nTPCsigmas)<2) );
748  isBachelorID1 = ( (bachelor->P()<fLowPtCut && trackIDByTPC) || (bachelor->P()>=fLowPtCut && trackIDByTOF) ); // K0S case
749 
750  nTOFsigmas = -999;
751  tofID = fPidHF->GetnSigmaTOF(bachelor,2,nTOFsigmas);
752  nTPCsigmas = -999;
753  tpcID = fPidHF->GetnSigmaTPC(bachelor,2,nTPCsigmas);
754  trackIDByTOF = ( (tofID==1) && ( (bachelor->P()>=fLowPtCut && bachelor->P()<fHighPtCut && TMath::Abs(nTOFsigmas)<3) ||
755  (bachelor->P()>=fHighPtCut && nTOFsigmas>-2 && nTOFsigmas<3) ) );
756  trackIDByTPC = ( (tpcID==1) && (TMath::Abs(nTPCsigmas)<2) );
757  isBachelorID2 = ( (bachelor->P()<fLowPtCut && trackIDByTPC) || (bachelor->P()>=fLowPtCut && trackIDByTOF) ); // LambdaBar case
758 
759  isBachelorID4 = isBachelorID2; // Lambda case
760 
761  break;
762 
763  case 5:
764 
765  // identify bachelor
766  nTOFsigmas = -999;
767  tofID = fPidHF->GetnSigmaTOF(bachelor,4,nTOFsigmas);
768  nTPCsigmas = -999;
769  tpcID = fPidHF->GetnSigmaTPC(bachelor,4,nTPCsigmas);
770  trackIDByTOF = ( (tofID==1) && ( (bachelor->P()>=fLowPtCut && bachelor->P()<fHighPtCut && TMath::Abs(nTOFsigmas)<3) ||
771  (bachelor->P()>=fHighPtCut && nTOFsigmas>-2 && nTOFsigmas<3) ) );
772  trackIDByTPC = ( (tpcID==1) && ( (bachelor->P()<fLowPtCut && TMath::Abs(nTPCsigmas)<2) || (bachelor->P()>=fHighPtCut && !trackIDByTOF && TMath::Abs(nTPCsigmas)<3) ) );
773  isBachelorID1 = (bachelor->P()<fLowPtCut && trackIDByTPC) || (bachelor->P()>=fLowPtCut && bachelor->P()<fHighPtCut && trackIDByTOF) || (bachelor->P()>=fHighPtCut && (trackIDByTOF || trackIDByTPC) ); // K0S case
774 
775  nTOFsigmas = -999;
776  tofID = fPidHF->GetnSigmaTOF(bachelor,2,nTOFsigmas);
777  nTPCsigmas = -999;
778  tpcID = fPidHF->GetnSigmaTPC(bachelor,2,nTPCsigmas);
779  trackIDByTOF = ( (tofID==1) && ( (bachelor->P()>=fLowPtCut && bachelor->P()<fHighPtCut && TMath::Abs(nTOFsigmas)<3) ||
780  (bachelor->P()>=fHighPtCut && nTOFsigmas>-2 && nTOFsigmas<3) ) );
781  trackIDByTPC = ( (tpcID==1) && ( (bachelor->P()<fLowPtCut && TMath::Abs(nTPCsigmas)<2) || (bachelor->P()>=fHighPtCut && !trackIDByTOF && TMath::Abs(nTPCsigmas)<3) ) );
782  isBachelorID2 = (bachelor->P()<fLowPtCut && trackIDByTPC) || (bachelor->P()>=fLowPtCut && bachelor->P()<fHighPtCut && trackIDByTOF) || (bachelor->P()>=fHighPtCut && (trackIDByTOF || trackIDByTPC) ); // LambdaBar case
783 
784  isBachelorID4 = isBachelorID2; // Lambda case
785 
786  break;
787  }
788 
789 }
790 //----------------
791 Int_t AliRDHFCutsLctoV0::CombineCuts(Int_t returnvalueTrack, Int_t returnvalue, Int_t returnvaluePID) const {
792  //
793  // combine track selection, topological cuts and PID
794  //
795 
796  Int_t returnvalueTot=returnvalueTrack&returnvalue;
797  returnvalueTot=returnvalueTot&returnvaluePID;
798 
799  return returnvalueTot;
800 }
801 
802 //----------------------------------
803 Int_t AliRDHFCutsLctoV0::IsSelectedSingleCut(TObject* obj, Int_t selectionLevel, Int_t cutIndex) {
804  //
805  // Apply selection on single cut
806  //
807 
808  if (!fCutsRD) {
809  AliDebug(2,"Cut matrice not inizialized. Exit...");
810  return 0;
811  }
812 
814  if (!d) {
815  AliDebug(2,"AliAODRecoCascadeHF null");
816  return 0;
817  }
818 
819  if (!d->GetSecondaryVtx()) {
820  AliDebug(2,"No secondary vertex for cascade");
821  return 0;
822  }
823 
824  if (d->GetNDaughters()!=2) {
825  AliDebug(2,Form("No 2 daughters for current cascade (nDaughters=%d)",d->GetNDaughters()));
826  return 0;
827  }
828 
829  AliAODv0 * v0 = dynamic_cast<AliAODv0*>(d->Getv0());
830  if ( v0 && ((v0->GetOnFlyStatus() == kTRUE && GetV0Type() == AliRDHFCuts::kOnlyOfflineV0s) ||
831  (v0->GetOnFlyStatus() == kFALSE && GetV0Type() == AliRDHFCuts::kOnlyOnTheFlyV0s)) ) return 0;
832 
833  AliAODTrack * bachelorTrack = dynamic_cast<AliAODTrack*>(d->GetBachelor());
834  if (!v0 || !bachelorTrack) {
835  AliDebug(2,"No V0 or no bachelor for current cascade");
836  return 0;
837  }
838 
839  if (bachelorTrack->GetID()<0) {
840  AliDebug(2,Form("Bachelor has negative ID %d",bachelorTrack->GetID()));
841  return 0;
842  }
843 
844  if (!v0->GetSecondaryVtx()) {
845  AliDebug(2,"No secondary vertex for V0 by cascade");
846  return 0;
847  }
848 
849  if (v0->GetNDaughters()!=2) {
850  AliDebug(2,Form("No 2 daughters for V0 of current cascade (onTheFly=%d, nDaughters=%d)",v0->GetOnFlyStatus(),v0->GetNDaughters()));
851  return 0;
852  }
853 
854 
855  // Get the V0 daughter tracks
856  AliAODTrack *v0positiveTrack = dynamic_cast<AliAODTrack*>(d->Getv0PositiveTrack());
857  AliAODTrack *v0negativeTrack = dynamic_cast<AliAODTrack*>(d->Getv0NegativeTrack());
858  if (!v0positiveTrack || !v0negativeTrack ) {
859  AliDebug(2,"No V0 daughters' objects");
860  return 0;
861  }
862 
863  if (v0positiveTrack->GetID()<0 || v0negativeTrack->GetID()<0) {
864  AliDebug(2,Form("At least one of V0 daughters has negative ID %d %d",v0positiveTrack->GetID(),v0negativeTrack->GetID()));
865  return 0;
866  }
867 
868  //if(fUseTrackSelectionWithFilterBits && d->HasBadDaughters()) return 0;
869  if ( fUseTrackSelectionWithFilterBits && !(bachelorTrack->TestFilterMask(BIT(4))) ) {
870  AliDebug(2,"Check on the bachelor FilterBit: no BIT(4). Candidate rejected.");
871  return 0;
872  }
873 
874 
875  // selection on daughter tracks
876  if (selectionLevel==AliRDHFCuts::kAll ||
877  selectionLevel==AliRDHFCuts::kTracks) {
878 
879  if (!AreLctoV0DaughtersSelected(d)) return 0;
880 
881  }
882 
883  Bool_t okLck0sp=kFALSE, okLcLpi=kFALSE, okLcLBarpi=kFALSE;
884 
885  // selection on candidate
886  if (selectionLevel==AliRDHFCuts::kAll ||
887  selectionLevel==AliRDHFCuts::kCandidate) {
888 
889  Double_t pt = d->Pt();
890  Int_t ptbin = PtBin(pt);
891 
892  Double_t mLcPDG = TDatabasePDG::Instance()->GetParticle(4122)->Mass();
893  Double_t mk0sPDG = TDatabasePDG::Instance()->GetParticle(310)->Mass();
894  Double_t mLPDG = TDatabasePDG::Instance()->GetParticle(3122)->Mass();
895 
896  // K0S + p
897  Double_t mk0s = v0->MassK0Short();
898  Double_t mLck0sp = d->InvMassLctoK0sP();
899 
900  // Lambda + pi
901  Double_t mlambda = v0->MassLambda();
902  Double_t malambda = v0->MassAntiLambda();
903  Double_t mLcLpi = d->InvMassLctoLambdaPi();
904 
905  switch (cutIndex) {
906  case 0:
907  // cut on Lc mass with K0S+p hypothesis
908  okLck0sp = TMath::Abs(mLck0sp-mLcPDG)<=fCutsRD[GetGlobalIndex(0,ptbin)];
909  okLcLpi = kFALSE;
910  okLcLBarpi = kFALSE;
911  break;
912  case 1:
913  // cut on Lc mass with Lambda+pi hypothesis
914  okLck0sp = kFALSE;
915  okLcLpi = TMath::Abs(mLcLpi-mLcPDG)<=fCutsRD[GetGlobalIndex(1,ptbin)];
916  okLcLBarpi = okLcLpi;
917  break;
918  case 2:
919  // cuts on the V0 mass: K0S case
920  okLck0sp = TMath::Abs(mk0s-mk0sPDG)<=fCutsRD[GetGlobalIndex(2,ptbin)];
921  okLcLpi = kFALSE;
922  okLcLBarpi = kFALSE;
923  break;
924  case 3:
925  // cuts on the V0 mass: Lambda/LambdaBar case
926  okLck0sp = kFALSE;
927  okLcLpi = TMath::Abs(mlambda-mLPDG)<=fCutsRD[GetGlobalIndex(3,ptbin)];
928  //okLcLpi = okLcLpi && (bachelorTrack->Charge()==+1);
929  okLcLBarpi = TMath::Abs(malambda-mLPDG)<=fCutsRD[GetGlobalIndex(3,ptbin)];
930  //okLcLBarpi = okLcLBarpi && (bachelorTrack->Charge()==-1);
931  break;
932  case 4:
933  // cuts on the minimum pt of bachelor
934  okLck0sp = TMath::Abs(bachelorTrack->Pt())>=fCutsRD[GetGlobalIndex(4,ptbin)];
935  okLcLpi = okLck0sp;
936  okLcLBarpi = okLck0sp;
937  break;
938  case 5:
939  // cuts on the minimum pt of positive V0daughter
940  okLck0sp = TMath::Abs(v0positiveTrack->Pt())>=fCutsRD[GetGlobalIndex(5,ptbin)];
941  okLcLpi = okLck0sp;
942  okLcLBarpi = okLck0sp;
943  break;
944  case 6:
945  // cuts on the minimum pt of negative V0daughter
946  okLck0sp = TMath::Abs(v0negativeTrack->Pt())>=fCutsRD[GetGlobalIndex(6,ptbin)];
947  okLcLpi = okLck0sp;
948  okLcLBarpi = okLck0sp;
949  break;
950  case 7:
951  // cut on cascade dca
952  okLck0sp = TMath::Abs(d->GetDCA())<=fCutsRD[GetGlobalIndex(7,ptbin)];
953  okLcLpi = okLck0sp;
954  okLcLBarpi = okLck0sp;
955  break;
956  case 8:
957  // cut on V0 dca
958  okLck0sp = TMath::Abs(v0->GetDCA())<=fCutsRD[GetGlobalIndex(8,ptbin)];
959  okLcLpi = okLck0sp;
960  okLcLBarpi = okLck0sp;
961  break;
962  case 9:
963  // cut on V0 cosine of pointing angle wrt PV
964  okLck0sp = d->CosV0PointingAngle()>=fCutsRD[GetGlobalIndex(9,ptbin)];
965  okLcLpi = okLck0sp;
966  okLcLBarpi = okLck0sp;
967  break;
968  case 10:
969  // cut on bachelor transverse impact parameter wrt PV
970  okLck0sp = TMath::Abs(d->Getd0Prong(0))<=fCutsRD[GetGlobalIndex(10,ptbin)];
971  okLcLpi = okLck0sp;
972  okLcLBarpi = okLck0sp;
973  break;
974  case 11:
975  // cut on V0 transverse impact parameter wrt PV
976  okLck0sp = TMath::Abs(d->Getd0Prong(1))<=fCutsRD[GetGlobalIndex(11,ptbin)];
977  okLcLpi = okLck0sp;
978  okLcLBarpi = okLck0sp;
979  break;
980  case 12:
981  // cut on K0S invariant mass veto
982  okLcLpi = TMath::Abs(mk0s-mk0sPDG)>=fCutsRD[GetGlobalIndex(12,ptbin)];
983  okLcLBarpi = TMath::Abs(mk0s-mk0sPDG)>=fCutsRD[GetGlobalIndex(12,ptbin)];
984  break;
985  case 13:
986  // cut on Lambda/LambdaBar invariant mass veto
987  okLck0sp = (TMath::Abs(mlambda-mLPDG)>=fCutsRD[GetGlobalIndex(13,ptbin)] &&
988  TMath::Abs(malambda-mLPDG)>=fCutsRD[GetGlobalIndex(13,ptbin)]);
989  break;
990  case 14:
991  // cut on gamma invariant mass veto
992  okLck0sp = v0->InvMass2Prongs(0,1,11,11)>=fCutsRD[GetGlobalIndex(14,ptbin)];
993  okLcLpi = okLck0sp;
994  okLcLBarpi = okLck0sp;
995  break;
996  case 15:
997  // cut on V0 pT min
998  okLck0sp = v0->Pt()>=fCutsRD[GetGlobalIndex(15,ptbin)];
999  okLcLpi = okLck0sp;
1000  okLcLBarpi = okLck0sp;
1001  break;
1002  }
1003  }
1004 
1005  Int_t returnvalue = okLck0sp+2*okLcLBarpi+4*okLcLpi;
1006  /*
1007  retvalue case
1008  1 Lc->K0S + p
1009  2 Lc->LambdaBar + pi
1010  3 Lc->K0S + p AND Lc->LambdaBar + pi
1011  4 Lc->Lambda + pi
1012  5 Lc->K0S + p AND Lc->Lambda + pi
1013  6 Lc->LambdaBar + pi AND Lc->Lambda + pi
1014  7 Lc->K0S + p AND Lc->LambdaBar + pi AND Lc->Lambda + pi
1015  */
1016 
1017 
1018  /*
1019  Int_t returnvaluePID = 7;
1020 
1021  // selection on PID
1022  if (selectionLevel==AliRDHFCuts::kAll ||
1023  selectionLevel==AliRDHFCuts::kCandidate ||
1024  selectionLevel==AliRDHFCuts::kPID )
1025  returnvaluePID = IsSelectedPID(d);
1026  */
1027 
1028  Int_t returnvalueTot = 0;
1029  //if ( fUsePID )
1030  //returnvalueTot = CombineCuts(returnvalue,returnvaluePID);
1031  //else
1032  returnvalueTot = returnvalue;
1033 
1034  return returnvalueTot;
1035 
1036 }
1037 //----------------------------------
1039 
1040  SetName("LctoV0ProductionCuts");
1041  SetTitle("Production cuts for Lc->V0+bachelor analysis");
1042 
1043  AliESDtrackCuts* esdTrackCuts=new AliESDtrackCuts();
1044  esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
1045  //default
1046  esdTrackCuts->SetRequireTPCRefit(kTRUE);
1047  esdTrackCuts->SetRequireITSRefit(kTRUE);
1048  esdTrackCuts->SetMinNClustersITS(0);//(4); // default is 5
1049  esdTrackCuts->SetMinNClustersTPC(70);
1050  //esdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD,
1051  // AliESDtrackCuts::kAny);
1052  // default is kBoth, otherwise kAny
1053  esdTrackCuts->SetMinDCAToVertexXY(0.);
1054  esdTrackCuts->SetPtRange(0.3,1.e10);
1055  //esdTrackCuts->SetEtaRange(-0.8,+0.8);
1056  esdTrackCuts->SetAcceptKinkDaughters(kFALSE);
1057  AddTrackCuts(esdTrackCuts);
1058  delete esdTrackCuts;
1059  esdTrackCuts=NULL;
1060 
1061 
1062  AliESDtrackCuts* esdTrackCutsV0daughters=new AliESDtrackCuts();
1063  esdTrackCutsV0daughters->SetRequireSigmaToVertex(kFALSE);
1064  //default
1065  esdTrackCutsV0daughters->SetRequireTPCRefit(kTRUE);
1066  esdTrackCutsV0daughters->SetRequireITSRefit(kFALSE);//(kTRUE);
1067  esdTrackCutsV0daughters->SetMinNClustersITS(0);//(4); // default is 5
1068  esdTrackCutsV0daughters->SetMinNClustersTPC(70);
1069  //esdTrackCutsV0daughters->SetClusterRequirementITS(AliESDtrackCuts::kSPD,
1070  // AliESDtrackCuts::kAny);
1071  // default is kBoth, otherwise kAny
1072  esdTrackCutsV0daughters->SetMinDCAToVertexXY(0.);
1073  esdTrackCutsV0daughters->SetPtRange(0.,1.e10);
1074  esdTrackCutsV0daughters->SetAcceptKinkDaughters(kFALSE);
1075  AddTrackCutsV0daughters(esdTrackCutsV0daughters);
1076  delete esdTrackCutsV0daughters;
1077  esdTrackCutsV0daughters=NULL;
1078 
1079  const Int_t nptbins=1;
1080  Float_t* ptbins;
1081  ptbins=new Float_t[nptbins+1];
1082  ptbins[0]=0.;
1083  ptbins[1]=99999999.;
1084 
1085  SetPtBins(nptbins+1,ptbins);
1086  SetPtBins(nptbins+1,ptbins);
1087 
1088  const Int_t nvars=17;
1089 
1090  Float_t** prodcutsval;
1091  prodcutsval=new Float_t*[nvars];
1092  for(Int_t ic=0;ic<nvars;ic++){prodcutsval[ic]=new Float_t[nptbins];}
1093  for(Int_t ipt2=0;ipt2<nptbins;ipt2++){
1094  prodcutsval[0][ipt2]=1.; // inv. mass if K0S [GeV/c2]
1095  prodcutsval[1][ipt2]=1.; // inv. mass if Lambda [GeV/c2]
1096  prodcutsval[2][ipt2]=0.05; // inv. mass V0 if K0S [GeV/c2]
1097  prodcutsval[3][ipt2]=0.05; // inv. mass V0 if Lambda [GeV/c2]
1098  prodcutsval[4][ipt2]=0.3; // pT min bachelor track [GeV/c] // AOD by construction
1099  prodcutsval[5][ipt2]=0.; // pT min V0-positive track [GeV/c]
1100  prodcutsval[6][ipt2]=0.; // pT min V0-negative track [GeV/c]
1101  prodcutsval[7][ipt2]=1000.; // dca cascade cut [cm]
1102  prodcutsval[8][ipt2]=1.5; // dca V0 cut [nSigma] // it's 1.5 x offline V0s
1103  prodcutsval[9][ipt2]=-1.; // cosPA V0 cut // it's 0.90 x offline V0s at reconstruction level, 0.99 at filtering level
1104  prodcutsval[10][ipt2]=3.; // d0 max bachelor wrt PV [cm]
1105  prodcutsval[11][ipt2]=1000.;// d0 max V0 wrt PV [cm]
1106  prodcutsval[12][ipt2]=0.; // mass K0S veto [GeV/c2]
1107  prodcutsval[13][ipt2]=0.; // mass Lambda/LambdaBar veto [GeV/c2]
1108  prodcutsval[14][ipt2]=0.; // mass Gamma veto [GeV/c2]
1109  prodcutsval[15][ipt2]=0.; // pT min V0 track [GeV/c]
1110  prodcutsval[16][ipt2]=0.; // V0 type cut
1111  }
1112  SetCuts(nvars,nptbins,prodcutsval);
1113 
1114  SetGlobalIndex(nvars,nptbins);
1115  SetPtBins(nptbins+1,ptbins);
1116 
1117 
1118  //pid settings
1119  //1. bachelor: default one
1120  AliAODPidHF* pidObjBachelor = new AliAODPidHF();
1121  Double_t sigmasBac[5]={3.,1.,1.,3.,3.}; // 0, 1(A), 2(A) -> TPC; 3 -> TOF; 4 -> ITS
1122  pidObjBachelor->SetSigma(sigmasBac);
1123  pidObjBachelor->SetAsym(kFALSE);
1124  pidObjBachelor->SetMatch(1);
1125  pidObjBachelor->SetTPC(kTRUE);
1126  pidObjBachelor->SetTOF(kTRUE);
1127  pidObjBachelor->SetTOFdecide(kFALSE);
1128  SetPidHF(pidObjBachelor);
1129 
1130  SetUsePID(kFALSE);//(kTRUE);
1131 
1132  //PrintAll();
1133 
1134  for(Int_t iiv=0;iiv<nvars;iiv++){
1135  delete [] prodcutsval[iiv];
1136  }
1137  delete [] prodcutsval;
1138  prodcutsval=NULL;
1139  delete [] ptbins;
1140  ptbins=NULL;
1141 
1142 
1143  delete pidObjBachelor;
1144  pidObjBachelor=NULL;
1145 
1146  return;
1147 }
1148 //------------------
1150 
1151  SetName("LctoV0ProductionCuts");
1152  SetTitle("Production cuts for Lc->V0+bachelor analysis");
1153 
1155 
1156  return;
1157 }
1158 //------------------
1160 
1161  // Default 2010 PbPb cut object
1163 
1164  //
1165  // Enable all 2011 PbPb run triggers
1166  //
1167  SetTriggerClass("");
1171 
1172 }
1173 //-----------------------
1175 
1176  const Int_t nvars = this->GetNVars() ;
1177  //Float_t *vArray =GetCuts();
1178  //fV0Type = vArray[nvars-1];
1179  fV0Type = (this->GetCuts())[nvars-1];
1180  //this->GetCuts(vArray);
1181  TString *sVarNames=GetVarNames();
1182 
1183  if(sVarNames[nvars-1].Contains("V0 type")) return (Int_t)fV0Type;
1184  else {AliInfo("AliRDHFCutsLctoV0 Last variable is not the V0 type!!!"); return -999;}
1185 }
1186 
1187 //---------------------------------------------------------------------------
1189  //
1190  // print all cuts values
1191  //
1192 
1193  printf("Minimum vtx type %d\n",fMinVtxType);
1194  printf("Minimum vtx contr %d\n",fMinVtxContr);
1195  printf("Max vtx red chi2 %f\n",fMaxVtxRedChi2);
1196  printf("Min SPD mult %d\n",fMinSPDMultiplicity);
1197  printf("Use PID %d (PID selection flag = %d) OldPid=%d\n",(Int_t)fUsePID,(Int_t)fPidSelectionFlag,fPidHF ? fPidHF->GetOldPid() : -1);
1198  printf("High value for pT %f\n",fHighPtCut);
1199  printf("Low and high values for pT cuts: %f %f\n",fLowPtCut,fHighPtCut);
1200  printf("Remove daughters from vtx %d\n",(Int_t)fRemoveDaughtersFromPrimary);
1201  printf("Physics selection: %s\n",fUsePhysicsSelection ? "Yes" : "No");
1202  printf("Pileup rejection: %s\n",(fOptPileup > 0) ? "Yes" : "No");
1203  printf("UseTrackSelectionWithFilterBits: %s\n",fUseTrackSelectionWithFilterBits ? "Yes" : "No");
1204  printf("Reject kink: %s\n",fKinkReject ? "Yes" : "No");
1205  if(fOptPileup==1) printf(" -- Reject pileup event");
1206  if(fOptPileup==2) printf(" -- Reject tracks from pileup vtx");
1207  if(fUseCentrality>0) {
1208  TString estimator="";
1209  if(fUseCentrality==1) estimator = "V0";
1210  if(fUseCentrality==2) estimator = "Tracks";
1211  if(fUseCentrality==3) estimator = "Tracklets";
1212  if(fUseCentrality==4) estimator = "SPD clusters outer";
1213  printf("Centrality class considered: %.1f-%.1f, estimated with %s",fMinCentrality,fMaxCentrality,estimator.Data());
1214  }
1215  if(fIsCandTrackSPDFirst) printf("Check for candidates with pt < %2.2f, that daughters fullfill kFirst criteria\n",fMaxPtCandTrackSPDFirst);
1216 
1217  if(fVarNames){
1218  cout<<"Array of variables"<<endl;
1219  for(Int_t iv=0;iv<fnVars;iv++){
1220  cout<<fVarNames[iv]<<"\t";
1221  }
1222  cout<<endl;
1223  }
1224  if(fVarsForOpt){
1225  cout<<"Array of optimization"<<endl;
1226  for(Int_t iv=0;iv<fnVars;iv++){
1227  cout<<fVarsForOpt[iv]<<"\t";
1228  }
1229  cout<<endl;
1230  }
1231  if(fIsUpperCut){
1232  cout<<"Array of upper/lower cut"<<endl;
1233  for(Int_t iv=0;iv<fnVars;iv++){
1234  cout<<fIsUpperCut[iv]<<"\t";
1235  }
1236  cout<<endl;
1237  }
1238  if(fPtBinLimits){
1239  cout<<"Array of ptbin limits"<<endl;
1240  for(Int_t ib=0;ib<fnPtBinLimits;ib++){
1241  cout<<fPtBinLimits[ib]<<"\t";
1242  }
1243  cout<<endl;
1244  }
1245  if(fCutsRD){
1246  cout<<"Matrix of cuts"<<endl;
1247  for(Int_t iv=0;iv<fnVars;iv++){
1248  for(Int_t ib=0;ib<fnPtBins;ib++){
1249  cout<<"fCutsRD["<<iv<<"]["<<ib<<"] = "<<fCutsRD[GetGlobalIndex(iv,ib)]<<"\t";
1250  }
1251  cout<<endl;
1252  }
1253  cout<<endl;
1254  }
1255 
1256  if (fTrackCuts) {
1257  Float_t eta1=0, eta2=0; fTrackCuts->GetEtaRange(eta1,eta2);
1258  cout << " etaRange for Bachelor: [" << eta1 << "," << eta2 << "]\n";
1259  }
1260  if (fV0daughtersCuts) {
1261  Float_t eta3=0, eta4=0; fV0daughtersCuts->GetEtaRange(eta3,eta4);
1262  cout << " etaRange for V0daughters: [" << eta3 << "," << eta4 << "]\n";
1263  }
1264  return;
1265 
1266 }
1267 
1268 //-------------------------
1269 Bool_t AliRDHFCutsLctoV0::IsInFiducialAcceptance(Double_t pt, Double_t y) const
1270 {
1271  //
1272  //
1273  // Checking if Lc is in fiducial acceptance region
1274  //
1275  //
1276 
1277  if(fMaxRapidityCand>-998.){
1278  if(TMath::Abs(y) > fMaxRapidityCand) return kFALSE;
1279  else return kTRUE;
1280  }
1281 
1282  if(pt > 5.) {
1283  // applying cut for pt > 5 GeV
1284  AliDebug(2,Form("pt of Lambda_c = %f (> 5), cutting at |y| < 0.8",pt));
1285  if (TMath::Abs(y) > 0.8) return kFALSE;
1286 
1287  } else {
1288  // appliying smooth cut for pt < 5 GeV
1289  Double_t maxFiducialY = -0.2/15*pt*pt+1.9/15*pt+0.5;
1290  Double_t minFiducialY = 0.2/15*pt*pt-1.9/15*pt-0.5;
1291  AliDebug(2,Form("pt of Lambda_c = %f (< 5), cutting according to the fiducial zone [%f, %f]\n",pt,minFiducialY,maxFiducialY));
1292  if (y < minFiducialY || y > maxFiducialY) return kFALSE;
1293  }
1294  //
1295  return kTRUE;
1296 }
1297 //---------------------------------------------------------------------------
1299  //
1300  // Daughter tracks selection
1301  //
1302 
1304  if (!d) {
1305  AliDebug(2,"AliAODRecoCascadeHF null");
1306  return kFALSE;
1307  }
1308 
1309  if (!fTrackCuts) {
1310  AliFatal("Cut object is not defined for bachelor. Candidate accepted.");
1311  return kFALSE;
1312  }
1313 
1314  AliAODTrack * bachelorTrack = dynamic_cast<AliAODTrack*>(d->GetBachelor());
1315  if (!bachelorTrack) return kFALSE;
1316 
1318  if(!bachelorTrack->HasPointOnITSLayer(0)) return kFALSE;
1319  }
1320 
1321  if (fKinkReject != (!(fTrackCuts->GetAcceptKinkDaughters())) ) {
1322  AliError(Form("Not compatible setting: fKinkReject=%1d - fTrackCuts->GetAcceptKinkDaughters()=%1d",fKinkReject, fTrackCuts->GetAcceptKinkDaughters()));
1323  return kFALSE;
1324  }
1325 
1326  AliAODVertex *vAOD = d->GetPrimaryVtx();
1327  Double_t pos[3]; vAOD->GetXYZ(pos);
1328  Double_t cov[6]; vAOD->GetCovarianceMatrix(cov);
1329  const AliESDVertex vESD(pos,cov,100.,100);
1330 
1331  if (!IsDaughterSelected(bachelorTrack,&vESD,fTrackCuts)) return kFALSE;
1332 
1333  if (!fV0daughtersCuts) {
1334  AliFatal("Cut object is not defined for V0daughters. Candidate accepted.");
1335  return kFALSE;
1336  }
1337 
1338  AliAODv0 * v0 = dynamic_cast<AliAODv0*>(d->Getv0());
1339  if (!v0) return kFALSE;
1340  AliAODTrack *v0positiveTrack = dynamic_cast<AliAODTrack*>(d->Getv0PositiveTrack());
1341  if (!v0positiveTrack) return kFALSE;
1342  AliAODTrack *v0negativeTrack = dynamic_cast<AliAODTrack*>(d->Getv0NegativeTrack());
1343  if (!v0negativeTrack) return kFALSE;
1344 
1345 
1346  Float_t etaMin=0, etaMax=0; fV0daughtersCuts->GetEtaRange(etaMin,etaMax);
1347  if ( (v0positiveTrack->Eta()<=etaMin || v0positiveTrack->Eta()>=etaMax) ||
1348  (v0negativeTrack->Eta()<=etaMin || v0negativeTrack->Eta()>=etaMax) ) return kFALSE;
1349  Float_t ptMin=0, ptMax=0; fV0daughtersCuts->GetPtRange(ptMin,ptMax);
1350  if ( (v0positiveTrack->Pt()<=ptMin || v0positiveTrack->Pt()>=ptMax) ||
1351  (v0negativeTrack->Pt()<=ptMin || v0negativeTrack->Pt()>=ptMax) ) return kFALSE;
1352 
1353  // Condition on nTPCclusters
1354  if (fV0daughtersCuts->GetMinNClusterTPC()>0) {
1355  if ( ( ( v0positiveTrack->GetTPCClusterInfo(2,1) ) < fV0daughtersCuts->GetMinNClusterTPC() ) ||
1356  ( ( v0negativeTrack->GetTPCClusterInfo(2,1) ) < fV0daughtersCuts->GetMinNClusterTPC() ) ) return kFALSE;
1357  }
1358 
1359  // kTPCrefit status
1360  if (v0->GetOnFlyStatus()==kFALSE) { // only for offline V0s
1361  if (fV0daughtersCuts->GetRequireTPCRefit()) {
1362  if( !(v0positiveTrack->GetStatus() & AliESDtrack::kTPCrefit)) return kFALSE;
1363  if( !(v0negativeTrack->GetStatus() & AliESDtrack::kTPCrefit)) return kFALSE;
1364  }
1365  }
1366  // kink condition
1367  if (!fV0daughtersCuts->GetAcceptKinkDaughters()) {
1368  AliAODVertex *maybeKinkPos = (AliAODVertex*)v0positiveTrack->GetProdVertex();
1369  AliAODVertex *maybeKinkNeg = (AliAODVertex*)v0negativeTrack->GetProdVertex();
1370  if (maybeKinkPos->GetType()==AliAODVertex::kKink ||
1371  maybeKinkNeg->GetType()==AliAODVertex::kKink) return kFALSE;
1372  }
1373  // Findable clusters > 0 condition - from V0 analysis
1374  //if( v0positiveTrack->GetTPCNclsF()<=0 || v0negativeTrack->GetTPCNclsF()<=0 ) return kFALSE;
1375  /*
1376  Float_t lPosTrackCrossedRows = v0positiveTrack->GetTPCClusterInfo(2,1);
1377  Float_t lNegTrackCrossedRows = v0positiveTrack->GetTPCClusterInfo(2,1);
1378  fTreeVariableLeastNbrCrossedRows = (Int_t) lPosTrackCrossedRows;
1379  if( lNegTrackCrossedRows < fTreeVariableLeastNbrCrossedRows )
1380  fTreeVariableLeastNbrCrossedRows = (Int_t) lNegTrackCrossedRows;
1381  //Compute ratio Crossed Rows / Findable clusters
1382  //Note: above test avoids division by zero!
1383  Float_t lPosTrackCrossedRowsOverFindable = lPosTrackCrossedRows / ((double)(pTrack->GetTPCNclsF()));
1384  Float_t lNegTrackCrossedRowsOverFindable = lNegTrackCrossedRows / ((double)(nTrack->GetTPCNclsF()));
1385  fTreeVariableLeastRatioCrossedRowsOverFindable = lPosTrackCrossedRowsOverFindable;
1386  if( lNegTrackCrossedRowsOverFindable < fTreeVariableLeastRatioCrossedRowsOverFindable )
1387  fTreeVariableLeastRatioCrossedRowsOverFindable = lNegTrackCrossedRowsOverFindable;
1388  //Lowest Cut Level for Ratio Crossed Rows / Findable = 0.8, set here
1389  if ( fTreeVariableLeastRatioCrossedRowsOverFindable < 0.8 ) return kFALSE;
1390  */
1391 
1392  return kTRUE;
1393 
1394 }
1395 
Int_t IsSelectedSingleCut(TObject *obj, Int_t selectionLevel, Int_t cutIndex)
AliESDtrackCuts * fV0daughtersCuts
virtual void SetStandardCutsPbPb2010()
virtual Int_t IsSelected(TObject *obj, Int_t selectionLevel)
ClassImp(AliAnalysisTaskTriggerRates) AliAnalysisTaskTriggerRates
Double_t fMaxPtCandTrackSPDFirst
flag to select the track kFirst criteria for pt < ptlimit
Definition: AliRDHFCuts.h:414
Int_t GetNVars() const
Definition: AliRDHFCuts.h:234
void SetAsym(Bool_t asym)
Definition: AliAODPidHF.h:88
AliRDHFCutsLctoV0(const char *name="CutsLctoV0", Short_t v0channel=0)
Int_t GetnSigmaTOF(AliAODTrack *track, Int_t species, Double_t &sigma) const
Bool_t * fIsUpperCut
Definition: AliRDHFCuts.h:387
virtual void SetStandardCutsPP2010()
Bool_t fRemoveDaughtersFromPrimary
Definition: AliRDHFCuts.h:393
AliAODTrack * Getv0NegativeTrack() const
Int_t GetnSigmaTPC(AliAODTrack *track, Int_t species, Double_t &sigma) const
Bool_t CheckTOFPIDStatus(AliAODTrack *track) const
Float_t * fPtBinLimits
"number of limits", that is fnPtBins+1
Definition: AliRDHFCuts.h:380
AliAODv0 * Getv0() const
virtual void SetStandardCutsPbPb2011()
Int_t fMinVtxContr
0: not cut; 1: SPDZ; 2: SPD3D; 3: Tracks
Definition: AliRDHFCuts.h:368
Double_t InvMassLctoLambdaPi() const
Float_t fMaxVtxRedChi2
minimum vertex contributors
Definition: AliRDHFCuts.h:369
Int_t CombineCuts(Int_t returnvalueTrack, Int_t returnvalue, Int_t returnvaluePID) const
const Float_t * GetCuts() const
Definition: AliRDHFCuts.h:238
Float_t fV0Type
cuts for v0 daughters (AOD converted to ESD on the flight!)
void SetNVars(Int_t nVars)
Definition: AliRDHFCuts.h:361
Bool_t AreLctoV0DaughtersSelected(AliAODRecoDecayHF *rd) const
Int_t fMinVtxType
cuts on the event
Definition: AliRDHFCuts.h:367
Double_t fMaxRapidityCand
minimum pt of the candidate
Definition: AliRDHFCuts.h:411
void EnableSemiCentralTrigger()
Definition: AliRDHFCuts.h:93
AliRDHFCutsLctoV0 & operator=(const AliRDHFCutsLctoV0 &source)
TString * GetVarNames() const
Definition: AliRDHFCuts.h:235
Double_t ptMin
Int_t ApplyPidTPCRaw(AliAODTrack *track, Int_t specie) const
void SetGlobalIndex()
Definition: AliRDHFCuts.h:196
AliRDHFCuts & operator=(const AliRDHFCuts &source)
Int_t fUseCentrality
min deltaz between main and pileup vertices
Definition: AliRDHFCuts.h:399
Bool_t fUsePID
Definition: AliRDHFCuts.h:388
void SetPidHF(AliAODPidHF *pidObj)
see enum below
Definition: AliRDHFCuts.h:210
Double_t InvMassLctoK0sP() const
Bool_t GetOldPid()
Definition: AliAODPidHF.h:157
void SetTOF(Bool_t tof)
Definition: AliAODPidHF.h:95
AliAODTrack * Getv0PositiveTrack() const
virtual void GetCutVarsForOpt(AliAODRecoDecayHF *d, Float_t *vars, Int_t nvars, Int_t *pdgdaughters)
Bool_t fUseTrackSelectionWithFilterBits
flag to reject kink daughters
Definition: AliRDHFCuts.h:421
void SetCuts(Int_t nVars, Int_t nPtBins, Float_t **cutsRD)
Int_t fnVarsForOpt
Definition: AliRDHFCuts.h:383
void ResetMaskAndEnableMBTrigger()
Definition: AliRDHFCuts.h:73
TString * fVarNames
number of cut vars for candidates
Definition: AliRDHFCuts.h:382
AliESDtrackCuts * fTrackCuts
quality cuts on the daughter tracks
Definition: AliRDHFCuts.h:376
void AddTrackCutsV0daughters(AliESDtrackCuts *v0daug)
Float_t fLowPtCut
high pT cut separation for proton identification
Bool_t IsDaughterSelected(AliAODTrack *track, const AliESDVertex *primary, AliESDtrackCuts *cuts) const
AliAODTrack * GetBachelor() const
Int_t fOptPileup
use Physics selection criteria
Definition: AliRDHFCuts.h:396
Bool_t IsExcluded(AliAODTrack *track, Int_t labelTrack, Double_t nsigmaCut, TString detector)
virtual void PrintAll() const
Float_t fMinCentrality
Definition: AliRDHFCuts.h:404
Int_t fnPtBinLimits
number of pt bins for cuts
Definition: AliRDHFCuts.h:379
void SetSigma(Double_t *sigma)
Definition: AliAODPidHF.h:39
Float_t * fCutsRD
fnVars*fnPtBins
Definition: AliRDHFCuts.h:386
Double_t CosV0PointingAngle() const
Int_t ApplyPidTOFRaw(AliAODTrack *track, Int_t specie) const
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
void EnableCentralTrigger()
Definition: AliRDHFCuts.h:81
Int_t fMinSPDMultiplicity
maximum |z| of primary vertex
Definition: AliRDHFCuts.h:371
void SetUsePID(Bool_t flag=kTRUE)
Definition: AliRDHFCuts.h:204
Int_t fExcludedCut
low pT cut separation for proton identification
Bool_t fIsCandTrackSPDFirst
IsSelected returns always kTRUE for MC signal.
Definition: AliRDHFCuts.h:413
void SetPtBins(Int_t nPtBinLimits, Float_t *ptBinLimits)
Bool_t fKinkReject
cut on zSPD vertex to remove outliers in centrality vs. tracklets (0=no cut, 1= cut at 12 cm...
Definition: AliRDHFCuts.h:420
Bool_t fUsePhysicsSelection
use MC primary vertex
Definition: AliRDHFCuts.h:395
void SetTOFdecide(Bool_t tOFdecide)
Definition: AliAODPidHF.h:107
void SetMatch(Int_t match)
Definition: AliAODPidHF.h:98
AliAODVertex * GetPrimaryVtx() const
void AddTrackCuts(const AliESDtrackCuts *cuts)
Definition: AliRDHFCuts.h:202
void SetTPC(Bool_t tpc)
Definition: AliAODPidHF.h:94
Int_t fnPtBins
cuts on the candidate
Definition: AliRDHFCuts.h:378
Float_t fHighPtCut
V0 type – should be defined as in AliRDHFCuts.h.
Double_t ptMax
void SetTriggerClass(TString trclass0, TString trclass1="")
Definition: AliRDHFCuts.h:192
AliAODPidHF * fPidHF
enable AOD049 centrality cleanup
Definition: AliRDHFCuts.h:390
virtual Bool_t IsInFiducialAcceptance(Double_t pt, Double_t y) const
Int_t PtBin(Double_t pt) const
void CheckPID(AliAODTrack *bachelor, AliAODTrack *, AliAODTrack *, Bool_t &isBachelorID1, Bool_t &isBachelorID2, Bool_t &isBachelorID4)
Int_t GetGlobalIndex(Int_t iVar, Int_t iPtBin) const
Int_t nptbins
Float_t fMaxCentrality
minimum centrality for selected events
Definition: AliRDHFCuts.h:405
virtual Int_t IsSelectedPID(AliAODRecoDecayHF *obj)
Int_t fnVars
Definition: AliRDHFCuts.h:381