AliPhysics  96f6795 (96f6795)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 fMinCombinedProbability(0)
61 {
62  //
63  // Default Constructor
64  //
65 
66  const Int_t nvars=21;
67  SetNVars(nvars);
68  TString varNames[nvars]={"Lc inv. mass if K0S [GeV/c2]", // 0
69  "Lc inv. mass if Lambda [GeV/c2]", // 1
70  "K0S inv. mass [GeV/c2]", // 2
71  "Lambda/LambdaBar inv. mass[GeV/c2]", // 3
72  "pT min bachelor track [GeV/c]", // 4
73  "pT min V0-positive track [GeV/c]", // 5
74  "pT min V0-negative track [GeV/c]", // 6
75  "dca cascade (prong-to-prong) cut [cm]", // 7
76  "dca V0 (prong-to-prong) cut [number of sigmas]", // 8
77  "V0 cosPA min wrt PV", // 9
78  "d0 max bachelor wrt PV [cm]", // 10
79  "d0 max V0 wrt PV [cm]", // 11
80  "mass K0S veto [GeV/c2]", // 12
81  "mass Lambda/LambdaBar veto [GeV/c2]", // 13
82  "mass Gamma veto [GeV/c2]", // 14
83  "pT min V0 track [GeV/c]", // 15
84  "Max Proton emission angle in Lc CMS", // 16
85  "Min Proton emission angle in Lc CMS", // 17
86  "Resigned d0", // 18
87  "V0 qT/|alpha|", // 19
88  "V0 type" // 20
89  };
90 
91  Bool_t isUpperCut[nvars]={kTRUE, // 0
92  kTRUE, // 1
93  kTRUE, // 2
94  kTRUE, // 3
95  kFALSE, // 4
96  kFALSE, // 5
97  kFALSE, // 6
98  kTRUE, // 7
99  kTRUE, // 8
100  kFALSE, // 9
101  kTRUE, // 10
102  kTRUE, // 11
103  kFALSE, // 12
104  kFALSE, // 13
105  kFALSE, // 14
106  kFALSE, // 15
107  kTRUE, // 16
108  kFALSE, // 17
109  kFALSE, // 18
110  kFALSE, // 19
111  kFALSE // 20
112  };
113  SetVarNames(nvars,varNames,isUpperCut);
114  Bool_t forOpt[nvars]={kFALSE, // 0
115  kFALSE, // 1
116  kTRUE, // 2
117  kTRUE, // 3
118  kTRUE, // 4
119  kTRUE, // 5
120  kTRUE, // 6
121  kTRUE, // 7
122  kTRUE, // 8
123  kTRUE, // 9
124  kTRUE, // 10
125  kTRUE, // 11
126  kTRUE, // 12
127  kTRUE, // 13
128  kTRUE, // 14
129  kTRUE, // 15
130  kTRUE, // 16
131  kTRUE, // 17
132  kTRUE, // 18
133  kTRUE, // 19
134  kFALSE // 20
135  };
136  SetVarsForOpt(nvars,forOpt);
137 
138  Float_t limits[2]={0,999999999.};
139  SetPtBins(2,limits);
140 
141  /*
142  switch (v0channel) {
143  case 0:
144  fV0channel = 0x0001;
145  break;
146  case 1:
147  fV0channel = 0x0002;
148  break;
149  case 2:
150  fV0channel = 0x0004;
151  break;
152  }
153  */
154 
155 }
156 //--------------------------------------------------------------------------
158  AliRDHFCuts(source),
159  fPidSelectionFlag(source.fPidSelectionFlag),
160  fV0daughtersCuts(0),
161  fV0Type(source.fV0Type),
162  fHighPtCut(source.fHighPtCut),
163  fLowPtCut(source.fLowPtCut),
164  fExcludedCut(source.fExcludedCut),
165  fMinCombinedProbability(0)
166 {
167  //
168  // Copy constructor
169  //
170 
172  else fV0daughtersCuts = new AliESDtrackCuts();
173 
175 
176 }
177 //--------------------------------------------------------------------------
179 {
180  //
181  // assignment operator
182  //
183 
184  if (this != &source) {
185 
186  AliRDHFCuts::operator=(source);
188 
189  delete fV0daughtersCuts;
190  fV0daughtersCuts = new AliESDtrackCuts(*(source.fV0daughtersCuts));
191 
192  fV0Type = source.fV0Type;
193 
194  fHighPtCut = source.fHighPtCut;
195  fLowPtCut = source.fLowPtCut;
196 
198 
199  }
200 
201  return *this;
202 }
203 
204 
205 //---------------------------------------------------------------------------
207  //
208  // Default Destructor
209  //
210 
211  if (fV0daughtersCuts) {
212  delete fV0daughtersCuts;
214  }
215 
217  delete [] fMinCombinedProbability;
219  }
220 
221 }
222 
223 //---------------------------------------------------------------------------
225  //
226  // Fills in vars the values of the variables
227  //
228 
229  if (pdgdaughters[0]==-9999) return; // dummy
230 
231  if (nvars!=fnVarsForOpt) {
232  printf("AliRDHFCutsLctoV0::GetCutVarsForOpt: wrong number of variables\n");
233  return;
234  }
235 
236  Double_t mLcPDG = TDatabasePDG::Instance()->GetParticle(4122)->Mass();
237  Double_t mk0sPDG = TDatabasePDG::Instance()->GetParticle(310)->Mass();
238  Double_t mLPDG = TDatabasePDG::Instance()->GetParticle(3122)->Mass();
239 
241 
242  // Get the v0 and all daughter tracks
243  AliAODTrack *bachelorTrack = (AliAODTrack*)dd->GetBachelor();
244  AliAODv0 *v0 = (AliAODv0*)dd->Getv0();
245  AliAODTrack *v0positiveTrack = (AliAODTrack*)dd->Getv0PositiveTrack();
246  AliAODTrack *v0negativeTrack = (AliAODTrack*)dd->Getv0NegativeTrack();
247 
248  Int_t iter=-1;
249  // cut on cascade mass, if K0S + p
250  if (fVarsForOpt[0]) {
251  iter++;
252  vars[iter]=TMath::Abs(dd->InvMassLctoK0sP()-mLcPDG);
253  }
254  // cut on cascade mass, if Lambda/LambdaBar + pi
255  if (fVarsForOpt[1]) {
256  iter++;
257  vars[iter]=TMath::Abs(dd->InvMassLctoLambdaPi()-mLcPDG);
258  }
259 
260  // cut on V0 mass if K0S
261  if (fVarsForOpt[2]) {
262  iter++;
263  vars[iter]=TMath::Abs(v0->MassK0Short()-mk0sPDG);
264  }
265 
266  // cut on V0 mass if Lambda/LambdaBar
267  if (fVarsForOpt[3]) {
268 
269  if (bachelorTrack->Charge()==1) {
270  iter++;
271  vars[iter]=TMath::Abs(v0->MassLambda()-mLPDG);
272  } else if (bachelorTrack->Charge()==-1) {
273  iter++;
274  vars[iter]=TMath::Abs(v0->MassAntiLambda()-mLPDG);
275  }
276 
277  }
278 
279  // cut bachelor min pt
280  if (fVarsForOpt[4]) {
281  iter++;
282  vars[iter]=bachelorTrack->Pt();
283  }
284 
285  // cut on V0-positive min pt
286  if (fVarsForOpt[5]) {
287  iter++;
288  vars[iter]=v0positiveTrack->Pt();
289  }
290 
291  // cut on V0-negative min pt
292  if (fVarsForOpt[6]) {
293  iter++;
294  vars[iter]=v0negativeTrack->Pt();
295  }
296 
297  // cut on cascade dca (prong-to-prong)
298  if (fVarsForOpt[7]) {
299  iter++;
300  vars[iter]=dd->GetDCA(); // prong-to-prong cascade DCA
301  }
302 
303  // cut on V0 dca (prong-to-prong)
304  if (fVarsForOpt[8]) {
305  iter++;
306  vars[iter]=v0->GetDCA(); // prong-to-prong V0 DCA
307  }
308 
309  // cut on V0 cosPA wrt PV
310  if (fVarsForOpt[9]) {
311  iter++;
312  vars[iter]=dd->CosV0PointingAngle(); // cosine of V0 pointing angle wrt primary vertex
313  }
314 
315  // cut on bachelor transverse impact parameter wrt PV
316  if (fVarsForOpt[10]) {
317  iter++;
318  vars[iter]=dd->Getd0Prong(0); // bachelor transverse impact parameter wrt primary vertex
319  }
320 
321  // cut on V0 transverse impact parameter wrt PV
322  if (fVarsForOpt[11]) {
323  iter++;
324  vars[iter]=dd->Getd0Prong(1); // V0 transverse impact parameter wrt primary vertex
325  }
326 
327  // cut on K0S invariant mass veto
328  if (fVarsForOpt[12]) {
329  iter++;
330  vars[iter]=TMath::Abs(v0->MassK0Short()-mk0sPDG); // K0S invariant mass veto
331  }
332 
333  // cut on Lambda/LambdaBar invariant mass veto
334  if (fVarsForOpt[13]) {
335 
336  if (bachelorTrack->Charge()==1) {
337  iter++;
338  vars[iter]=TMath::Abs(v0->MassLambda()-mLPDG);
339  } else if (bachelorTrack->Charge()==-1) {
340  iter++;
341  vars[iter]=TMath::Abs(v0->MassAntiLambda()-mLPDG);
342  }
343 
344  }
345 
346  // cut on gamma invariant mass veto
347  if (fVarsForOpt[14]) {
348  iter++;
349  vars[iter]= v0->InvMass2Prongs(0,1,11,11); // gamma invariant mass veto
350  }
351 
352 
353  // cut on V0 pT min
354  if (fVarsForOpt[15]) {
355  iter++;
356  vars[iter]= v0->Pt(); // V0 pT min
357  }
358 
359  // cut on proton emission angle
360  if (fVarsForOpt[16]) {
361  iter++;
362  vars[iter]= d->CosThetaStar(0,4122,2212,310); //CosPrThetaCMS
363 
364  }
365 
366  // cut on proton emission angle
367  if (fVarsForOpt[17]) {
368  iter++;
369  vars[iter]= d->CosThetaStar(0,4122,2212,310); //CosPrThetaCMS
370  }
371 
372  // cut on re-signed d0
373  if (fVarsForOpt[18]) {
374  iter++;
375  vars[iter]= -9999;
376  }
377 
378  // cut on Armenteros qT/|alpha|
379  if (fVarsForOpt[19]) {
380  iter++;
381  vars[iter]= v0->PtArmV0()/TMath::Abs(v0->AlphaV0());
382  }
383 
384 
385  return;
386 }
387 //---------------------------------------------------------------------------
389  //
390  // Apply selection
391  //
392 
393  if (!fCutsRD) {
394  AliFatal("Cut matrice not inizialized. Exit...");
395  return 0;
396  }
397 
399  if (!d) {
400  AliDebug(2,"AliAODRecoCascadeHF null");
401  return 0;
402  }
403 
404  Double_t pt=d->Pt();
405  if(pt<fMinPtCand) return 0;
406  if(pt>fMaxPtCand) return 0;
407 
408  if (!d->GetSecondaryVtx()) {
409  AliDebug(2,"No secondary vertex for cascade");
410  return 0;
411  }
412 
413  if (d->GetNDaughters()!=2) {
414  AliDebug(2,Form("No 2 daughters for current cascade (nDaughters=%d)",d->GetNDaughters()));
415  return 0;
416  }
417 
418  AliAODv0 * v0 = dynamic_cast<AliAODv0*>(d->Getv0());
419 
420  if ( v0 && ((v0->GetOnFlyStatus() == kTRUE && GetV0Type() == AliRDHFCuts::kOnlyOfflineV0s) ||
421  (v0->GetOnFlyStatus() == kFALSE && GetV0Type() == AliRDHFCuts::kOnlyOnTheFlyV0s)) ) return 0;
422 
423  AliAODTrack * bachelorTrack = dynamic_cast<AliAODTrack*>(d->GetBachelor());
424  if (!v0 || !bachelorTrack) {
425  AliDebug(2,"No V0 or no bachelor for current cascade");
426  return 0;
427  }
428 
429  if (bachelorTrack->GetID()<0) {
430  AliDebug(2,Form("Bachelor has negative ID %d",bachelorTrack->GetID()));
431  return 0;
432  }
433 
434  if (!v0->GetSecondaryVtx()) {
435  AliDebug(2,"No secondary vertex for V0 by cascade");
436  return 0;
437  }
438 
439  if (v0->GetNDaughters()!=2) {
440  AliDebug(2,Form("No 2 daughters for V0 of current cascade (onTheFly=%d, nDaughters=%d)",v0->GetOnFlyStatus(),v0->GetNDaughters()));
441  return 0;
442  }
443 
444 
445  // Get the V0 daughter tracks
446  AliAODTrack *v0positiveTrack = dynamic_cast<AliAODTrack*>(d->Getv0PositiveTrack());
447  AliAODTrack *v0negativeTrack = dynamic_cast<AliAODTrack*>(d->Getv0NegativeTrack());
448  if (!v0positiveTrack || !v0negativeTrack ) {
449  AliDebug(2,"No V0 daughters' objects");
450  return 0;
451  }
452 
453  if (v0positiveTrack->GetID()<0 || v0negativeTrack->GetID()<0) {
454  AliDebug(2,Form("At least one of V0 daughters has negative ID %d %d",v0positiveTrack->GetID(),v0negativeTrack->GetID()));
455  return 0;
456  }
457 
458  //if(fUseTrackSelectionWithFilterBits && d->HasBadDaughters()) return 0;
459  if ( fUseTrackSelectionWithFilterBits && !(bachelorTrack->TestFilterMask(BIT(4))) ) {
460  AliDebug(2,"Check on the bachelor FilterBit: no BIT(4). Candidate rejected.");
461  return 0;
462  }
463 
464  Int_t returnvalueTrack = 7;
465 
466  // selection on daughter tracks
467  if (selectionLevel==AliRDHFCuts::kAll ||
468  selectionLevel==AliRDHFCuts::kTracks) {
469 
470  if (!AreLctoV0DaughtersSelected(d,aod)) return 0;
471 
472  }
473 
474  Bool_t okLck0sp=kTRUE, okLcLpi=kTRUE, okLcLBarpi=kTRUE;
475 
476  // selection on candidate
477  if (selectionLevel==AliRDHFCuts::kAll ||
478  selectionLevel==AliRDHFCuts::kCandidate) {
479 
480  Double_t pt = d->Pt();
481  Int_t ptbin = PtBin(pt);
482 
483  Double_t mLcPDG = TDatabasePDG::Instance()->GetParticle(4122)->Mass();
484  Double_t mk0sPDG = TDatabasePDG::Instance()->GetParticle(310)->Mass();
485  Double_t mLPDG = TDatabasePDG::Instance()->GetParticle(3122)->Mass();
486 
487  // K0S + p
488  Double_t mk0s = v0->MassK0Short();
489  Double_t mLck0sp = d->InvMassLctoK0sP();
490 
491  // Lambda + pi
492  Double_t mlambda = v0->MassLambda();
493  Double_t malambda = v0->MassAntiLambda();
494  Double_t mLcLpi = d->InvMassLctoLambdaPi();
495 
496  Bool_t okK0spipi=kTRUE, okLppi=kTRUE, okLBarpip=kTRUE;
497  Bool_t isNotK0S = kTRUE, isNotLambda = kTRUE, isNotLambdaBar = kTRUE, isNotGamma = kTRUE;
498 
499  // cut on Lc mass with K0S+p hypothesis
500  if (TMath::Abs(mLck0sp-mLcPDG) > fCutsRD[GetGlobalIndex(0,ptbin)] && fExcludedCut!=0) {
501  okLck0sp = kFALSE;
502  AliDebug(4,Form(" cascade mass is %2.2e and does not correspond to Lambda_c into K0S+p cut",mLck0sp));
503  }
504 
505  // cuts on the V0 mass: K0S case
506  if (TMath::Abs(mk0s-mk0sPDG) > fCutsRD[GetGlobalIndex(2,ptbin)] && fExcludedCut!=2) {
507  okK0spipi = kFALSE;
508  AliDebug(4,Form(" V0 mass is %2.2e and does not correspond to K0S cut",mk0s));
509  }
510 
511  // cut on Lc mass with Lambda+pi hypothesis
512  if (TMath::Abs(mLcLpi-mLcPDG) > fCutsRD[GetGlobalIndex(1,ptbin)] && fExcludedCut!=1) {
513  okLcLpi = kFALSE;
514  okLcLBarpi = kFALSE;
515  AliDebug(4,Form(" cascade mass is %2.2e and does not correspond to Lambda_c into Lambda+pi cut",mLcLpi));
516  }
517 
518  // cuts on the V0 mass: Lambda/LambdaBar case
519  //if ( !(bachelorTrack->Charge()==+1 && TMath::Abs(mlambda-mLPDG) <= fCutsRD[GetGlobalIndex(3,ptbin)] ) ) {
520  if ( TMath::Abs(mlambda-mLPDG) > fCutsRD[GetGlobalIndex(3,ptbin)] && fExcludedCut!=3) {
521  okLppi = kFALSE;
522  AliDebug(4,Form(" V0 mass is %2.2e and does not correspond to LambdaBar cut",mlambda));
523  }
524 
525  //if ( !(bachelorTrack->Charge()==-1 && TMath::Abs(malambda-mLPDG) <= fCutsRD[GetGlobalIndex(3,ptbin)] ) ) {
526  if ( TMath::Abs(malambda-mLPDG) > fCutsRD[GetGlobalIndex(3,ptbin)] && fExcludedCut!=3) {
527  okLBarpip = kFALSE;
528  AliDebug(4,Form(" V0 mass is %2.2e and does not correspond to LambdaBar cut",malambda));
529  }
530 
531  // cut on K0S invariant mass veto
532  if (TMath::Abs(v0->MassK0Short()-mk0sPDG) < fCutsRD[GetGlobalIndex(12,ptbin)] && fExcludedCut!=12) { // K0S invariant mass veto
533  AliDebug(4,Form(" veto on K0S invariant mass doesn't pass the cut"));
534  //return 0;
535  isNotK0S=kFALSE;
536  }
537 
538  // cut on Lambda/LambdaBar invariant mass veto
539  if (TMath::Abs(v0->MassLambda()-mLPDG) < fCutsRD[GetGlobalIndex(13,ptbin)] && fExcludedCut!=13) { // Lambda invariant mass veto
540  AliDebug(4,Form(" veto on Lambda invariant mass doesn't pass the cut"));
541  isNotLambda=kFALSE;
542  //return 0;
543  }
544  if (TMath::Abs(v0->MassAntiLambda()-mLPDG) < fCutsRD[GetGlobalIndex(13,ptbin)] && fExcludedCut!=13) { // LambdaBar invariant mass veto
545  AliDebug(4,Form(" veto on LambdaBar invariant mass doesn't pass the cut"));
546  isNotLambdaBar=kFALSE;
547  //return 0;
548  }
549 
550  // cut on gamma invariant mass veto
551  if (v0->InvMass2Prongs(0,1,11,11) < fCutsRD[GetGlobalIndex(14,ptbin)] && fExcludedCut!=14) { // K0S invariant mass veto
552  AliDebug(4,Form(" veto on gamma invariant mass doesn't pass the cut"));
553  isNotGamma=kFALSE;
554  //return 0;
555  }
556 
557  okLck0sp = okLck0sp && okK0spipi && isNotLambda && isNotLambdaBar && isNotGamma;
558  okLcLpi = okLcLpi && okLppi && isNotK0S && isNotLambdaBar && isNotGamma;
559  okLcLBarpi = okLcLBarpi && okLBarpip && isNotK0S && isNotLambda && isNotGamma;
560 
561  if (!okLck0sp && !okLcLpi && !okLcLBarpi) return 0;
562 
563  // cuts on the minimum pt of the tracks
564  if (TMath::Abs(bachelorTrack->Pt()) < fCutsRD[GetGlobalIndex(4,ptbin)] && fExcludedCut!=4) {
565  AliDebug(4,Form(" bachelor track Pt=%2.2e > %2.2e",bachelorTrack->Pt(),fCutsRD[GetGlobalIndex(4,ptbin)]));
566  return 0;
567  }
568  if (TMath::Abs(v0positiveTrack->Pt()) < fCutsRD[GetGlobalIndex(5,ptbin)] && fExcludedCut!=5) {
569  AliDebug(4,Form(" V0-positive track Pt=%2.2e > %2.2e",v0positiveTrack->Pt(),fCutsRD[GetGlobalIndex(5,ptbin)]));
570  return 0;
571  }
572  if (TMath::Abs(v0negativeTrack->Pt()) < fCutsRD[GetGlobalIndex(6,ptbin)] && fExcludedCut!=6) {
573  AliDebug(4,Form(" V0-negative track Pt=%2.2e > %2.2e",v0negativeTrack->Pt(),fCutsRD[GetGlobalIndex(6,ptbin)]));
574  return 0;
575  }
576 
577  // cut on cascade dca (prong-to-prong)
578  if ( TMath::Abs(d->GetDCA()) > fCutsRD[GetGlobalIndex(7,ptbin)] && fExcludedCut!=7) { // prong-to-prong cascade DCA
579  AliDebug(4,Form(" cascade tracks DCA don't pass the cut"));
580  return 0;
581  }
582 
583  // cut on V0 dca (prong-to-prong)
584  if ( TMath::Abs(v0->GetDCA()) > fCutsRD[GetGlobalIndex(8,ptbin)] && fExcludedCut!=8) { // prong-to-prong V0 DCA
585  AliDebug(4,Form(" V0 DCA don't pass the cut"));
586  return 0;
587  }
588 
589  // cut on V0 cosine of pointing angle wrt PV
590  if (d->CosV0PointingAngle() < fCutsRD[GetGlobalIndex(9,ptbin)] && fExcludedCut!=9) { // cosine of V0 pointing angle wrt primary vertex
591  AliDebug(4,Form(" V0 cosine of pointing angle doesn't pass the cut"));
592  return 0;
593  }
594 
595  // cut on bachelor transverse impact parameter wrt PV
596  if (TMath::Abs(d->Getd0Prong(0)) > fCutsRD[GetGlobalIndex(10,ptbin)] && fExcludedCut!=10) { // bachelor transverse impact parameter wrt PV
597  AliDebug(4,Form(" bachelor transverse impact parameter doesn't pass the cut"));
598  return 0;
599  }
600 
601  // cut on V0 transverse impact parameter wrt PV
602  if (TMath::Abs(d->Getd0Prong(1)) > fCutsRD[GetGlobalIndex(11,ptbin)] && fExcludedCut!=11) { // V0 transverse impact parameter wrt PV
603  AliDebug(4,Form(" V0 transverse impact parameter doesn't pass the cut"));
604  return 0;
605  }
606 
607  // cut on V0 pT min
608  if (v0->Pt() < fCutsRD[GetGlobalIndex(15,ptbin)] && fExcludedCut!=15) { // V0 pT min
609  AliDebug(4,Form(" V0 track Pt=%2.2e > %2.2e",v0->Pt(),fCutsRD[GetGlobalIndex(15,ptbin)]));
610  return 0;
611  }
612 
613  // cut on Proton emission angle
614  if(TMath::Abs(fCutsRD[GetGlobalIndex(16,ptbin)])<1.1 || TMath::Abs(fCutsRD[GetGlobalIndex(17,ptbin)])<1.1){
615  Double_t cutvar = d->CosThetaStar(0,4122,2212,310);
616  if (cutvar > fCutsRD[GetGlobalIndex(16,ptbin)] && fExcludedCut!=16 && fExcludedCut!=17) { // Proton emission angle
617  AliDebug(4,Form(" Cos proton emission=%2.2e < %2.2e",cutvar,fCutsRD[GetGlobalIndex(16,ptbin)]));
618  return 0;
619  }
620  if (cutvar < fCutsRD[GetGlobalIndex(17,ptbin)] && fExcludedCut!=16 && fExcludedCut!=17) { // Proton emission angle
621  AliDebug(4,Form(" Cos proton emission=%2.2e > %2.2e",cutvar,fCutsRD[GetGlobalIndex(17,ptbin)]));
622  return 0;
623  }
624  }
625 
626  // cut on proton re-signed d0
627  if(TMath::Abs(fCutsRD[GetGlobalIndex(18,ptbin)])<0.2){
628  Double_t cutvar = GetReSignedd0(d) ;
629  if (cutvar< fCutsRD[GetGlobalIndex(18,ptbin)] && fExcludedCut!=18) { // proton d0
630  AliDebug(4,Form(" Proton d0 (re-signed)=%2.2e > %2.2e",cutvar,fCutsRD[GetGlobalIndex(18,ptbin)]));
631  return 0;
632  }
633  }
634 
635  // cut on Armenteros qT/|alpha|
636  if(TMath::Abs(fCutsRD[GetGlobalIndex(19,ptbin)])<0.3){
637  Double_t cutvar = v0->PtArmV0()/TMath::Abs(v0->AlphaV0());
638  if (cutvar < fCutsRD[GetGlobalIndex(19,ptbin)] && fExcludedCut!=19) { // v0 armenteros variable
639  AliDebug(4,Form(" qT/|alpha|=%2.2e > %2.2e",cutvar,fCutsRD[GetGlobalIndex(19,ptbin)]));
640  return 0;
641  }
642  }
643 
644  }
645 
646  Int_t returnvalue = okLck0sp+2*okLcLBarpi+4*okLcLpi;
647  /*
648  retvalue case
649  1 Lc->K0S + p
650  2 Lc->LambdaBar + pi
651  3 Lc->K0S + p AND Lc->LambdaBar + pi
652  4 Lc->Lambda + pi
653  5 Lc->K0S + p AND Lc->Lambda + pi
654  6 Lc->LambdaBar + pi AND Lc->Lambda + pi
655  7 Lc->K0S + p AND Lc->LambdaBar + pi AND Lc->Lambda + pi
656  */
657 
658  Int_t returnvaluePID = 7;
659 
660  // selection on candidate
661  if (selectionLevel==AliRDHFCuts::kAll ||
662  selectionLevel==AliRDHFCuts::kCandidate ||
663  selectionLevel==AliRDHFCuts::kPID )
664  returnvaluePID = IsSelectedPID(d);
665 
666  //if (fUsePID && returnvaluePID==0) return 0;
667 
668  Int_t returnvalueTot = 0;
669  if ( fUsePID )
670  returnvalueTot = CombineCuts(returnvalueTrack,returnvalue,returnvaluePID);
671  else
672  returnvalueTot = CombineCuts(returnvalueTrack,returnvalue,7);
673 
674  return returnvalueTot;
675 
676 }
677 //---------------------------------------------------------------------------
678 Bool_t AliRDHFCutsLctoV0::PreSelect(TObject* obj, AliAODv0 *v0, AliVTrack *bachelorTrack){
679  //
680  // Apply pre-selections, used in the AOD filtering
681  //
682 
683  if (!fCutsRD) {
684  AliFatal("Cut matrix not inizialized. Exit...");
685  return 0;
686  }
687 
689  if (!d) {
690  AliDebug(2,"AliAODRecoCascadeHF null");
691  return 0;
692  }
693 
694  Double_t pt = d->Pt();
695  Int_t ptbin = PtBin(pt);
696 
697  if ( v0 && ((v0->GetOnFlyStatus() == kTRUE && GetV0Type() == AliRDHFCuts::kOnlyOfflineV0s) ||
698  (v0->GetOnFlyStatus() == kFALSE && GetV0Type() == AliRDHFCuts::kOnlyOnTheFlyV0s)) ) return 0;
699 
700  // cut on V0 pT min
701  if (v0->Pt() < fCutsRD[GetGlobalIndex(15,ptbin)]) return 0;
702 
703  // cuts on the minimum pt of the bachelor
704  if (TMath::Abs(bachelorTrack->Pt()) < fCutsRD[GetGlobalIndex(4,ptbin)]) return 0;
705 
706  Double_t mLcPDG = TDatabasePDG::Instance()->GetParticle(4122)->Mass();
707  Double_t mk0sPDG = TDatabasePDG::Instance()->GetParticle(310)->Mass();
708  Double_t mLPDG = TDatabasePDG::Instance()->GetParticle(3122)->Mass();
709 
710  // K0S + p
711  Double_t mk0s = v0->MassK0Short();
712  Double_t mLck0sp = d->InvMassLctoK0sP();
713 
714  // Lambda + pi
715  Double_t mlambda = v0->MassLambda();
716  Double_t malambda = v0->MassAntiLambda();
717  Double_t mLcLpi = d->InvMassLctoLambdaPi();
718 
719  Bool_t okLck0sp=kTRUE, okLcLpi=kTRUE, okLcLBarpi=kTRUE;
720  Bool_t okK0spipi=kTRUE, okLppi=kTRUE, okLBarpip=kTRUE;
721  Bool_t isNotK0S = kTRUE, isNotLambda = kTRUE, isNotLambdaBar = kTRUE, isNotGamma = kTRUE;
722 
723  // cut on Lc mass with K0S+p hypothesis
724  if (TMath::Abs(mLck0sp-mLcPDG) > fCutsRD[GetGlobalIndex(0,ptbin)]) okLck0sp = kFALSE;
725  // cuts on the V0 mass: K0S case
726  if (TMath::Abs(mk0s-mk0sPDG) > fCutsRD[GetGlobalIndex(2,ptbin)]) okK0spipi = kFALSE;
727  // cut on Lc mass with Lambda+pi hypothesis
728  if (TMath::Abs(mLcLpi-mLcPDG) > fCutsRD[GetGlobalIndex(1,ptbin)]) {
729  okLcLpi = kFALSE;
730  okLcLBarpi = kFALSE;
731  }
732 
733  // cuts on the V0 mass: Lambda/LambdaBar case
734  if ( TMath::Abs(mlambda-mLPDG) > fCutsRD[GetGlobalIndex(3,ptbin)]) okLppi = kFALSE;
735  if ( TMath::Abs(malambda-mLPDG) > fCutsRD[GetGlobalIndex(3,ptbin)]) okLBarpip = kFALSE;
736 
737  // cut on K0S invariant mass veto
738  if (TMath::Abs(v0->MassK0Short()-mk0sPDG) < fCutsRD[GetGlobalIndex(12,ptbin)]) isNotK0S=kFALSE;
739  // cut on Lambda/LambdaBar invariant mass veto
740  if (TMath::Abs(v0->MassLambda()-mLPDG) < fCutsRD[GetGlobalIndex(13,ptbin)]) isNotLambda=kFALSE;
741  if (TMath::Abs(v0->MassAntiLambda()-mLPDG) < fCutsRD[GetGlobalIndex(13,ptbin)]) isNotLambdaBar=kFALSE;
742 
743  // cut on gamma invariant mass veto
744  if (v0->InvMass2Prongs(0,1,11,11) < fCutsRD[GetGlobalIndex(14,ptbin)]) isNotGamma=kFALSE;
745 
746  okLck0sp = okLck0sp && okK0spipi && isNotLambda && isNotLambdaBar && isNotGamma;
747  okLcLpi = okLcLpi && okLppi && isNotK0S && isNotLambdaBar && isNotGamma;
748  okLcLBarpi = okLcLBarpi && okLBarpip && isNotK0S && isNotLambda && isNotGamma;
749 
750  if (!okLck0sp && !okLcLpi && !okLcLBarpi) return 0;
751 
752 
753  // cut on V0 dca (prong-to-prong)
754  if ( TMath::Abs(v0->GetDCA()) > fCutsRD[GetGlobalIndex(8,ptbin)]) return 0;
755 
756 
757  return kTRUE;
758 
759 }
760 //---------------------------------------------------------------------------
762 
763  // fPidHF -> PID object for bachelor
764 
765  if (!fUsePID || !obj) {
766  AliDebug(2,"PID selection inactive. Candidate accepted.");
767  return 7; // all hypothesis are valid
768  }
769 
771 
772  AliAODv0 * v0 = dynamic_cast<AliAODv0*>(objD->Getv0());
773  if ( v0 && ((v0->GetOnFlyStatus() == kTRUE && GetV0Type() == AliRDHFCuts::kOnlyOfflineV0s) ||
774  (v0->GetOnFlyStatus() == kFALSE && GetV0Type() == AliRDHFCuts::kOnlyOnTheFlyV0s)) ) return 0;
775 
776  AliAODTrack *bachelor = (AliAODTrack*)objD->GetBachelor();
777  AliAODTrack *v0Pos = (AliAODTrack*)objD->Getv0PositiveTrack();
778  AliAODTrack *v0Neg = (AliAODTrack*)objD->Getv0NegativeTrack();
779 
780  if (!bachelor || !v0Pos || !v0Neg) return 0;
781 
782  Bool_t okLcK0Sp = kTRUE; // K0S case
783  Bool_t okLcLambdaBarPi = kTRUE; // LambdaBar case
784  Bool_t okLcLambdaPi = kTRUE; // Lambda case
785 
786  Double_t ptCand = objD->Pt();
787  Int_t candPtBin = PtBin(ptCand);
788  CheckPID(candPtBin,bachelor,v0Neg,v0Pos,okLcK0Sp,okLcLambdaBarPi,okLcLambdaPi);
789 
790  Int_t returnvalue = okLcK0Sp+2*okLcLambdaBarPi+4*okLcLambdaPi;
791 
792  return returnvalue;
793 }
794 //-----------------------
795 void AliRDHFCutsLctoV0::CheckPID(Int_t candPtBin, AliAODTrack *bachelor,
796  AliAODTrack * /*v0Neg*/, AliAODTrack * /*v0Pos*/,
797  Bool_t &isBachelorID1, Bool_t &isBachelorID2, Bool_t &isBachelorID4) {
798  // identification strategy
799 
800  Int_t idxIDbyTOF = -1;
801  Int_t idxIDbyTPC = -1;
802 
803  Int_t tpcID = -1;
804  Int_t tofID = -1;
805  Double_t nTPCsigmas = -999;
806  Double_t nTOFsigmas = -999;
807 
808  Bool_t trackIDByTOF = -1;
809  Bool_t trackIDByTPC = -1;
810 
811  Bool_t dummy = kFALSE;
812 
813  switch (fPidSelectionFlag) {
814 
815  case 0:
816 
817  // identify bachelor
818  idxIDbyTOF = fPidHF->ApplyPidTOFRaw(bachelor,4);
819  idxIDbyTPC = fPidHF->ApplyPidTPCRaw(bachelor,4);
820  isBachelorID1 = (idxIDbyTOF==4) && (idxIDbyTPC==4); // K0S case
821 
822  idxIDbyTOF = fPidHF->ApplyPidTOFRaw(bachelor,2);
823  idxIDbyTPC = fPidHF->ApplyPidTPCRaw(bachelor,2);
824  isBachelorID2 = (idxIDbyTOF==2) && (idxIDbyTPC==2); // LambdaBar case
825 
826  isBachelorID4 = isBachelorID2; // Lambda case
827 
828  break;
829 
830  case 1:
831 
832  // identify bachelor
833  idxIDbyTOF = fPidHF->ApplyPidTOFRaw(bachelor,4);
834  idxIDbyTPC = fPidHF->ApplyPidTPCRaw(bachelor,4);
835  dummy = ( !(fPidHF->CheckTOFPIDStatus(bachelor)) && (idxIDbyTPC==4) &&
836  fPidHF->IsExcluded(bachelor,2,2.,"TPC") && fPidHF->IsExcluded(bachelor,3,2.,"TPC") ); // K0S case
837  isBachelorID1 = ( (idxIDbyTOF==4) || dummy );
838 
839  idxIDbyTOF = fPidHF->ApplyPidTOFRaw(bachelor,2);
840  idxIDbyTPC = fPidHF->ApplyPidTPCRaw(bachelor,2);
841  dummy = ( !(fPidHF->CheckTOFPIDStatus(bachelor)) && (idxIDbyTPC==2) &&
842  fPidHF->IsExcluded(bachelor,3,2.,"TPC") && fPidHF->IsExcluded(bachelor,4,2.,"TPC") ); // LambdaBar case
843  isBachelorID2 = ( (idxIDbyTOF==2) || dummy );
844 
845  isBachelorID4 = isBachelorID2; // Lambda case
846 
847  break;
848 
849  case 2:
850 
851  // identify bachelor
852  nTOFsigmas = -999;
853  tofID = fPidHF->GetnSigmaTOF(bachelor,4,nTOFsigmas);
854  nTPCsigmas = -999;
855  tpcID = fPidHF->GetnSigmaTPC(bachelor,4,nTPCsigmas);
856  trackIDByTOF = ( (tofID==1) && ( (bachelor->P()>=fLowPtCut && bachelor->P()<fHighPtCut && TMath::Abs(nTOFsigmas)<3) ||
857  (bachelor->P()>=fHighPtCut && nTOFsigmas>-2 && nTOFsigmas<3) ) );
858  trackIDByTPC = ( (tpcID==1) && ( (bachelor->P()<fLowPtCut && TMath::Abs(nTPCsigmas)<2) ||
859  (bachelor->P()>=fLowPtCut && TMath::Abs(nTPCsigmas)<3) ) );
860  isBachelorID1 = (bachelor->P()<fLowPtCut && trackIDByTPC) || (bachelor->P()>=fLowPtCut && trackIDByTPC && trackIDByTOF); // K0S case
861 
862  nTOFsigmas = -999;
863  tofID = fPidHF->GetnSigmaTOF(bachelor,2,nTOFsigmas);
864  nTPCsigmas = -999;
865  tpcID = fPidHF->GetnSigmaTPC(bachelor,2,nTPCsigmas);
866  trackIDByTOF = ( (tofID==1) && ( (bachelor->P()>=fLowPtCut && bachelor->P()<fHighPtCut && TMath::Abs(nTOFsigmas)<3) ||
867  (bachelor->P()>=fHighPtCut && nTOFsigmas>-2 && nTOFsigmas<3) ) );
868  trackIDByTPC = ( (tpcID==1) && ( (bachelor->P()<fLowPtCut && TMath::Abs(nTPCsigmas)<2) ||
869  (bachelor->P()>=fLowPtCut && TMath::Abs(nTPCsigmas)<3) ) );
870  isBachelorID2 = (bachelor->P()<fLowPtCut && trackIDByTPC) || (bachelor->P()>=fLowPtCut && trackIDByTPC && trackIDByTOF); // LambdaBar case
871 
872  isBachelorID4 = isBachelorID2; // Lambda case
873 
874  break;
875 
876  case 3:
877 
878  // identify bachelor
879  nTOFsigmas = -999;
880  tofID = fPidHF->GetnSigmaTOF(bachelor,4,nTOFsigmas);
881  nTPCsigmas = -999;
882  tpcID = fPidHF->GetnSigmaTPC(bachelor,4,nTPCsigmas);
883  trackIDByTOF = ( (tofID==1) && ( (bachelor->P()>=fLowPtCut && bachelor->P()<fHighPtCut && TMath::Abs(nTOFsigmas)<3) ||
884  (bachelor->P()>=fHighPtCut && nTOFsigmas>-2 && nTOFsigmas<3) ) );
885  trackIDByTPC = ( (tpcID==1) && ( (bachelor->P()<fLowPtCut && TMath::Abs(nTPCsigmas)<2) ||
886  (bachelor->P()>=fLowPtCut && bachelor->P()<fHighPtCut && TMath::Abs(nTPCsigmas)<3) ||
887  (bachelor->P()>=fHighPtCut && nTPCsigmas>-3 && nTPCsigmas<2) ) );
888  isBachelorID1 = (bachelor->P()<fLowPtCut && trackIDByTPC) || (bachelor->P()>=fLowPtCut && trackIDByTPC && trackIDByTOF); // K0S case
889 
890  nTOFsigmas = -999;
891  tofID = fPidHF->GetnSigmaTOF(bachelor,2,nTOFsigmas);
892  nTPCsigmas = -999;
893  tpcID = fPidHF->GetnSigmaTPC(bachelor,2,nTPCsigmas);
894  trackIDByTOF = ( (tofID==1) && ( (bachelor->P()>=fLowPtCut && bachelor->P()<fHighPtCut && TMath::Abs(nTOFsigmas)<3) ||
895  (bachelor->P()>=fHighPtCut && nTOFsigmas>-2 && nTOFsigmas<3) ) );
896  trackIDByTPC = ( (tpcID==1) && ( (bachelor->P()<fLowPtCut && TMath::Abs(nTPCsigmas)<2) ||
897  (bachelor->P()>=fLowPtCut && bachelor->P()<fHighPtCut && TMath::Abs(nTPCsigmas)<3) ||
898  (bachelor->P()>=fHighPtCut && nTPCsigmas>-3 && nTPCsigmas<2) ) );
899  isBachelorID2 = (bachelor->P()<fLowPtCut && trackIDByTPC) || (bachelor->P()>=fLowPtCut && trackIDByTPC && trackIDByTOF); // LambdaBar case
900 
901  isBachelorID4 = isBachelorID2; // Lambda case
902 
903  break;
904 
905  case 4:
906 
907  // identify bachelor
908  nTOFsigmas = -999;
909  tofID = fPidHF->GetnSigmaTOF(bachelor,4,nTOFsigmas);
910  nTPCsigmas = -999;
911  tpcID = fPidHF->GetnSigmaTPC(bachelor,4,nTPCsigmas);
912  trackIDByTOF = ( (tofID==1) && ( (bachelor->P()>=fLowPtCut && bachelor->P()<fHighPtCut && TMath::Abs(nTOFsigmas)<3) ||
913  (bachelor->P()>=fHighPtCut && nTOFsigmas>-2 && nTOFsigmas<3) ) );
914  trackIDByTPC = ( (tpcID==1) && (TMath::Abs(nTPCsigmas)<2) );
915  isBachelorID1 = ( (bachelor->P()<fLowPtCut && trackIDByTPC) || (bachelor->P()>=fLowPtCut && trackIDByTOF) ); // K0S case
916 
917  nTOFsigmas = -999;
918  tofID = fPidHF->GetnSigmaTOF(bachelor,2,nTOFsigmas);
919  nTPCsigmas = -999;
920  tpcID = fPidHF->GetnSigmaTPC(bachelor,2,nTPCsigmas);
921  trackIDByTOF = ( (tofID==1) && ( (bachelor->P()>=fLowPtCut && bachelor->P()<fHighPtCut && TMath::Abs(nTOFsigmas)<3) ||
922  (bachelor->P()>=fHighPtCut && nTOFsigmas>-2 && nTOFsigmas<3) ) );
923  trackIDByTPC = ( (tpcID==1) && (TMath::Abs(nTPCsigmas)<2) );
924  isBachelorID2 = ( (bachelor->P()<fLowPtCut && trackIDByTPC) || (bachelor->P()>=fLowPtCut && trackIDByTOF) ); // LambdaBar case
925 
926  isBachelorID4 = isBachelorID2; // Lambda case
927 
928  break;
929 
930  case 5:
931 
932  // identify bachelor
933  nTOFsigmas = -999;
934  tofID = fPidHF->GetnSigmaTOF(bachelor,4,nTOFsigmas);
935  nTPCsigmas = -999;
936  tpcID = fPidHF->GetnSigmaTPC(bachelor,4,nTPCsigmas);
937  trackIDByTOF = ( (tofID==1) && ( (bachelor->P()>=fLowPtCut && bachelor->P()<fHighPtCut && TMath::Abs(nTOFsigmas)<3) ||
938  (bachelor->P()>=fHighPtCut && nTOFsigmas>-2 && nTOFsigmas<3) ) );
939  trackIDByTPC = ( (tpcID==1) && ( (bachelor->P()<fLowPtCut && TMath::Abs(nTPCsigmas)<2) || (bachelor->P()>=fHighPtCut && tofID!=1 && TMath::Abs(nTPCsigmas)<3) ) );
940  isBachelorID1 = (bachelor->P()<fLowPtCut && trackIDByTPC) || (bachelor->P()>=fLowPtCut && bachelor->P()<fHighPtCut && trackIDByTOF) || (bachelor->P()>=fHighPtCut && (trackIDByTOF || trackIDByTPC) ); // K0S case
941 
942  nTOFsigmas = -999;
943  tofID = fPidHF->GetnSigmaTOF(bachelor,2,nTOFsigmas);
944  nTPCsigmas = -999;
945  tpcID = fPidHF->GetnSigmaTPC(bachelor,2,nTPCsigmas);
946  trackIDByTOF = ( (tofID==1) && ( (bachelor->P()>=fLowPtCut && bachelor->P()<fHighPtCut && TMath::Abs(nTOFsigmas)<3) ||
947  (bachelor->P()>=fHighPtCut && nTOFsigmas>-2 && nTOFsigmas<3) ) );
948  trackIDByTPC = ( (tpcID==1) && ( (bachelor->P()<fLowPtCut && TMath::Abs(nTPCsigmas)<2) || (bachelor->P()>=fHighPtCut && tofID!=1 && TMath::Abs(nTPCsigmas)<3) ) );
949  isBachelorID2 = (bachelor->P()<fLowPtCut && trackIDByTPC) || (bachelor->P()>=fLowPtCut && bachelor->P()<fHighPtCut && trackIDByTOF) || (bachelor->P()>=fHighPtCut && (trackIDByTOF || trackIDByTPC) ); // LambdaBar case
950 
951  isBachelorID4 = isBachelorID2; // Lambda case
952 
953  break;
954 
955  case 6:
956 
957  // identify bachelor
958  nTOFsigmas = -999;
959  tofID = fPidHF->GetnSigmaTOF(bachelor,4,nTOFsigmas);
960  nTPCsigmas = -999;
961  tpcID = fPidHF->GetnSigmaTPC(bachelor,4,nTPCsigmas);
962  trackIDByTOF = ( (tofID==1) && ( (bachelor->P()>=fLowPtCut && bachelor->P()<fHighPtCut && TMath::Abs(nTOFsigmas)<3) ||
963  (bachelor->P()>=fHighPtCut && nTOFsigmas>-2 && nTOFsigmas<3) ) );
964  trackIDByTPC = ( (tpcID==1) && ( (bachelor->P()<fLowPtCut && TMath::Abs(nTPCsigmas)<2) || (bachelor->P()>=fHighPtCut && tofID!=1 && nTPCsigmas>-3 && nTPCsigmas<2) ) );
965  isBachelorID1 = (bachelor->P()<fLowPtCut && trackIDByTPC) || (bachelor->P()>=fLowPtCut && bachelor->P()<fHighPtCut && trackIDByTOF) || (bachelor->P()>=fHighPtCut && (trackIDByTOF || trackIDByTPC) ); // K0S case
966 
967  nTOFsigmas = -999;
968  tofID = fPidHF->GetnSigmaTOF(bachelor,2,nTOFsigmas);
969  nTPCsigmas = -999;
970  tpcID = fPidHF->GetnSigmaTPC(bachelor,2,nTPCsigmas);
971  trackIDByTOF = ( (tofID==1) && ( (bachelor->P()>=fLowPtCut && bachelor->P()<fHighPtCut && TMath::Abs(nTOFsigmas)<3) ||
972  (bachelor->P()>=fHighPtCut && nTOFsigmas>-2 && nTOFsigmas<3) ) );
973  trackIDByTPC = ( (tpcID==1) && ( (bachelor->P()<fLowPtCut && TMath::Abs(nTPCsigmas)<2) || (bachelor->P()>=fHighPtCut && tofID!=1 && nTPCsigmas>-3 && nTPCsigmas<2) ) );
974  isBachelorID2 = (bachelor->P()<fLowPtCut && trackIDByTPC) || (bachelor->P()>=fLowPtCut && bachelor->P()<fHighPtCut && trackIDByTOF) || (bachelor->P()>=fHighPtCut && (trackIDByTOF || trackIDByTPC) ); // LambdaBar case
975 
976  isBachelorID4 = isBachelorID2; // Lambda case
977 
978  break;
979 
980  case 7:
981 
982  // identify bachelor
983  nTOFsigmas = -999;
984  tofID = fPidHF->GetnSigmaTOF(bachelor,4,nTOFsigmas);
985  nTPCsigmas = -999;
986  tpcID = fPidHF->GetnSigmaTPC(bachelor,4,nTPCsigmas);
987  trackIDByTOF = ( (tofID==1) && ( (bachelor->P()>=fLowPtCut && bachelor->P()<fHighPtCut && TMath::Abs(nTOFsigmas)<3) ||
988  (bachelor->P()>=fHighPtCut && nTOFsigmas>-2 && nTOFsigmas<3) ) );
989  trackIDByTPC = ( (tpcID==1) && ( (bachelor->P()<fLowPtCut && TMath::Abs(nTPCsigmas)<2) || (bachelor->P()>=fLowPtCut && tofID!=1 && TMath::Abs(nTPCsigmas)<3) ) );
990  isBachelorID1 = (bachelor->P()<fLowPtCut && trackIDByTPC) || (bachelor->P()>=fLowPtCut && (trackIDByTOF || trackIDByTPC) ); // K0S case
991 
992  nTOFsigmas = -999;
993  tofID = fPidHF->GetnSigmaTOF(bachelor,2,nTOFsigmas);
994  nTPCsigmas = -999;
995  tpcID = fPidHF->GetnSigmaTPC(bachelor,2,nTPCsigmas);
996  trackIDByTOF = ( (tofID==1) && ( (bachelor->P()>=fLowPtCut && bachelor->P()<fHighPtCut && TMath::Abs(nTOFsigmas)<3) ||
997  (bachelor->P()>=fHighPtCut && nTOFsigmas>-2 && nTOFsigmas<3) ) );
998  trackIDByTPC = ( (tpcID==1) && ( (bachelor->P()<fLowPtCut && TMath::Abs(nTPCsigmas)<2) || (bachelor->P()>=fHighPtCut && tofID!=1 && TMath::Abs(nTPCsigmas)<3) ) );
999  isBachelorID2 = (bachelor->P()<fLowPtCut && trackIDByTPC) || (bachelor->P()>=fLowPtCut && (trackIDByTOF || trackIDByTPC) ); // LambdaBar case
1000 
1001  isBachelorID4 = isBachelorID2; // Lambda case
1002 
1003  break;
1004 
1005  case 8:
1006 
1007  // identify bachelor
1008  nTOFsigmas = -999;
1009  tofID = fPidHF->GetnSigmaTOF(bachelor,4,nTOFsigmas);
1010  nTPCsigmas = -999;
1011  tpcID = fPidHF->GetnSigmaTPC(bachelor,4,nTPCsigmas);
1012  trackIDByTOF = ( (tofID==1) && ( (bachelor->P()>=fLowPtCut && bachelor->P()<fHighPtCut && TMath::Abs(nTOFsigmas)<3) ||
1013  (bachelor->P()>=fHighPtCut && nTOFsigmas>-2 && nTOFsigmas<3) ) );
1014  trackIDByTPC = ( (tpcID==1) && ( (bachelor->P()<fLowPtCut && TMath::Abs(nTPCsigmas)<2) || (bachelor->P()>=fLowPtCut && tofID!=1 && nTPCsigmas>-3 && nTPCsigmas<2) ) );
1015  isBachelorID1 = (bachelor->P()<fLowPtCut && trackIDByTPC) || (bachelor->P()>=fLowPtCut && (trackIDByTOF || trackIDByTPC) ); // K0S case
1016 
1017  nTOFsigmas = -999;
1018  tofID = fPidHF->GetnSigmaTOF(bachelor,2,nTOFsigmas);
1019  nTPCsigmas = -999;
1020  tpcID = fPidHF->GetnSigmaTPC(bachelor,2,nTPCsigmas);
1021  trackIDByTOF = ( (tofID==1) && ( (bachelor->P()>=fLowPtCut && bachelor->P()<fHighPtCut && TMath::Abs(nTOFsigmas)<3) ||
1022  (bachelor->P()>=fHighPtCut && nTOFsigmas>-2 && nTOFsigmas<3) ) );
1023  trackIDByTPC = ( (tpcID==1) && ( (bachelor->P()<fLowPtCut && TMath::Abs(nTPCsigmas)<2) || (bachelor->P()>=fHighPtCut && tofID!=1 && nTPCsigmas>-3 && nTPCsigmas<2) ) );
1024  isBachelorID2 = (bachelor->P()<fLowPtCut && trackIDByTPC) || (bachelor->P()>=fLowPtCut && (trackIDByTOF || trackIDByTPC) ); // LambdaBar case
1025 
1026  isBachelorID4 = isBachelorID2; // Lambda case
1027 
1028  break;
1029 
1030  case 9:
1031  {
1032  // identify bachelor
1033  fPidHF->GetPidCombined()->SetDefaultTPCPriors();
1034  fPidHF->GetPidCombined()->SetDetectorMask(AliPIDResponse::kDetTPC+AliPIDResponse::kDetTOF);
1035  Double_t probTPCTOF[AliPID::kSPECIES]={-1.};
1036  UInt_t detUsed = fPidHF->GetPidCombined()->ComputeProbabilities(bachelor, fPidHF->GetPidResponse(), probTPCTOF);
1037  Double_t probProton = -1.;
1038  Double_t probPion = -1.;
1039  if (detUsed == (UInt_t)fPidHF->GetPidCombined()->GetDetectorMask() ) {
1040  probProton = probTPCTOF[AliPID::kProton];
1041  probPion = probTPCTOF[AliPID::kPion];
1042  }
1043  else { // if you don't have both TOF and TPC, try only TPC
1044  fPidHF->GetPidCombined()->SetDetectorMask(AliPIDResponse::kDetTPC);
1045  detUsed = fPidHF->GetPidCombined()->ComputeProbabilities(bachelor, fPidHF->GetPidResponse(), probTPCTOF);
1046  if (detUsed == (UInt_t)fPidHF->GetPidCombined()->GetDetectorMask()) {
1047  probProton = probTPCTOF[AliPID::kProton];
1048  probPion = probTPCTOF[AliPID::kPion];
1049  }
1050  fPidHF->GetPidCombined()->SetDetectorMask(AliPIDResponse::kDetTPC+AliPIDResponse::kDetTOF);
1051  }
1052 
1053  isBachelorID1=(probProton>fMinCombinedProbability[candPtBin]); // K0S case
1054 
1055  isBachelorID2=(probPion>fMinCombinedProbability[candPtBin]); // LambdaBar case
1056 
1057  isBachelorID4 = isBachelorID2; // Lambda case
1058  }
1059  break;
1060 
1061  case 10:
1062 
1063  // identify bachelor
1064  nTOFsigmas = -999;
1065  tofID = fPidHF->GetnSigmaTOF(bachelor,4,nTOFsigmas);
1066  nTPCsigmas = -999;
1067  tpcID = fPidHF->GetnSigmaTPC(bachelor,4,nTPCsigmas);
1068 
1069  isBachelorID1 = kFALSE;
1070  if(TMath::Abs(nTPCsigmas)<3. && TMath::Abs(nTOFsigmas)<3.){
1071  isBachelorID1 = !(bachelor->Pt()>fLowPtCut&& nTOFsigmas<-2.) && !(bachelor->Pt()>fLowPtCut&& nTPCsigmas>2.);
1072  }
1073 
1074  nTOFsigmas = -999;
1075  tofID = fPidHF->GetnSigmaTOF(bachelor,2,nTOFsigmas);
1076  nTPCsigmas = -999;
1077  tpcID = fPidHF->GetnSigmaTPC(bachelor,2,nTPCsigmas);
1078 
1079  isBachelorID2 = TMath::Abs(nTPCsigmas)<3. && TMath::Abs(nTOFsigmas)<3.;
1080  isBachelorID4 = isBachelorID2;
1081 
1082  break;
1083 
1084  }
1085 
1086 }
1087 //----------------
1088 Int_t AliRDHFCutsLctoV0::CombineCuts(Int_t returnvalueTrack, Int_t returnvalue, Int_t returnvaluePID) const {
1089  //
1090  // combine track selection, topological cuts and PID
1091  //
1092 
1093  Int_t returnvalueTot=returnvalueTrack&returnvalue;
1094  returnvalueTot=returnvalueTot&returnvaluePID;
1095 
1096  return returnvalueTot;
1097 }
1098 
1099 //----------------------------------
1101  //
1102  // Apply selection on single cut
1103  //
1104 
1105  if (!fCutsRD) {
1106  AliDebug(2,"Cut matrice not inizialized. Exit...");
1107  return 0;
1108  }
1109 
1111  if (!d) {
1112  AliDebug(2,"AliAODRecoCascadeHF null");
1113  return 0;
1114  }
1115 
1116  if (!d->GetSecondaryVtx()) {
1117  AliDebug(2,"No secondary vertex for cascade");
1118  return 0;
1119  }
1120 
1121  if (d->GetNDaughters()!=2) {
1122  AliDebug(2,Form("No 2 daughters for current cascade (nDaughters=%d)",d->GetNDaughters()));
1123  return 0;
1124  }
1125 
1126  AliAODv0 * v0 = dynamic_cast<AliAODv0*>(d->Getv0());
1127  if ( v0 && ((v0->GetOnFlyStatus() == kTRUE && GetV0Type() == AliRDHFCuts::kOnlyOfflineV0s) ||
1128  (v0->GetOnFlyStatus() == kFALSE && GetV0Type() == AliRDHFCuts::kOnlyOnTheFlyV0s)) ) return 0;
1129 
1130  AliAODTrack * bachelorTrack = dynamic_cast<AliAODTrack*>(d->GetBachelor());
1131  if (!v0 || !bachelorTrack) {
1132  AliDebug(2,"No V0 or no bachelor for current cascade");
1133  return 0;
1134  }
1135 
1136  if (bachelorTrack->GetID()<0) {
1137  AliDebug(2,Form("Bachelor has negative ID %d",bachelorTrack->GetID()));
1138  return 0;
1139  }
1140 
1141  if (!v0->GetSecondaryVtx()) {
1142  AliDebug(2,"No secondary vertex for V0 by cascade");
1143  return 0;
1144  }
1145 
1146  if (v0->GetNDaughters()!=2) {
1147  AliDebug(2,Form("No 2 daughters for V0 of current cascade (onTheFly=%d, nDaughters=%d)",v0->GetOnFlyStatus(),v0->GetNDaughters()));
1148  return 0;
1149  }
1150 
1151 
1152  // Get the V0 daughter tracks
1153  AliAODTrack *v0positiveTrack = dynamic_cast<AliAODTrack*>(d->Getv0PositiveTrack());
1154  AliAODTrack *v0negativeTrack = dynamic_cast<AliAODTrack*>(d->Getv0NegativeTrack());
1155  if (!v0positiveTrack || !v0negativeTrack ) {
1156  AliDebug(2,"No V0 daughters' objects");
1157  return 0;
1158  }
1159 
1160  if (v0positiveTrack->GetID()<0 || v0negativeTrack->GetID()<0) {
1161  AliDebug(2,Form("At least one of V0 daughters has negative ID %d %d",v0positiveTrack->GetID(),v0negativeTrack->GetID()));
1162  return 0;
1163  }
1164 
1165  //if(fUseTrackSelectionWithFilterBits && d->HasBadDaughters()) return 0;
1166  if ( fUseTrackSelectionWithFilterBits && !(bachelorTrack->TestFilterMask(BIT(4))) ) {
1167  AliDebug(2,"Check on the bachelor FilterBit: no BIT(4). Candidate rejected.");
1168  return 0;
1169  }
1170 
1171 
1172  // selection on daughter tracks
1173  if (selectionLevel==AliRDHFCuts::kAll ||
1174  selectionLevel==AliRDHFCuts::kTracks) {
1175 
1176  if (!AreLctoV0DaughtersSelected(d,aod)) return 0;
1177 
1178  }
1179 
1180  Bool_t okLck0sp=kFALSE, okLcLpi=kFALSE, okLcLBarpi=kFALSE;
1181 
1182  // selection on candidate
1183  if (selectionLevel==AliRDHFCuts::kAll ||
1184  selectionLevel==AliRDHFCuts::kCandidate) {
1185 
1186  Double_t pt = d->Pt();
1187  Int_t ptbin = PtBin(pt);
1188 
1189  Double_t mLcPDG = TDatabasePDG::Instance()->GetParticle(4122)->Mass();
1190  Double_t mk0sPDG = TDatabasePDG::Instance()->GetParticle(310)->Mass();
1191  Double_t mLPDG = TDatabasePDG::Instance()->GetParticle(3122)->Mass();
1192 
1193  // K0S + p
1194  Double_t mk0s = v0->MassK0Short();
1195  Double_t mLck0sp = d->InvMassLctoK0sP();
1196 
1197  // Lambda + pi
1198  Double_t mlambda = v0->MassLambda();
1199  Double_t malambda = v0->MassAntiLambda();
1200  Double_t mLcLpi = d->InvMassLctoLambdaPi();
1201 
1202  switch (cutIndex) {
1203  case 0:
1204  // cut on Lc mass with K0S+p hypothesis
1205  okLck0sp = TMath::Abs(mLck0sp-mLcPDG)<=fCutsRD[GetGlobalIndex(0,ptbin)];
1206  okLcLpi = kFALSE;
1207  okLcLBarpi = kFALSE;
1208  break;
1209  case 1:
1210  // cut on Lc mass with Lambda+pi hypothesis
1211  okLck0sp = kFALSE;
1212  okLcLpi = TMath::Abs(mLcLpi-mLcPDG)<=fCutsRD[GetGlobalIndex(1,ptbin)];
1213  okLcLBarpi = okLcLpi;
1214  break;
1215  case 2:
1216  // cuts on the V0 mass: K0S case
1217  okLck0sp = TMath::Abs(mk0s-mk0sPDG)<=fCutsRD[GetGlobalIndex(2,ptbin)];
1218  okLcLpi = kFALSE;
1219  okLcLBarpi = kFALSE;
1220  break;
1221  case 3:
1222  // cuts on the V0 mass: Lambda/LambdaBar case
1223  okLck0sp = kFALSE;
1224  okLcLpi = TMath::Abs(mlambda-mLPDG)<=fCutsRD[GetGlobalIndex(3,ptbin)];
1225  //okLcLpi = okLcLpi && (bachelorTrack->Charge()==+1);
1226  okLcLBarpi = TMath::Abs(malambda-mLPDG)<=fCutsRD[GetGlobalIndex(3,ptbin)];
1227  //okLcLBarpi = okLcLBarpi && (bachelorTrack->Charge()==-1);
1228  break;
1229  case 4:
1230  // cuts on the minimum pt of bachelor
1231  okLck0sp = TMath::Abs(bachelorTrack->Pt())>=fCutsRD[GetGlobalIndex(4,ptbin)];
1232  okLcLpi = okLck0sp;
1233  okLcLBarpi = okLck0sp;
1234  break;
1235  case 5:
1236  // cuts on the minimum pt of positive V0daughter
1237  okLck0sp = TMath::Abs(v0positiveTrack->Pt())>=fCutsRD[GetGlobalIndex(5,ptbin)];
1238  okLcLpi = okLck0sp;
1239  okLcLBarpi = okLck0sp;
1240  break;
1241  case 6:
1242  // cuts on the minimum pt of negative V0daughter
1243  okLck0sp = TMath::Abs(v0negativeTrack->Pt())>=fCutsRD[GetGlobalIndex(6,ptbin)];
1244  okLcLpi = okLck0sp;
1245  okLcLBarpi = okLck0sp;
1246  break;
1247  case 7:
1248  // cut on cascade dca
1249  okLck0sp = TMath::Abs(d->GetDCA())<=fCutsRD[GetGlobalIndex(7,ptbin)];
1250  okLcLpi = okLck0sp;
1251  okLcLBarpi = okLck0sp;
1252  break;
1253  case 8:
1254  // cut on V0 dca
1255  okLck0sp = TMath::Abs(v0->GetDCA())<=fCutsRD[GetGlobalIndex(8,ptbin)];
1256  okLcLpi = okLck0sp;
1257  okLcLBarpi = okLck0sp;
1258  break;
1259  case 9:
1260  // cut on V0 cosine of pointing angle wrt PV
1261  okLck0sp = d->CosV0PointingAngle()>=fCutsRD[GetGlobalIndex(9,ptbin)];
1262  okLcLpi = okLck0sp;
1263  okLcLBarpi = okLck0sp;
1264  break;
1265  case 10:
1266  // cut on bachelor transverse impact parameter wrt PV
1267  okLck0sp = TMath::Abs(d->Getd0Prong(0))<=fCutsRD[GetGlobalIndex(10,ptbin)];
1268  okLcLpi = okLck0sp;
1269  okLcLBarpi = okLck0sp;
1270  break;
1271  case 11:
1272  // cut on V0 transverse impact parameter wrt PV
1273  okLck0sp = TMath::Abs(d->Getd0Prong(1))<=fCutsRD[GetGlobalIndex(11,ptbin)];
1274  okLcLpi = okLck0sp;
1275  okLcLBarpi = okLck0sp;
1276  break;
1277  case 12:
1278  // cut on K0S invariant mass veto
1279  okLcLpi = TMath::Abs(mk0s-mk0sPDG)>=fCutsRD[GetGlobalIndex(12,ptbin)];
1280  okLcLBarpi = TMath::Abs(mk0s-mk0sPDG)>=fCutsRD[GetGlobalIndex(12,ptbin)];
1281  break;
1282  case 13:
1283  // cut on Lambda/LambdaBar invariant mass veto
1284  okLck0sp = (TMath::Abs(mlambda-mLPDG)>=fCutsRD[GetGlobalIndex(13,ptbin)] &&
1285  TMath::Abs(malambda-mLPDG)>=fCutsRD[GetGlobalIndex(13,ptbin)]);
1286  break;
1287  case 14:
1288  // cut on gamma invariant mass veto
1289  okLck0sp = v0->InvMass2Prongs(0,1,11,11)>=fCutsRD[GetGlobalIndex(14,ptbin)];
1290  okLcLpi = okLck0sp;
1291  okLcLBarpi = okLck0sp;
1292  break;
1293  case 15:
1294  // cut on V0 pT min
1295  okLck0sp = v0->Pt()>=fCutsRD[GetGlobalIndex(15,ptbin)];
1296  okLcLpi = okLck0sp;
1297  okLcLBarpi = okLck0sp;
1298  break;
1299  case 16:
1300  okLck0sp = (TMath::Abs(fCutsRD[GetGlobalIndex(16,ptbin)])<1.1)&&(d->CosThetaStar(0,4122,2212,310)<= fCutsRD[GetGlobalIndex(16,ptbin)]);
1301  okLcLpi = okLck0sp;
1302  okLcLBarpi = okLck0sp;
1303  break;
1304  case 17:
1305  okLck0sp = (TMath::Abs(fCutsRD[GetGlobalIndex(17,ptbin)])<1.1)&&(d->CosThetaStar(0,4122,2212,310)>= fCutsRD[GetGlobalIndex(17,ptbin)]);
1306  okLcLpi = okLck0sp;
1307  okLcLBarpi = okLck0sp;
1308  break;
1309  case 18:
1310  okLck0sp = (TMath::Abs(fCutsRD[GetGlobalIndex(18,ptbin)])<0.2)&&(GetReSignedd0(d)>= fCutsRD[GetGlobalIndex(18,ptbin)]);
1311  okLcLpi = okLck0sp;
1312  okLcLBarpi = okLck0sp;
1313  break;
1314  case 19:
1315  okLck0sp = (TMath::Abs(fCutsRD[GetGlobalIndex(19,ptbin)])<0.3)&&(v0->PtArmV0()/TMath::Abs(v0->AlphaV0()) >= fCutsRD[GetGlobalIndex(19,ptbin)]);
1316  okLcLpi = okLck0sp;
1317  okLcLBarpi = okLck0sp;
1318  break;
1319  }
1320  }
1321 
1322  Int_t returnvalue = okLck0sp+2*okLcLBarpi+4*okLcLpi;
1323  /*
1324  retvalue case
1325  1 Lc->K0S + p
1326  2 Lc->LambdaBar + pi
1327  3 Lc->K0S + p AND Lc->LambdaBar + pi
1328  4 Lc->Lambda + pi
1329  5 Lc->K0S + p AND Lc->Lambda + pi
1330  6 Lc->LambdaBar + pi AND Lc->Lambda + pi
1331  7 Lc->K0S + p AND Lc->LambdaBar + pi AND Lc->Lambda + pi
1332  */
1333 
1334 
1335  /*
1336  Int_t returnvaluePID = 7;
1337 
1338  // selection on PID
1339  if (selectionLevel==AliRDHFCuts::kAll ||
1340  selectionLevel==AliRDHFCuts::kCandidate ||
1341  selectionLevel==AliRDHFCuts::kPID )
1342  returnvaluePID = IsSelectedPID(d);
1343  */
1344 
1345  Int_t returnvalueTot = 0;
1346  //if ( fUsePID )
1347  //returnvalueTot = CombineCuts(returnvalue,returnvaluePID);
1348  //else
1349  returnvalueTot = returnvalue;
1350 
1351  return returnvalueTot;
1352 
1353 }
1354 //----------------------------------
1356 
1357  SetName("LctoV0ProductionCuts");
1358  SetTitle("Production cuts for Lc->V0+bachelor analysis");
1359 
1360  AliESDtrackCuts* esdTrackCuts=new AliESDtrackCuts();
1361  esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
1362  //default
1363  esdTrackCuts->SetRequireTPCRefit(kTRUE);
1364  esdTrackCuts->SetRequireITSRefit(kTRUE);
1365  esdTrackCuts->SetMinNClustersITS(0);//(4); // default is 5
1366  esdTrackCuts->SetMinNClustersTPC(70);
1367  //esdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD,
1368  // AliESDtrackCuts::kAny);
1369  // default is kBoth, otherwise kAny
1370  esdTrackCuts->SetMinDCAToVertexXY(0.);
1371  esdTrackCuts->SetPtRange(0.3,1.e10);
1372  //esdTrackCuts->SetEtaRange(-0.8,+0.8);
1373  esdTrackCuts->SetAcceptKinkDaughters(kFALSE);
1374  AddTrackCuts(esdTrackCuts);
1375  delete esdTrackCuts;
1376  esdTrackCuts=NULL;
1377 
1378 
1379  AliESDtrackCuts* esdTrackCutsV0daughters=new AliESDtrackCuts();
1380  esdTrackCutsV0daughters->SetRequireSigmaToVertex(kFALSE);
1381  //default
1382  esdTrackCutsV0daughters->SetRequireTPCRefit(kTRUE);
1383  esdTrackCutsV0daughters->SetRequireITSRefit(kFALSE);//(kTRUE);
1384  esdTrackCutsV0daughters->SetMinNClustersITS(0);//(4); // default is 5
1385  esdTrackCutsV0daughters->SetMinNClustersTPC(70);
1386  //esdTrackCutsV0daughters->SetClusterRequirementITS(AliESDtrackCuts::kSPD,
1387  // AliESDtrackCuts::kAny);
1388  // default is kBoth, otherwise kAny
1389  esdTrackCutsV0daughters->SetMinDCAToVertexXY(0.);
1390  esdTrackCutsV0daughters->SetPtRange(0.,1.e10);
1391  esdTrackCutsV0daughters->SetAcceptKinkDaughters(kFALSE);
1392  AddTrackCutsV0daughters(esdTrackCutsV0daughters);
1393  delete esdTrackCutsV0daughters;
1394  esdTrackCutsV0daughters=NULL;
1395 
1396  const Int_t nptbins=1;
1397  Float_t* ptbins;
1398  ptbins=new Float_t[nptbins+1];
1399  ptbins[0]=0.;
1400  ptbins[1]=99999999.;
1401 
1402  SetPtBins(nptbins+1,ptbins);
1403  SetPtBins(nptbins+1,ptbins);
1404 
1405  const Int_t nvars=21;
1406 
1407  Float_t** prodcutsval;
1408  prodcutsval=new Float_t*[nvars];
1409  for(Int_t ic=0;ic<nvars;ic++){prodcutsval[ic]=new Float_t[nptbins];}
1410  for(Int_t ipt2=0;ipt2<nptbins;ipt2++){
1411  prodcutsval[0][ipt2]=1.; // inv. mass if K0S [GeV/c2]
1412  prodcutsval[1][ipt2]=1.; // inv. mass if Lambda [GeV/c2]
1413  prodcutsval[2][ipt2]=0.05; // inv. mass V0 if K0S [GeV/c2]
1414  prodcutsval[3][ipt2]=0.05; // inv. mass V0 if Lambda [GeV/c2]
1415  prodcutsval[4][ipt2]=0.3; // pT min bachelor track [GeV/c] // AOD by construction
1416  prodcutsval[5][ipt2]=0.; // pT min V0-positive track [GeV/c]
1417  prodcutsval[6][ipt2]=0.; // pT min V0-negative track [GeV/c]
1418  prodcutsval[7][ipt2]=1000.; // dca cascade cut [cm]
1419  prodcutsval[8][ipt2]=1.5; // dca V0 cut [nSigma] // it's 1.5 x offline V0s
1420  prodcutsval[9][ipt2]=-1.; // cosPA V0 cut // it's 0.90 x offline V0s at reconstruction level, 0.99 at filtering level
1421  prodcutsval[10][ipt2]=3.; // d0 max bachelor wrt PV [cm]
1422  prodcutsval[11][ipt2]=1000.;// d0 max V0 wrt PV [cm]
1423  prodcutsval[12][ipt2]=0.; // mass K0S veto [GeV/c2]
1424  prodcutsval[13][ipt2]=0.; // mass Lambda/LambdaBar veto [GeV/c2]
1425  prodcutsval[14][ipt2]=0.; // mass Gamma veto [GeV/c2]
1426  prodcutsval[15][ipt2]=0.; // pT min V0 track [GeV/c]
1427  prodcutsval[16][ipt2]=9999.;// max cos (Proton emission angle) cut
1428  prodcutsval[17][ipt2]=-9999.;// min cos (Proton emission angle) cut
1429  prodcutsval[18][ipt2]=-9999.;// Re-signed d0 [cm]
1430  prodcutsval[19][ipt2]=-9999.;// V0 armenteros qT/|alpha|
1431  prodcutsval[20][ipt2]=0.; // V0 type cut
1432  }
1433  SetCuts(nvars,nptbins,prodcutsval);
1434 
1435  SetGlobalIndex(nvars,nptbins);
1436  SetPtBins(nptbins+1,ptbins);
1437 
1438 
1439  //pid settings
1440  //1. bachelor: default one
1441  AliAODPidHF* pidObjBachelor = new AliAODPidHF();
1442  Double_t sigmasBac[5]={3.,1.,1.,3.,3.}; // 0, 1(A), 2(A) -> TPC; 3 -> TOF; 4 -> ITS
1443  pidObjBachelor->SetSigma(sigmasBac);
1444  pidObjBachelor->SetAsym(kFALSE);
1445  pidObjBachelor->SetMatch(1);
1446  pidObjBachelor->SetTPC(kTRUE);
1447  pidObjBachelor->SetTOF(kTRUE);
1448  pidObjBachelor->SetTOFdecide(kFALSE);
1449  SetPidHF(pidObjBachelor);
1450 
1451  SetUsePID(kFALSE);//(kTRUE);
1452 
1453  //PrintAll();
1454 
1455  for(Int_t iiv=0;iiv<nvars;iiv++){
1456  delete [] prodcutsval[iiv];
1457  }
1458  delete [] prodcutsval;
1459  prodcutsval=NULL;
1460  delete [] ptbins;
1461  ptbins=NULL;
1462 
1463 
1464  delete pidObjBachelor;
1465  pidObjBachelor=NULL;
1466 
1467  return;
1468 }
1469 //------------------
1471 
1472  SetName("LctoV0ProductionCuts");
1473  SetTitle("Production cuts for Lc->V0+bachelor analysis");
1474 
1476 
1477  return;
1478 }
1479 //------------------
1481 
1482  // Default 2010 PbPb cut object
1484 
1485  //
1486  // Enable all 2011 PbPb run triggers
1487  //
1488  SetTriggerClass("");
1492 
1493 }
1494 //-----------------------
1496 
1497  const Int_t nvars = this->GetNVars() ;
1498  //Float_t *vArray =GetCuts();
1499  //fV0Type = vArray[nvars-1];
1500  fV0Type = (this->GetCuts())[nvars-1];
1501  //this->GetCuts(vArray);
1502  TString *sVarNames=GetVarNames();
1503 
1504  if(sVarNames[nvars-1].Contains("V0 type")) return (Int_t)fV0Type;
1505  else {AliInfo("AliRDHFCutsLctoV0 Last variable is not the V0 type!!!"); return -999;}
1506 }
1507 
1508 //---------------------------------------------------------------------------
1510  //
1511  // print all cuts values
1512  //
1513 
1514  printf("Minimum vtx type %d\n",fMinVtxType);
1515  printf("Minimum vtx contr %d\n",fMinVtxContr);
1516  printf("Max vtx red chi2 %f\n",fMaxVtxRedChi2);
1517  printf("Min SPD mult %d\n",fMinSPDMultiplicity);
1518  printf("Use PID %d (PID selection flag = %d) OldPid=%d\n",(Int_t)fUsePID,(Int_t)fPidSelectionFlag,fPidHF ? fPidHF->GetOldPid() : -1);
1519  printf("High value for pT %f\n",fHighPtCut);
1520  printf("Low and high values for pT cuts: %f %f\n",fLowPtCut,fHighPtCut);
1521  printf("Remove daughters from vtx %d\n",(Int_t)fRemoveDaughtersFromPrimary);
1522  printf("Physics selection: %s\n",fUsePhysicsSelection ? "Yes" : "No");
1523  printf("Pileup rejection: %s\n",(fOptPileup > 0) ? "Yes" : "No");
1524  printf("UseTrackSelectionWithFilterBits: %s\n",fUseTrackSelectionWithFilterBits ? "Yes" : "No");
1525  printf("Reject kink: %s\n",fKinkReject ? "Yes" : "No");
1526  if(fOptPileup==1) printf(" -- Reject pileup event");
1527  if(fOptPileup==2) printf(" -- Reject tracks from pileup vtx");
1528  if(fUseCentrality>0) {
1529  TString estimator="";
1530  if(fUseCentrality==1) estimator = "V0";
1531  if(fUseCentrality==2) estimator = "Tracks";
1532  if(fUseCentrality==3) estimator = "Tracklets";
1533  if(fUseCentrality==4) estimator = "SPD clusters outer";
1534  printf("Centrality class considered: %.1f-%.1f, estimated with %s",fMinCentrality,fMaxCentrality,estimator.Data());
1535  }
1536  if(fIsCandTrackSPDFirst) printf("Check for candidates with pt < %2.2f, that daughters fullfill kFirst criteria\n",fMaxPtCandTrackSPDFirst);
1537 
1538  if(fVarNames){
1539  cout<<"Array of variables"<<endl;
1540  for(Int_t iv=0;iv<fnVars;iv++){
1541  cout<<fVarNames[iv]<<"\t";
1542  }
1543  cout<<endl;
1544  }
1545  if(fVarsForOpt){
1546  cout<<"Array of optimization"<<endl;
1547  for(Int_t iv=0;iv<fnVars;iv++){
1548  cout<<fVarsForOpt[iv]<<"\t";
1549  }
1550  cout<<endl;
1551  }
1552  if(fIsUpperCut){
1553  cout<<"Array of upper/lower cut"<<endl;
1554  for(Int_t iv=0;iv<fnVars;iv++){
1555  cout<<fIsUpperCut[iv]<<"\t";
1556  }
1557  cout<<endl;
1558  }
1559  if(fPtBinLimits){
1560  cout<<"Array of ptbin limits"<<endl;
1561  for(Int_t ib=0;ib<fnPtBinLimits;ib++){
1562  cout<<fPtBinLimits[ib]<<"\t";
1563  }
1564  cout<<endl;
1565  }
1566  if(fCutsRD){
1567  cout<<"Matrix of cuts"<<endl;
1568  for(Int_t iv=0;iv<fnVars;iv++){
1569  for(Int_t ib=0;ib<fnPtBins;ib++){
1570  cout<<"fCutsRD["<<iv<<"]["<<ib<<"] = "<<fCutsRD[GetGlobalIndex(iv,ib)]<<"\t";
1571  }
1572  cout<<endl;
1573  }
1574  cout<<endl;
1575  }
1576 
1577  if (fPidSelectionFlag==9) {
1578  for(Int_t ib=0;ib<fnPtBins;ib++){
1579  cout<<"fMinCombinedProbability["<<ib<<"] = "<<fMinCombinedProbability[ib]<<"\t";
1580  }
1581  cout<<endl;
1582  cout << " GetCombDetectors() = " << GetPidHF()->GetCombDetectors() << endl;
1583  }
1584 
1585  if (fTrackCuts) {
1586  Float_t eta1=0, eta2=0; fTrackCuts->GetEtaRange(eta1,eta2);
1587  cout << " etaRange for Bachelor: [" << eta1 << "," << eta2 << "]\n";
1588  }
1589  if (fV0daughtersCuts) {
1590  Float_t eta3=0, eta4=0; fV0daughtersCuts->GetEtaRange(eta3,eta4);
1591  cout << " etaRange for V0daughters: [" << eta3 << "," << eta4 << "]\n";
1592  }
1593  return;
1594 
1595 }
1596 
1597 //-------------------------
1599 {
1600  //
1601  //
1602  // Checking if Lc is in fiducial acceptance region
1603  //
1604  //
1605 
1606  if(fMaxRapidityCand>-998.){
1607  if(TMath::Abs(y) > fMaxRapidityCand) return kFALSE;
1608  else return kTRUE;
1609  }
1610 
1611  if(pt > 5.) {
1612  // applying cut for pt > 5 GeV
1613  AliDebug(2,Form("pt of Lambda_c = %f (> 5), cutting at |y| < 0.8",pt));
1614  if (TMath::Abs(y) > 0.8) return kFALSE;
1615 
1616  } else {
1617  // appliying smooth cut for pt < 5 GeV
1618  Double_t maxFiducialY = -0.2/15*pt*pt+1.9/15*pt+0.5;
1619  Double_t minFiducialY = 0.2/15*pt*pt-1.9/15*pt-0.5;
1620  AliDebug(2,Form("pt of Lambda_c = %f (< 5), cutting according to the fiducial zone [%f, %f]\n",pt,minFiducialY,maxFiducialY));
1621  if (y < minFiducialY || y > maxFiducialY) return kFALSE;
1622  }
1623  //
1624  return kTRUE;
1625 }
1626 //---------------------------------------------------------------------------
1628  //
1629  // Daughter tracks selection
1630  //
1631 
1633  if (!d) {
1634  AliDebug(2,"AliAODRecoCascadeHF null");
1635  return kFALSE;
1636  }
1637 
1638  if (!fTrackCuts) {
1639  AliFatal("Cut object is not defined for bachelor. Candidate accepted.");
1640  return kFALSE;
1641  }
1642 
1643  AliAODTrack * bachelorTrack = dynamic_cast<AliAODTrack*>(d->GetBachelor());
1644  if (!bachelorTrack) return kFALSE;
1645 
1647  if(!bachelorTrack->HasPointOnITSLayer(0)) return kFALSE;
1648  }
1649 
1650  if (fKinkReject != (!(fTrackCuts->GetAcceptKinkDaughters())) ) {
1651  AliError(Form("Not compatible setting: fKinkReject=%1d - fTrackCuts->GetAcceptKinkDaughters()=%1d",fKinkReject, fTrackCuts->GetAcceptKinkDaughters()));
1652  return kFALSE;
1653  }
1654 
1655  AliAODVertex *vAOD = d->GetPrimaryVtx();
1656  Double_t pos[3]; vAOD->GetXYZ(pos);
1657  Double_t cov[6]; vAOD->GetCovarianceMatrix(cov);
1658  const AliESDVertex vESD(pos,cov,100.,100);
1659 
1660  if (!IsDaughterSelected(bachelorTrack,&vESD,fTrackCuts,aod)) return kFALSE;
1661 
1662  if (!fV0daughtersCuts) {
1663  AliFatal("Cut object is not defined for V0daughters. Candidate accepted.");
1664  return kFALSE;
1665  }
1666 
1667  AliAODv0 * v0 = dynamic_cast<AliAODv0*>(d->Getv0());
1668  if (!v0) return kFALSE;
1669  AliAODTrack *v0positiveTrack = dynamic_cast<AliAODTrack*>(d->Getv0PositiveTrack());
1670  if (!v0positiveTrack) return kFALSE;
1671  AliAODTrack *v0negativeTrack = dynamic_cast<AliAODTrack*>(d->Getv0NegativeTrack());
1672  if (!v0negativeTrack) return kFALSE;
1673 
1674 
1675  Float_t etaMin=0, etaMax=0; fV0daughtersCuts->GetEtaRange(etaMin,etaMax);
1676  if ( (v0positiveTrack->Eta()<=etaMin || v0positiveTrack->Eta()>=etaMax) ||
1677  (v0negativeTrack->Eta()<=etaMin || v0negativeTrack->Eta()>=etaMax) ) return kFALSE;
1678  Float_t ptMin=0, ptMax=0; fV0daughtersCuts->GetPtRange(ptMin,ptMax);
1679  if ( (v0positiveTrack->Pt()<=ptMin || v0positiveTrack->Pt()>=ptMax) ||
1680  (v0negativeTrack->Pt()<=ptMin || v0negativeTrack->Pt()>=ptMax) ) return kFALSE;
1681 
1682  // Condition on nTPCclusters
1683  if (fV0daughtersCuts->GetMinNClusterTPC()>0) {
1684  if ( ( ( v0positiveTrack->GetTPCClusterInfo(2,1) ) < fV0daughtersCuts->GetMinNClusterTPC() ) ||
1685  ( ( v0negativeTrack->GetTPCClusterInfo(2,1) ) < fV0daughtersCuts->GetMinNClusterTPC() ) ) return kFALSE;
1686  }
1687 
1688  // kTPCrefit status
1689  if (v0->GetOnFlyStatus()==kFALSE) { // only for offline V0s
1690  if (fV0daughtersCuts->GetRequireTPCRefit()) {
1691  if( !(v0positiveTrack->GetStatus() & AliESDtrack::kTPCrefit)) return kFALSE;
1692  if( !(v0negativeTrack->GetStatus() & AliESDtrack::kTPCrefit)) return kFALSE;
1693  }
1694  }
1695  // kink condition
1696  if (!fV0daughtersCuts->GetAcceptKinkDaughters()) {
1697  AliAODVertex *maybeKinkPos = (AliAODVertex*)v0positiveTrack->GetProdVertex();
1698  AliAODVertex *maybeKinkNeg = (AliAODVertex*)v0negativeTrack->GetProdVertex();
1699  if (maybeKinkPos->GetType()==AliAODVertex::kKink ||
1700  maybeKinkNeg->GetType()==AliAODVertex::kKink) return kFALSE;
1701  }
1702  // Findable clusters > 0 condition - from V0 analysis
1703  //if( v0positiveTrack->GetTPCNclsF()<=0 || v0negativeTrack->GetTPCNclsF()<=0 ) return kFALSE;
1704  /*
1705  Float_t lPosTrackCrossedRows = v0positiveTrack->GetTPCClusterInfo(2,1);
1706  Float_t lNegTrackCrossedRows = v0positiveTrack->GetTPCClusterInfo(2,1);
1707  fTreeVariableLeastNbrCrossedRows = (Int_t) lPosTrackCrossedRows;
1708  if( lNegTrackCrossedRows < fTreeVariableLeastNbrCrossedRows )
1709  fTreeVariableLeastNbrCrossedRows = (Int_t) lNegTrackCrossedRows;
1710  //Compute ratio Crossed Rows / Findable clusters
1711  //Note: above test avoids division by zero!
1712  Float_t lPosTrackCrossedRowsOverFindable = lPosTrackCrossedRows / ((double)(pTrack->GetTPCNclsF()));
1713  Float_t lNegTrackCrossedRowsOverFindable = lNegTrackCrossedRows / ((double)(nTrack->GetTPCNclsF()));
1714  fTreeVariableLeastRatioCrossedRowsOverFindable = lPosTrackCrossedRowsOverFindable;
1715  if( lNegTrackCrossedRowsOverFindable < fTreeVariableLeastRatioCrossedRowsOverFindable )
1716  fTreeVariableLeastRatioCrossedRowsOverFindable = lNegTrackCrossedRowsOverFindable;
1717  //Lowest Cut Level for Ratio Crossed Rows / Findable = 0.8, set here
1718  if ( fTreeVariableLeastRatioCrossedRowsOverFindable < 0.8 ) return kFALSE;
1719  */
1720 
1721  return kTRUE;
1722 
1723 }
1724 
1725 //---------------------------------------------------------------------------
1727  //
1728  // store the combined probability cuts
1729  //
1730  if(nPtBins!=fnPtBins) {
1731  printf("Wrong number of pt bins: it has to be %d\n",fnPtBins);
1732  AliFatal("exiting");
1733  }
1734 
1736 
1737  for(Int_t ib=0; ib<fnPtBins; ib++) {
1738  fMinCombinedProbability[ib] = minProb[ib];
1739  }
1740  return;
1741 }
1742 
1743 //---------------------------------------------------------------------------
1745  //
1746  // Sign of d0 different from regular d0.
1747  // Sign defined using the position of crossing point with Lc vector
1748  // with respect to the primary vertex
1749  //
1751  if (!d) {
1752  AliDebug(2,"AliAODRecoCascadeHF null");
1753  return -9999;
1754  }
1755 
1756  AliAODTrack * bachelorTrack = dynamic_cast<AliAODTrack*>(d->GetBachelor());
1757  AliAODVertex *primvert = dynamic_cast<AliAODVertex*>(d->GetPrimaryVtx());
1758 
1759  Double_t d0z0bach[2],covd0z0bach[3];
1760  bachelorTrack->PropagateToDCA(primvert,fBzkG,kVeryBig,d0z0bach,covd0z0bach);
1761  Double_t tx[3];
1762  bachelorTrack->GetXYZ(tx);
1763  tx[0] -= primvert->GetX();
1764  tx[1] -= primvert->GetY();
1765  tx[2] -= primvert->GetZ();
1766  Double_t innerpro = tx[0]*d->Px()+tx[1]*d->Py();
1767  Double_t signd0 = 1.;
1768  if(innerpro<0.) signd0 = -1.;
1769 
1770  return signd0*TMath::Abs(d0z0bach[0]);
1771 }
AliESDtrackCuts * fV0daughtersCuts
virtual void SetStandardCutsPbPb2010()
Double_t fMaxPtCandTrackSPDFirst
flag to select the track kFirst criteria for pt < ptlimit
Definition: AliRDHFCuts.h:438
Int_t GetNVars() const
Definition: AliRDHFCuts.h:240
void SetAsym(Bool_t asym)
Definition: AliAODPidHF.h:88
double Double_t
Definition: External.C:58
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:409
virtual void SetStandardCutsPP2010()
Bool_t fRemoveDaughtersFromPrimary
Definition: AliRDHFCuts.h:415
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:402
ECombDetectors GetCombDetectors() const
Definition: AliAODPidHF.h:162
AliAODv0 * Getv0() const
virtual void SetStandardCutsPbPb2011()
Int_t fMinVtxContr
0: not cut; 1: SPDZ; 2: SPD3D; 3: Tracks
Definition: AliRDHFCuts.h:390
Double_t InvMassLctoLambdaPi() const
Bool_t AreLctoV0DaughtersSelected(AliAODRecoDecayHF *rd, AliAODEvent *aod=0x0) const
Float_t fMaxVtxRedChi2
minimum vertex contributors
Definition: AliRDHFCuts.h:391
Int_t CombineCuts(Int_t returnvalueTrack, Int_t returnvalue, Int_t returnvaluePID) const
Float_t * fMinCombinedProbability
cut to be excluded (-1=none)
const Float_t * GetCuts() const
Definition: AliRDHFCuts.h:244
Float_t fV0Type
cuts for v0 daughters (AOD converted to ESD on the flight!)
void SetNVars(Int_t nVars)
Definition: AliRDHFCuts.h:383
Int_t fMinVtxType
cuts on the event
Definition: AliRDHFCuts.h:389
Double_t fMaxRapidityCand
minimum pt of the candidate
Definition: AliRDHFCuts.h:435
void EnableSemiCentralTrigger()
Definition: AliRDHFCuts.h:94
AliRDHFCutsLctoV0 & operator=(const AliRDHFCutsLctoV0 &source)
TString * GetVarNames() const
Definition: AliRDHFCuts.h:241
Double_t ptMin
Int_t ApplyPidTPCRaw(AliAODTrack *track, Int_t specie) const
void SetGlobalIndex()
Definition: AliRDHFCuts.h:198
AliRDHFCuts & operator=(const AliRDHFCuts &source)
Int_t fUseCentrality
flag to use a multiplicity dependent pileup selection
Definition: AliRDHFCuts.h:422
Bool_t fUsePID
Definition: AliRDHFCuts.h:410
void SetPidHF(AliAODPidHF *pidObj)
see enum below
Definition: AliRDHFCuts.h:212
Double_t InvMassLctoK0sP() const
Bool_t GetOldPid()
Definition: AliAODPidHF.h:157
AliAODPidHF * GetPidHF() const
Definition: AliRDHFCuts.h:237
void SetTOF(Bool_t tof)
Definition: AliAODPidHF.h:95
AliAODTrack * Getv0PositiveTrack() const
const Int_t nPtBins
virtual void GetCutVarsForOpt(AliAODRecoDecayHF *d, Float_t *vars, Int_t nvars, Int_t *pdgdaughters)
Double_t GetReSignedd0(AliAODRecoDecayHF *d)
int Int_t
Definition: External.C:63
Bool_t fUseTrackSelectionWithFilterBits
flag to reject kink daughters
Definition: AliRDHFCuts.h:445
void SetCuts(Int_t nVars, Int_t nPtBins, Float_t **cutsRD)
Int_t fnVarsForOpt
Definition: AliRDHFCuts.h:405
void ResetMaskAndEnableMBTrigger()
Definition: AliRDHFCuts.h:74
unsigned int UInt_t
Definition: External.C:33
AliPIDCombined * GetPidCombined() const
Definition: AliAODPidHF.h:161
float Float_t
Definition: External.C:68
TString * fVarNames
number of cut vars for candidates
Definition: AliRDHFCuts.h:404
Double_t fMaxPtCand
minimum pt of the candidate
Definition: AliRDHFCuts.h:434
AliESDtrackCuts * fTrackCuts
quality cuts on the daughter tracks
Definition: AliRDHFCuts.h:398
void AddTrackCutsV0daughters(AliESDtrackCuts *v0daug)
Float_t fLowPtCut
high pT cut separation for proton identification
AliAODTrack * GetBachelor() const
Int_t fOptPileup
use Physics selection criteria
Definition: AliRDHFCuts.h:418
Bool_t IsExcluded(AliAODTrack *track, Int_t labelTrack, Double_t nsigmaCut, TString detector)
virtual void PrintAll() const
Float_t fMinCentrality
Definition: AliRDHFCuts.h:427
AliPIDResponse * GetPidResponse() const
Definition: AliAODPidHF.h:160
Int_t fnPtBinLimits
number of pt bins for cuts
Definition: AliRDHFCuts.h:401
void SetSigma(Double_t *sigma)
Definition: AliAODPidHF.h:39
Float_t * fCutsRD
fnVars*fnPtBins
Definition: AliRDHFCuts.h:408
Double_t CosV0PointingAngle() const
short Short_t
Definition: External.C:23
Int_t ApplyPidTOFRaw(AliAODTrack *track, Int_t specie) const
void SetVarsForOpt(Int_t nVars, Bool_t *forOpt)
ClassImp(AliAnalysisTaskDeltaPt) AliAnalysisTaskDeltaPt
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:406
void SetMinCombinedProbability(Int_t ptBins, Float_t *ptMin)
Bool_t PreSelect(TObject *obj, AliAODv0 *v0, AliVTrack *bachelorTrack)
void EnableCentralTrigger()
Definition: AliRDHFCuts.h:82
void CheckPID(Int_t candPtBin, AliAODTrack *bachelor, AliAODTrack *, AliAODTrack *, Bool_t &isBachelorID1, Bool_t &isBachelorID2, Bool_t &isBachelorID4)
Int_t fMinSPDMultiplicity
maximum |z| of primary vertex
Definition: AliRDHFCuts.h:393
void SetUsePID(Bool_t flag=kTRUE)
Definition: AliRDHFCuts.h:206
Int_t fExcludedCut
low pT cut separation for proton identification
Bool_t fIsCandTrackSPDFirst
IsSelected returns always kTRUE for MC signal.
Definition: AliRDHFCuts.h:437
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:444
Bool_t fUsePhysicsSelection
use MC primary vertex
Definition: AliRDHFCuts.h:417
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:204
void SetTPC(Bool_t tpc)
Definition: AliAODPidHF.h:94
bool Bool_t
Definition: External.C:53
Int_t fnPtBins
cuts on the candidate
Definition: AliRDHFCuts.h:400
Float_t fHighPtCut
V0 type – should be defined as in AliRDHFCuts.h.
Double_t ptMax
void SetTriggerClass(TString trclass0, TString trclass1="")
Definition: AliRDHFCuts.h:194
AliAODPidHF * fPidHF
enable AOD049 centrality cleanup
Definition: AliRDHFCuts.h:412
virtual Bool_t IsInFiducialAcceptance(Double_t pt, Double_t y) const
Int_t PtBin(Double_t pt) const
Int_t GetGlobalIndex(Int_t iVar, Int_t iPtBin) const
Int_t IsSelectedSingleCut(TObject *obj, Int_t selectionLevel, Int_t cutIndex, AliAODEvent *aod=0x0)
Int_t nptbins
Double_t fMinPtCand
outcome of PID selection
Definition: AliRDHFCuts.h:433
Bool_t IsDaughterSelected(AliAODTrack *track, const AliESDVertex *primary, AliESDtrackCuts *cuts, const AliAODEvent *aod=0x0) const
virtual Int_t IsSelected(TObject *obj, Int_t selectionLevel)
Float_t fMaxCentrality
minimum centrality for selected events
Definition: AliRDHFCuts.h:428
virtual Int_t IsSelectedPID(AliAODRecoDecayHF *obj)
Int_t fnVars
Definition: AliRDHFCuts.h:403