AliPhysics  a9863a5 (a9863a5)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliAnalysisTaskSELambdacTMVA.cxx
Go to the documentation of this file.
1 /**************************************************************************
2  * Copyright(c) 1998-2008, 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: AliAnalysisTaskSELambdacTMVA.cxx$ */
17 
18 //*************************************************************************
19 // AliAnalysisTaskSE for the Lambdac candidates, for TMVA analysis,
20 // and checks on MC generated and reconstructed Lambdac
21 //
22 // Modified from AliAnalysisTaskSELambdac
23 // Authors: Jaime Norman (jaime.norman@cern.ch)
24 // Marcel Figueredo (marcel.figueredo@cern.ch)
25 //*************************************************************************
26 
27 
28 #include <TClonesArray.h>
29 #include <TNtuple.h>
30 #include <TCanvas.h>
31 #include <TList.h>
32 #include <TString.h>
33 #include <TH1F.h>
34 #include <TH2F.h>
35 #include <TDatabasePDG.h>
36 
37 #include <AliAnalysisDataSlot.h>
38 #include <AliAnalysisDataContainer.h>
39 #include "AliAnalysisManager.h"
40 #include "AliAODHandler.h"
41 #include "AliAODEvent.h"
42 #include "AliAODVertex.h"
43 #include "AliAODTrack.h"
44 #include "AliAODMCHeader.h"
45 #include "AliAODMCParticle.h"
47 #include "AliAnalysisVertexingHF.h"
48 #include "AliAnalysisTaskSE.h"
50 #include "AliKFParticle.h"
51 #include "AliAODPidHF.h"
52 #include "AliRDHFCutsLctopKpi.h"
53 #include "AliRDHFCuts.h"
54 #include "AliKFVertex.h"
55 #include "AliESDVertex.h"
56 //#include "AliAODpidUtil.h"
57 #include "AliAODPid.h"
58 #include "AliInputEventHandler.h"
59 #include "AliPID.h"
61 #include "AliVertexingHFUtils.h"
62 #include "AliCFVertexingHF3Prong.h"
63 #include "AliCFTaskVertexingHF.h"
64 #include "AliLog.h"
65 
69 
70  //________________________________________________________________________
72  AliAnalysisTaskSE(),
73  fOutput(0),
74  fHistNEvents(0),
75  fHistNEventsRejTM(0),
76  fhSelectBit(0),
77  fhSelectionBits(0),
78  fhSelectionBitsSigc(0),
79  fhSelectionBitsSigb(0),
80  fhSetIsLc(0),
81  fhPIDmassLcPt(0),
82  fhPIDmassLcPtSig(0),
83  fhPIDmassLcPtSigc(0),
84  fhPIDmassLcPtSigb(0),
85  fhMCmassLcPt(0),
86  fhMCmassLcPtSig(0),
87  fhMCmassLcPtSigc(0),
88  fhMCmassLcPtSigb(0),
89  fhProbmassLcPt(0),
90  fhProbmassLcPtSig(0),
91  fhProbmassLcPtSigc(0),
92  fhProbmassLcPtSigb(0),
93  fhIsLcResonantGen(0),
94  fhIsLcResonantReco(0),
95  fhIsLcGen(0),
96  fhIsLcReco(0),
97  fhRecoPDGmom(0),
98  fhPtMisIdpKpi(0),
99  fhPtMisIdpiKp(0),
100  fhPtCorrId(0),
101  fhInvMassMisIdpKpi(0),
102  fhInvMassMisIdpiKp(0),
103  fhPtMisIdpKpiProb(0),
104  fhPtMisIdpiKpProb(0),
105  fhPtCorrIdProb(0),
106  fhInvMassMisIdpKpiProb(0),
107  fhInvMassMisIdpiKpProb(0),
108  fNtupleLambdac(0),
109  fFuncWeightPythia(0),
110  fFuncWeightFONLL7overLHC10f6a(0),
111  fFuncWeightFONLL5overLHC13d3(0),
112  fFuncWeightFONLL5overLHC10f6a(0),
113  fIsLc(0),
114  fIsLcResonant(0),
115  fPtLc(0.),
116  fUpmasslimit(2.486),
117  fLowmasslimit(2.086),
118  fRDCutsAnalysis(0),
119  fListCuts(0),
120  fFillNtuple(0),
121  fKeepLcNotFromQuark(kFALSE),
122  fKeepBkgNt(kTRUE),
123  fSyst(2),
124  fReadMC(kFALSE),
125  fMCPid(kFALSE),
126  fRealPid(kFALSE),
127  fResPid(kTRUE),
128  fUseKF(kFALSE),
129  fAnalysis(kFALSE),
130  fVHF(0),
131  fLcCut(kFALSE),
132  fLcPIDCut(kFALSE),
133  fIsHijing(kFALSE),
134  fNentries(0),
135  fPIDResponse(0),
136  fCounter(0),
137  fVertUtil(0)
138 
139 {
140  //
142  //
143 
144  for(Int_t i=0;i<12;i++) {
145  fhNBkgNI[i]=0x0;
146  fhNLc[i]=0x0;
147  fhNLcc[i]=0x0;
148  fhNLcNonRc[i]=0x0;
149  fhNLcL1520c[i]=0x0;
150  fhNLcKstarc[i]=0x0;
151  fhNLcDeltac[i]=0x0;
152  fhNLcb[i]=0x0;
153  fhNLcNonRb[i]=0x0;
154  fhNLcL1520b[i]=0x0;
155  fhNLcKstarb[i]=0x0;
156  fhNLcDeltab[i]=0x0;
157 
158  fhPtEtaBkgNI[i]=0x0;
159  fhPtEtaLc[i]=0x0;
160  fhPtEtaLcc[i]=0x0;
161  fhPtEtaLcNonRc[i]=0x0;
162  fhPtEtaLcL1520c[i]=0x0;
163  fhPtEtaLcKstarc[i]=0x0;
164  fhPtEtaLcDeltac[i]=0x0;
165  fhPtEtaLcb[i]=0x0;
166  fhPtEtaLcNonRb[i]=0x0;
167  fhPtEtaLcL1520b[i]=0x0;
168  fhPtEtaLcKstarb[i]=0x0;
169  fhPtEtaLcDeltab[i]=0x0;
170 
171  fhPtYBkgNI[i]=0x0;
172  fhPtYLc[i]=0x0;
173  fhPtYLcc[i]=0x0;
174  fhPtYLcNonRc[i]=0x0;
175  fhPtYLcL1520c[i]=0x0;
176  fhPtYLcKstarc[i]=0x0;
177  fhPtYLcDeltac[i]=0x0;
178  fhPtYLcb[i]=0x0;
179  fhPtYLcNonRb[i]=0x0;
180  fhPtYLcL1520b[i]=0x0;
181  fhPtYLcKstarb[i]=0x0;
182  fhPtYLcDeltab[i]=0x0;
183 
184  fhPtPhiBkgNI[i]=0x0;
185  fhPtPhiLc[i]=0x0;
186  fhPtPhiLcc[i]=0x0;
187  fhPtPhiLcNonRc[i]=0x0;
188  fhPtPhiLcL1520c[i]=0x0;
189  fhPtPhiLcKstarc[i]=0x0;
190  fhPtPhiLcDeltac[i]=0x0;
191  fhPtPhiLcb[i]=0x0;
192  fhPtPhiLcNonRb[i]=0x0;
193  fhPtPhiLcL1520b[i]=0x0;
194  fhPtPhiLcKstarb[i]=0x0;
195  fhPtPhiLcDeltab[i]=0x0;
196 
197  }
198 }
199 
200 //________________________________________________________________________
202  AliAnalysisTaskSE(name),
203  fOutput(0),
204  fHistNEvents(0),
205  fHistNEventsRejTM(0),
206  fhSelectBit(0),
207  fhSelectionBits(0),
208  fhSelectionBitsSigc(0),
209  fhSelectionBitsSigb(0),
210  fhSetIsLc(0),
211  fhPIDmassLcPt(0),
212  fhPIDmassLcPtSig(0),
213  fhPIDmassLcPtSigc(0),
214  fhPIDmassLcPtSigb(0),
215  fhMCmassLcPt(0),
216  fhMCmassLcPtSig(0),
217  fhMCmassLcPtSigc(0),
218  fhMCmassLcPtSigb(0),
219  fhProbmassLcPt(0),
220  fhProbmassLcPtSig(0),
221  fhProbmassLcPtSigc(0),
222  fhProbmassLcPtSigb(0),
223  fhIsLcResonantGen(0),
224  fhIsLcResonantReco(0),
225  fhIsLcGen(0),
226  fhIsLcReco(0),
227  fhRecoPDGmom(0),
228  fhPtMisIdpKpi(0),
229  fhPtMisIdpiKp(0),
230  fhPtCorrId(0),
231  fhInvMassMisIdpKpi(0),
232  fhInvMassMisIdpiKp(0),
233  fhPtMisIdpKpiProb(0),
234  fhPtMisIdpiKpProb(0),
235  fhPtCorrIdProb(0),
236  fhInvMassMisIdpKpiProb(0),
237  fhInvMassMisIdpiKpProb(0),
238  fNtupleLambdac(0),
239  fFuncWeightPythia(0),
240  fFuncWeightFONLL7overLHC10f6a(0),
241  fFuncWeightFONLL5overLHC13d3(0),
242  fFuncWeightFONLL5overLHC10f6a(0),
243  fIsLc(0),
244  fIsLcResonant(0),
245  fPtLc(0.),
246  fUpmasslimit(2.486),
247  fLowmasslimit(2.086),
248  fRDCutsAnalysis(lccutsana),
249  fListCuts(0),
250  fFillNtuple(fillNtuple),
251  fKeepLcNotFromQuark(kFALSE),
252  fKeepBkgNt(kTRUE),
253  fSyst(2),
254  fReadMC(kFALSE),
255  fMCPid(kFALSE),
256  fRealPid(kFALSE),
257  fResPid(kTRUE),
258  fUseKF(kFALSE),
259  fAnalysis(kFALSE),
260  fVHF(0),
261  fLcCut(kFALSE),
262  fLcPIDCut(kFALSE),
263  fIsHijing(kFALSE),
264  fNentries(0),
265  fPIDResponse(0),
266  fCounter(0),
267  fVertUtil(0)
268 {
269  //
272  //
273  for(Int_t i=0;i<12;i++) {
274  fhNBkgNI[i]=0x0;
275  fhNLc[i]=0x0;
276  fhNLcc[i]=0x0;
277  fhNLcNonRc[i]=0x0;
278  fhNLcL1520c[i]=0x0;
279  fhNLcKstarc[i]=0x0;
280  fhNLcDeltac[i]=0x0;
281  fhNLcb[i]=0x0;
282  fhNLcNonRb[i]=0x0;
283  fhNLcL1520b[i]=0x0;
284  fhNLcKstarb[i]=0x0;
285  fhNLcDeltab[i]=0x0;
286 
287  fhPtEtaBkgNI[i]=0x0;
288  fhPtEtaLc[i]=0x0;
289  fhPtEtaLcc[i]=0x0;
290  fhPtEtaLcNonRc[i]=0x0;
291  fhPtEtaLcL1520c[i]=0x0;
292  fhPtEtaLcKstarc[i]=0x0;
293  fhPtEtaLcDeltac[i]=0x0;
294  fhPtEtaLcb[i]=0x0;
295  fhPtEtaLcNonRb[i]=0x0;
296  fhPtEtaLcL1520b[i]=0x0;
297  fhPtEtaLcKstarb[i]=0x0;
298  fhPtEtaLcDeltab[i]=0x0;
299 
300  fhPtYBkgNI[i]=0x0;
301  fhPtYLc[i]=0x0;
302  fhPtYLcc[i]=0x0;
303  fhPtYLcNonRc[i]=0x0;
304  fhPtYLcL1520c[i]=0x0;
305  fhPtYLcKstarc[i]=0x0;
306  fhPtYLcDeltac[i]=0x0;
307  fhPtYLcb[i]=0x0;
308  fhPtYLcNonRb[i]=0x0;
309  fhPtYLcL1520b[i]=0x0;
310  fhPtYLcKstarb[i]=0x0;
311  fhPtYLcDeltab[i]=0x0;
312 
313  fhPtPhiBkgNI[i]=0x0;
314  fhPtPhiLc[i]=0x0;
315  fhPtPhiLcc[i]=0x0;
316  fhPtPhiLcNonRc[i]=0x0;
317  fhPtPhiLcL1520c[i]=0x0;
318  fhPtPhiLcKstarc[i]=0x0;
319  fhPtPhiLcDeltac[i]=0x0;
320  fhPtPhiLcb[i]=0x0;
321  fhPtPhiLcNonRb[i]=0x0;
322  fhPtPhiLcL1520b[i]=0x0;
323  fhPtPhiLcKstarb[i]=0x0;
324  fhPtPhiLcDeltab[i]=0x0;
325 
326  }
328 
329  DefineOutput(1,TList::Class()); //My private output
330  DefineOutput(2,TList::Class());
331  DefineOutput(3,TH1F::Class());
332  DefineOutput(4,AliNormalizationCounter::Class());
333  if (fFillNtuple) {
334  // Output slot #2 writes into a TNtuple container
335  DefineOutput(5,TNtuple::Class()); //My private output
336  }
337 }
338 
339 
340 //________________________________________________________________________
342 {
343  //
345  //
346 
347  if (fOutput) {
348  delete fOutput;
349  fOutput = 0;
350  }
351 
352 
353  if (fVHF) {
354  delete fVHF;
355  fVHF = 0;
356  }
357 
358  if(fRDCutsAnalysis){
359  delete fRDCutsAnalysis;
360  fRDCutsAnalysis = 0;
361  }
362 
363  if (fListCuts) {
364  delete fListCuts;
365  fListCuts = 0;
366  }
367  if (fNentries){
368  delete fNentries;
369  fNentries = 0;
370  }
371  /*
372  if (fUtilPid){
373  delete fUtilPid;
374  fUtilPid = 0;
375  }
376  */
377  if (fPIDResponse) {
378  delete fPIDResponse;
379  }
380  if(fCounter){
381  delete fCounter;
382  fCounter = 0;
383  }
384  if(fVertUtil) {
385  delete fVertUtil;
386  fVertUtil = 0;
387  }
388 
389 }
390 
391 
392 
393 //_________________________________________________________________
395 {
396  //
398  //
399 
400  if (fDebug > 1) printf("AnalysisTaskSELambdac::Init() \n");
401 
402  fListCuts=new TList();
403  fListCuts->SetOwner();
404 
406  PostData(2,fListCuts);
407 
408  return;
409 }
410 
411 //________________________________________________________________________
413 {
414  //
416  //
417 
418  if (fDebug > 1) printf("AnalysisTaskSELambdac::UserCreateOutputObjects() \n");
419 
420  // Several histograms are more conveniently managed in a TList
421  fOutput = new TList();
422  fOutput->SetOwner();
423  fOutput->SetName("OutputHistos");
424 
425  TString hisname,histitle;
426 
427  //Lc bit QA
428  fhSelectBit = new TH1F("hSelectBit","hSelectBit",5,-0.5,4.5);
429  fhSelectBit->GetXaxis()->SetBinLabel(2,"All");
430  fhSelectBit->GetXaxis()->SetBinLabel(3,"SelectionMap");
431  fhSelectBit->GetXaxis()->SetBinLabel(4,"!LcCut");
432  fhSelectBit->GetXaxis()->SetBinLabel(5,"!LcPID");
433  fhSelectBit->GetXaxis()->SetNdivisions(1,kFALSE);
434  fOutput->Add(fhSelectBit);
435 
436  fHistNEvents = new TH1F("fHistNEvents", "Number of processed events; ; Events",3,-0.5,2.5);
437  fHistNEvents->GetXaxis()->SetBinLabel(2,"N events");
438  fHistNEvents->GetXaxis()->SetBinLabel(3,"N events (after selection)");
439  fHistNEvents->GetXaxis()->SetNdivisions(1,kFALSE);
440  fHistNEvents->Sumw2();
441  fOutput->Add(fHistNEvents);
442 
443  fhPIDmassLcPt = new TH2F("hPIDmassLcPt","hPIDmassLcPt;3-Prong p_{T} GeV/c;Invariant mass pK#pi (GeV/c)",150,0.,15.,(fUpmasslimit-fLowmasslimit)/0.002,fLowmasslimit,fUpmasslimit);
444  fhPIDmassLcPtSig = new TH2F("hPIDmassLcPtSig","hPIDmassLcPtSig;3-Prong signal p_{T} GeV/c;Invariant mass pK#pi (GeV/c)",150,0.,15.,(fUpmasslimit-fLowmasslimit)/0.002,fLowmasslimit,fUpmasslimit);
445  fhPIDmassLcPtSigc = new TH2F("hPIDmassLcPtSigc","hPIDmassLcPtSigc;3-Prong signal p_{T} GeV/c;Invariant mass pK#pi (GeV/c)",150,0.,15.,(fUpmasslimit-fLowmasslimit)/0.002,fLowmasslimit,fUpmasslimit);
446  fhPIDmassLcPtSigb = new TH2F("hPIDmassLcPtSigb","hPIDmassLcPtSigb;3-Prong signal p_{T} GeV/c;Invariant mass pK#pi (GeV/c)",150,0.,15.,(fUpmasslimit-fLowmasslimit)/0.002,fLowmasslimit,fUpmasslimit);
447  fhMCmassLcPt = new TH2F("hMCmassLcPt","hMCmassLcPt;3-Prong p_{T} GeV/c;Invariant mass pK#pi (GeV/c)",150,0.,15.,(fUpmasslimit-fLowmasslimit)/0.002,fLowmasslimit,fUpmasslimit);
448  fhMCmassLcPtSig = new TH2F("hMCmassLcPtSig","hMCmassLcPtSig;3-Prong signal p_{T} GeV/c;Invariant mass pK#pi (GeV/c)",150,0.,15.,(fUpmasslimit-fLowmasslimit)/0.002,fLowmasslimit,fUpmasslimit);
449  fhMCmassLcPtSigc = new TH2F("hMCmassLcPtSigc","hMCmassLcPtSigc;3-Prong signal p_{T} GeV/c;Invariant mass pK#pi (GeV/c)",150,0.,15.,(fUpmasslimit-fLowmasslimit)/0.002,fLowmasslimit,fUpmasslimit);
450  fhMCmassLcPtSigb = new TH2F("hMCmassLcPtSigb","hMCmassLcPtSigb;3-Prong signal p_{T} GeV/c;Invariant mass pK#pi (GeV/c)",150,0.,15.,(fUpmasslimit-fLowmasslimit)/0.002,fLowmasslimit,fUpmasslimit);
451  fhProbmassLcPt = new TH2F("hProbmassLcPt","hProbmassLcPt;3-Prong p_{T} GeV/c;Invariant mass pK#pi (GeV/c)",150,0.,15.,(fUpmasslimit-fLowmasslimit)/0.002,fLowmasslimit,fUpmasslimit);
452  fhProbmassLcPtSig = new TH2F("hProbmassLcPtSig","hProbmassLcPtSig;3-Prong signal p_{T} GeV/c;Invariant mass pK#pi (GeV/c)",150,0.,15.,(fUpmasslimit-fLowmasslimit)/0.002,fLowmasslimit,fUpmasslimit);
453  fhProbmassLcPtSigc = new TH2F("hProbmassLcPtSigc","hProbmassLcPtSigc;3-Prong signal p_{T} GeV/c;Invariant mass pK#pi (GeV/c)",150,0.,15.,(fUpmasslimit-fLowmasslimit)/0.002,fLowmasslimit,fUpmasslimit);
454  fhProbmassLcPtSigb = new TH2F("hProbmassLcPtSigb","hProbmassLcPtSigb;3-Prong signal p_{T} GeV/c;Invariant mass pK#pi (GeV/c)",150,0.,15.,(fUpmasslimit-fLowmasslimit)/0.002,fLowmasslimit,fUpmasslimit);
455  fOutput->Add(fhPIDmassLcPt);
459  fOutput->Add(fhMCmassLcPt);
460  fOutput->Add(fhMCmassLcPtSig);
463  fOutput->Add(fhProbmassLcPt);
467 
468  fhIsLcResonantGen = new TH1F("hIsLcResonantGen","IsLcResonant flag gen",6,-1.5,4.5);
469  fhIsLcResonantReco = new TH1F("hIsLcResonantReco","IsLcResonant flag reco",6,-1.5,4.5);
470  fhIsLcGen = new TH1F("hIsLcGen","IsLc flag gen",4,-1.5,2.5);
471  fhIsLcReco = new TH1F("hIsLcReco","IsLc flag reco",4,-1.5,2.5);
474  fOutput->Add(fhIsLcGen);
475  fOutput->Add(fhIsLcReco);
476 
477  fhRecoPDGmom = new TH1F("hRecoPDGmom","pdg of mother reco. MatchToMCLambdac",7,-0.5,6.5);
478  fOutput->Add(fhRecoPDGmom);
479 
480  fhSetIsLc = new TH1F("hSetIsLc","Check candidates before/after rec. set is Lc",2,-0.5,1.5);
481  fOutput->Add(fhSetIsLc);
482 
483  fhSelectionBits = new TH2F("hSelectionBits","Reconstruction + selection bit",13,-0.5,12.5,150,0,15);
484  fhSelectionBits->GetXaxis()->SetBinLabel(2,"D0toKpiCuts");
485  fhSelectionBits->GetXaxis()->SetBinLabel(3,"D0toKpiPID");
486  fhSelectionBits->GetXaxis()->SetBinLabel(4,"D0fromDstarCuts");
487  fhSelectionBits->GetXaxis()->SetBinLabel(5,"D0fromDstarPID");
488  fhSelectionBits->GetXaxis()->SetBinLabel(6,"DplusCuts");
489  fhSelectionBits->GetXaxis()->SetBinLabel(7,"DplusPID");
490  fhSelectionBits->GetXaxis()->SetBinLabel(8,"DsCuts");
491  fhSelectionBits->GetXaxis()->SetBinLabel(9,"DsPID");
492  fhSelectionBits->GetXaxis()->SetBinLabel(10,"LcCuts");
493  fhSelectionBits->GetXaxis()->SetBinLabel(11,"LcPID");
494  fhSelectionBits->GetXaxis()->SetBinLabel(12,"DstarCuts");
495  fhSelectionBits->GetXaxis()->SetBinLabel(13,"DstarPID");
496  fhSelectionBits->GetYaxis()->SetTitle("p_{T} (GeV/c)");
497  fhSelectionBits->GetXaxis()->SetNdivisions(1,kFALSE);
498  fOutput->Add(fhSelectionBits);
499 
500  fhSelectionBitsSigc = new TH2F("hSelectionBitsSigc","Reconstruction + selection bit from c",13,-0.5,12.5,150,0,15);
501  fhSelectionBitsSigc->GetXaxis()->SetBinLabel(2,"D0toKpiCuts");
502  fhSelectionBitsSigc->GetXaxis()->SetBinLabel(3,"D0toKpiPID");
503  fhSelectionBitsSigc->GetXaxis()->SetBinLabel(4,"D0fromDstarCuts");
504  fhSelectionBitsSigc->GetXaxis()->SetBinLabel(5,"D0fromDstarPID");
505  fhSelectionBitsSigc->GetXaxis()->SetBinLabel(6,"DplusCuts");
506  fhSelectionBitsSigc->GetXaxis()->SetBinLabel(7,"DplusPID");
507  fhSelectionBitsSigc->GetXaxis()->SetBinLabel(8,"DsCuts");
508  fhSelectionBitsSigc->GetXaxis()->SetBinLabel(9,"DsPID");
509  fhSelectionBitsSigc->GetXaxis()->SetBinLabel(10,"LcCuts");
510  fhSelectionBitsSigc->GetXaxis()->SetBinLabel(11,"LcPID");
511  fhSelectionBitsSigc->GetXaxis()->SetBinLabel(12,"DstarCuts");
512  fhSelectionBitsSigc->GetXaxis()->SetBinLabel(13,"DstarPID");
513  fhSelectionBitsSigc->GetYaxis()->SetTitle("p_{T} (GeV/c)");
514  fhSelectionBitsSigc->GetXaxis()->SetNdivisions(1,kFALSE);
516 
517  fhSelectionBitsSigb = new TH2F("hSelectionBitsSigb","Reconstruction + selection bit from b",13,-0.5,13.5,150,0,15);
518  fhSelectionBitsSigb->GetXaxis()->SetBinLabel(2,"D0toKpiCuts");
519  fhSelectionBitsSigb->GetXaxis()->SetBinLabel(3,"D0toKpiPID");
520  fhSelectionBitsSigb->GetXaxis()->SetBinLabel(4,"D0fromDstarCuts");
521  fhSelectionBitsSigb->GetXaxis()->SetBinLabel(5,"D0fromDstarPID");
522  fhSelectionBitsSigb->GetXaxis()->SetBinLabel(6,"DplusCuts");
523  fhSelectionBitsSigb->GetXaxis()->SetBinLabel(7,"DplusPID");
524  fhSelectionBitsSigb->GetXaxis()->SetBinLabel(8,"DsCuts");
525  fhSelectionBitsSigb->GetXaxis()->SetBinLabel(9,"DsPID");
526  fhSelectionBitsSigb->GetXaxis()->SetBinLabel(10,"LcCuts");
527  fhSelectionBitsSigb->GetXaxis()->SetBinLabel(11,"LcPID");
528  fhSelectionBitsSigb->GetXaxis()->SetBinLabel(12,"DstarCuts");
529  fhSelectionBitsSigb->GetXaxis()->SetBinLabel(13,"DstarPID");
530  fhSelectionBitsSigb->GetYaxis()->SetTitle("p_{T} (GeV/c)");
531  fhSelectionBitsSigb->GetXaxis()->SetNdivisions(1,kFALSE);
533 
534 // enum ESele {kD0toKpiCuts,kD0toKpiPID,kD0fromDstarCuts,kD0fromDstarPID,kDplusCuts,kDplusPID,kDsCuts,kDsPID,kLcCuts,kLcPID,kDstarCuts,kDstarPID};
535 
536  TString stepnames[12] = {"GeneratedLimAcc","GeneratedAll","Generated","GeneratedAcc","Reco3Prong","LcBit","IsSelectedTracks","IsInFidAcc","PtRange","IsSelectedCandidate","IsSelectedPID","IsSelectedNtuple"};
537  for(Int_t i=0;i<12;i++) { // histograms for efficiency cross check
538  //Lc vs Pt histograms
539  hisname.Form("hNBkgNI%i",i);
540  histitle.Form("N Bkg not injected %s",stepnames[i].Data());
541  fhNBkgNI[i] = new TH1F(hisname.Data(),histitle.Data(),100,0,20);
542  hisname.Form("hNLc%i",i);
543  histitle.Form("N Lc %s",stepnames[i].Data());
544  fhNLc[i] = new TH1F(hisname.Data(),histitle.Data(),100,0,20);
545  hisname.Form("hNLcc%i",i);
546  histitle.Form("N Lc from c %s",stepnames[i].Data());
547  fhNLcc[i] = new TH1F(hisname.Data(),histitle.Data(),100,0,20);
548  hisname.Form("hNLcNonRc%i",i);
549  histitle.Form("N Lc non resonant from c %s",stepnames[i].Data());
550  fhNLcNonRc[i] = new TH1F(hisname.Data(),histitle.Data(),100,0,20);
551  hisname.Form("hNLcL1520c%i",i);
552  histitle.Form("N Lc -> L(1520) + p from c %s",stepnames[i].Data());
553  fhNLcL1520c[i] = new TH1F(hisname.Data(),histitle.Data(),100,0,20);
554  hisname.Form("hNLcKstarc%i",i);
555  histitle.Form("N Lc -> K* + pi from c %s",stepnames[i].Data());
556  fhNLcKstarc[i] = new TH1F(hisname.Data(),histitle.Data(),100,0,20);
557  hisname.Form("hNLcDeltac%i",i);
558  histitle.Form("N Lc -> Delta + K from c %s",stepnames[i].Data());
559  fhNLcDeltac[i] = new TH1F(hisname.Data(),histitle.Data(),100,0,20);
560  hisname.Form("hNLcb%i",i);
561  histitle.Form("N Lc from b %s",stepnames[i].Data());
562  fhNLcb[i] = new TH1F(hisname.Data(),histitle.Data(),100,0,20);
563  hisname.Form("hNLcNonRb%i",i);
564  histitle.Form("N Lc non resonant from b %s",stepnames[i].Data());
565  fhNLcNonRb[i] = new TH1F(hisname.Data(),histitle.Data(),100,0,20);
566  hisname.Form("hNLcL1520b%i",i);
567  histitle.Form("N Lc -> L(1520) + p from b %s",stepnames[i].Data());
568  fhNLcL1520b[i] = new TH1F(hisname.Data(),histitle.Data(),100,0,20);
569  hisname.Form("hNLcKstarb%i",i);
570  histitle.Form("N Lc -> K* + pi from b %s",stepnames[i].Data());
571  fhNLcKstarb[i] = new TH1F(hisname.Data(),histitle.Data(),100,0,20);
572  hisname.Form("hNLcDeltab%i",i);
573  histitle.Form("N Lc -> Delta + K from b %s",stepnames[i].Data());
574  fhNLcDeltab[i] = new TH1F(hisname.Data(),histitle.Data(),100,0,20);
575  fOutput->Add(fhNBkgNI[i]);
576  fOutput->Add(fhNLc[i]);
577  fOutput->Add(fhNLcc[i]);
578  fOutput->Add(fhNLcNonRc[i]);
579  fOutput->Add(fhNLcL1520c[i]);
580  fOutput->Add(fhNLcKstarc[i]);
581  fOutput->Add(fhNLcDeltac[i]);
582  fOutput->Add(fhNLcb[i]);
583  fOutput->Add(fhNLcNonRb[i]);
584  fOutput->Add(fhNLcL1520b[i]);
585  fOutput->Add(fhNLcKstarb[i]);
586  fOutput->Add(fhNLcDeltab[i]);
587 
588  //Pt vs eta histograms
589  hisname.Form("hPtEtaBkgNI%i",i);
590  histitle.Form("Pt vs #eta Bkg not injected %s",stepnames[i].Data());
591  fhPtEtaBkgNI[i] = new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
592  hisname.Form("hPtEtaLc%i",i);
593  histitle.Form("Pt vs #eta Lc %s",stepnames[i].Data());
594  fhPtEtaLc[i] = new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
595  hisname.Form("hPtEtaLcc%i",i);
596  histitle.Form("Pt vs #eta Lc from c %s",stepnames[i].Data());
597  fhPtEtaLcc[i] = new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
598  hisname.Form("hPtEtaLcNonRc%i",i);
599  histitle.Form("Pt vs #eta Lc non resonant from c %s",stepnames[i].Data());
600  fhPtEtaLcNonRc[i] = new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
601  hisname.Form("hPtEtaLcL1520c%i",i);
602  histitle.Form("Pt vs #eta Lc -> L(1520) + p from c %s",stepnames[i].Data());
603  fhPtEtaLcL1520c[i] = new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
604  hisname.Form("hPtEtaLcKstarc%i",i);
605  histitle.Form("Pt vs #eta Lc -> K* + pi from c %s",stepnames[i].Data());
606  fhPtEtaLcKstarc[i] = new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
607  hisname.Form("hPtEtaLcDeltac%i",i);
608  histitle.Form("Pt vs #eta Lc -> Delta + K from c %s",stepnames[i].Data());
609  fhPtEtaLcDeltac[i] = new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
610  hisname.Form("hPtEtaLcb%i",i);
611  histitle.Form("Pt vs #eta Lc from b %s",stepnames[i].Data());
612  fhPtEtaLcb[i] = new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
613  hisname.Form("hPtEtaLcNonRb%i",i);
614  histitle.Form("Pt vs #eta Lc non resonant from b %s",stepnames[i].Data());
615  fhPtEtaLcNonRb[i] = new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
616  hisname.Form("hPtEtaLcL1520b%i",i);
617  histitle.Form("Pt vs #eta Lc -> L(1520) + p from b %s",stepnames[i].Data());
618  fhPtEtaLcL1520b[i] = new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
619  hisname.Form("hPtEtaLcKstarb%i",i);
620  histitle.Form("Pt vs #eta Lc -> K* + pi from b %s",stepnames[i].Data());
621  fhPtEtaLcKstarb[i] = new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
622  hisname.Form("hPtEtaLcDeltab%i",i);
623  histitle.Form("Pt vs #eta Lc -> Delta + K from b %s",stepnames[i].Data());
624  fhPtEtaLcDeltab[i] = new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
625  fOutput->Add(fhPtEtaBkgNI[i]);
626  fOutput->Add(fhPtEtaLc[i]);
627  fOutput->Add(fhPtEtaLcc[i]);
628  fOutput->Add(fhPtEtaLcNonRc[i]);
629  fOutput->Add(fhPtEtaLcL1520c[i]);
630  fOutput->Add(fhPtEtaLcKstarc[i]);
631  fOutput->Add(fhPtEtaLcDeltac[i]);
632  fOutput->Add(fhPtEtaLcb[i]);
633  fOutput->Add(fhPtEtaLcNonRb[i]);
634  fOutput->Add(fhPtEtaLcL1520b[i]);
635  fOutput->Add(fhPtEtaLcKstarb[i]);
636  fOutput->Add(fhPtEtaLcDeltab[i]);
637 
638  //Pt vs Y histograms
639  hisname.Form("hPtYBkgNI%i",i);
640  histitle.Form("Pt vs Y Bkg not injected %s",stepnames[i].Data());
641  fhPtYBkgNI[i] = new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
642  hisname.Form("hPtYLc%i",i);
643  histitle.Form("Pt vs Y Lc %s",stepnames[i].Data());
644  fhPtYLc[i] = new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
645  hisname.Form("hPtYLcc%i",i);
646  histitle.Form("Pt vs Y Lc from c %s",stepnames[i].Data());
647  fhPtYLcc[i] = new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
648  hisname.Form("hPtYLcNonRc%i",i);
649  histitle.Form("Pt vs Y Lc non resonant from c %s",stepnames[i].Data());
650  fhPtYLcNonRc[i] = new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
651  hisname.Form("hPtYLcL1520c%i",i);
652  histitle.Form("Pt vs Y Lc -> L(1520) + p from c %s",stepnames[i].Data());
653  fhPtYLcL1520c[i] = new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
654  hisname.Form("hPtYLcKstarc%i",i);
655  histitle.Form("Pt vs Y Lc -> K* + pi from c %s",stepnames[i].Data());
656  fhPtYLcKstarc[i] = new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
657  hisname.Form("hPtYLcDeltac%i",i);
658  histitle.Form("Pt vs Y Lc -> Delta + K from c %s",stepnames[i].Data());
659  fhPtYLcDeltac[i] = new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
660  hisname.Form("hPtYLcb%i",i);
661  histitle.Form("Pt vs Y Lc from b %s",stepnames[i].Data());
662  fhPtYLcb[i] = new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
663  hisname.Form("hPtYLcNonRb%i",i);
664  histitle.Form("Pt vs Y Lc non resonant from b %s",stepnames[i].Data());
665  fhPtYLcNonRb[i] = new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
666  hisname.Form("hPtYLcL1520b%i",i);
667  histitle.Form("Pt vs Y Lc -> L(1520) + p from b %s",stepnames[i].Data());
668  fhPtYLcL1520b[i] = new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
669  hisname.Form("hPtYLcKstarb%i",i);
670  histitle.Form("Pt vs Y Lc -> K* + pi from b %s",stepnames[i].Data());
671  fhPtYLcKstarb[i] = new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
672  hisname.Form("hPtYLcDeltab%i",i);
673  histitle.Form("Pt vs Y Lc -> Delta + K from b %s",stepnames[i].Data());
674  fhPtYLcDeltab[i] = new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
675  fOutput->Add(fhPtYBkgNI[i]);
676  fOutput->Add(fhPtYLc[i]);
677  fOutput->Add(fhPtYLcc[i]);
678  fOutput->Add(fhPtYLcNonRc[i]);
679  fOutput->Add(fhPtYLcL1520c[i]);
680  fOutput->Add(fhPtYLcKstarc[i]);
681  fOutput->Add(fhPtYLcDeltac[i]);
682  fOutput->Add(fhPtYLcb[i]);
683  fOutput->Add(fhPtYLcNonRb[i]);
684  fOutput->Add(fhPtYLcL1520b[i]);
685  fOutput->Add(fhPtYLcKstarb[i]);
686  fOutput->Add(fhPtYLcDeltab[i]);
687 
688  //Pt vs phi histograms
689  hisname.Form("hPtPhiBkgNI%i",i);
690  histitle.Form("Pt vs #phi Bkg not injected %s",stepnames[i].Data());
691  fhPtPhiBkgNI[i] = new TH2F(hisname.Data(),histitle.Data(),20,0,20,70,0,7);
692  hisname.Form("hPtPhiLc%i",i);
693  histitle.Form("Pt vs #phi Lc %s",stepnames[i].Data());
694  fhPtPhiLc[i] = new TH2F(hisname.Data(),histitle.Data(),20,0,20,70,0,7);
695  hisname.Form("hPtPhiLcc%i",i);
696  histitle.Form("Pt vs #phi Lc from c %s",stepnames[i].Data());
697  fhPtPhiLcc[i] = new TH2F(hisname.Data(),histitle.Data(),20,0,20,70,0,7);
698  hisname.Form("hPtPhiLcNonRc%i",i);
699  histitle.Form("Pt vs #phi Lc non resonant from c %s",stepnames[i].Data());
700  fhPtPhiLcNonRc[i] = new TH2F(hisname.Data(),histitle.Data(),20,0,20,70,0,7);
701  hisname.Form("hPtPhiLcL1520c%i",i);
702  histitle.Form("Pt vs #phi Lc -> L(1520) + p from c %s",stepnames[i].Data());
703  fhPtPhiLcL1520c[i] = new TH2F(hisname.Data(),histitle.Data(),20,0,20,70,0,7);
704  hisname.Form("hPtPhiLcKstarc%i",i);
705  histitle.Form("Pt vs #phi Lc -> K* + pi from c %s",stepnames[i].Data());
706  fhPtPhiLcKstarc[i] = new TH2F(hisname.Data(),histitle.Data(),20,0,20,70,0,7);
707  hisname.Form("hPtPhiLcDeltac%i",i);
708  histitle.Form("Pt vs #phi Lc -> Delta + K from c %s",stepnames[i].Data());
709  fhPtPhiLcDeltac[i] = new TH2F(hisname.Data(),histitle.Data(),20,0,20,70,0,7);
710  hisname.Form("hPtPhiLcb%i",i);
711  histitle.Form("Pt vs #phi Lc from b %s",stepnames[i].Data());
712  fhPtPhiLcb[i] = new TH2F(hisname.Data(),histitle.Data(),20,0,20,70,0,7);
713  hisname.Form("hPtPhiLcNonRb%i",i);
714  histitle.Form("Pt vs #phi Lc non resonant from b %s",stepnames[i].Data());
715  fhPtPhiLcNonRb[i] = new TH2F(hisname.Data(),histitle.Data(),20,0,20,70,0,7);
716  hisname.Form("hPtPhiLcL1520b%i",i);
717  histitle.Form("Pt vs #phi Lc -> L(1520) + p from b %s",stepnames[i].Data());
718  fhPtPhiLcL1520b[i] = new TH2F(hisname.Data(),histitle.Data(),20,0,20,70,0,7);
719  hisname.Form("hPtPhiLcKstarb%i",i);
720  histitle.Form("Pt vs #phi Lc -> K* + pi from b %s",stepnames[i].Data());
721  fhPtPhiLcKstarb[i] = new TH2F(hisname.Data(),histitle.Data(),20,0,20,70,0,7);
722  hisname.Form("hPtPhiLcDeltab%i",i);
723  histitle.Form("Pt vs #phi Lc -> Delta + K from b %s",stepnames[i].Data());
724  fhPtPhiLcDeltab[i] = new TH2F(hisname.Data(),histitle.Data(),20,0,20,70,0,7);
725  fOutput->Add(fhPtPhiBkgNI[i]);
726  fOutput->Add(fhPtPhiLc[i]);
727  fOutput->Add(fhPtPhiLcc[i]);
728  fOutput->Add(fhPtPhiLcNonRc[i]);
729  fOutput->Add(fhPtPhiLcL1520c[i]);
730  fOutput->Add(fhPtPhiLcKstarc[i]);
731  fOutput->Add(fhPtPhiLcDeltac[i]);
732  fOutput->Add(fhPtPhiLcb[i]);
733  fOutput->Add(fhPtPhiLcNonRb[i]);
734  fOutput->Add(fhPtPhiLcL1520b[i]);
735  fOutput->Add(fhPtPhiLcKstarb[i]);
736  fOutput->Add(fhPtPhiLcDeltab[i]);
737  }
738 
739 
740  fhPtMisIdpKpi = new TH1F("hMisIdpKpi","pKpi id'd as piKp",30,0,30);
741  fhPtMisIdpiKp = new TH1F("hMisIdpiKp","piKp id'd as pKpi",30,0,30);
742  fhPtCorrId = new TH1F("hCorrId","Correctly id'd pKpi",30,0,30);
743  fOutput->Add(fhPtMisIdpKpi);
744  fOutput->Add(fhPtMisIdpiKp);
745  fOutput->Add(fhPtCorrId);
746  fhInvMassMisIdpKpi = new TH2F("hInvMassIdpKpi","inv mass pKpi id'd as piKp",300,0.,30.,(fUpmasslimit-fLowmasslimit)/0.002,fLowmasslimit,fUpmasslimit);
747  fhInvMassMisIdpiKp = new TH2F("hInvMassIdpiKp","inv mass piKp id'd as pKpi",300,0.,30.,(fUpmasslimit-fLowmasslimit)/0.002,fLowmasslimit,fUpmasslimit);
750 
751  fhPtMisIdpKpiProb = new TH1F("hMisIdpKpiProb","pKpi id'd as piKp, most prob. PID",30,0,30);
752  fhPtMisIdpiKpProb = new TH1F("hMisIdpiKpProb","piKp id'd as pKpi, most prob. PID",30,0,30);
753  fhPtCorrIdProb = new TH1F("hCorrIdProb","Correctly id'd pKpi, most prob. PID",30,0,30);
756  fOutput->Add(fhPtCorrIdProb);
757  fhInvMassMisIdpKpiProb = new TH2F("hInvMassIdpKpiProb","inv mass pKpi id'd as piKp most prob. PID",300,0.,30.,(fUpmasslimit-fLowmasslimit)/0.002,fLowmasslimit,fUpmasslimit);
758  fhInvMassMisIdpiKpProb = new TH2F("hInvMassIdpiKpProb","inv mass piKp id'd as pKpi most prob. PID",300,0.,30.,(fUpmasslimit-fLowmasslimit)/0.002,fLowmasslimit,fUpmasslimit);
761 
762 
763  // weight function from ratio of flat value (1/30) to pythia
764  // use to normalise to flat distribution (should lead to flat pT distribution
765  fFuncWeightPythia=new TF1("funcWeightPythia","1./(30. *[0]*x/TMath::Power(1.+(TMath::Power((x/[1]),[3])),[2]))",0.15,30);
766  fFuncWeightPythia->SetParameters(0.36609,1.94635,1.40463,2.5);
767 
768  // weight function from the ratio of the LHC10f6a MC
769  // and FONLL calculations for pp data
770  fFuncWeightFONLL7overLHC10f6a=new TF1("funcWeightFONLL7overLHC10f6a","([0]*x)/TMath::Power([2],(1+TMath::Power([3],x/[1])))+[4]*TMath::Exp([5]+[6]*x)+[7]*TMath::Exp([8]*x)",0.15,40.);
771  fFuncWeightFONLL7overLHC10f6a->SetParameters(2.41522e+01,4.92146e+00,6.72495e+00,2.5,6.15361e-03,4.78995e+00,-4.29135e-01,3.99421e-01,-1.57220e-02);
772 
773  // weight function from the ratio of the LHC13d3 MC
774  // and FONLL calculations for pp data
775  fFuncWeightFONLL5overLHC13d3=new TF1("funcWeightFONLL5overLHC13d3","([0]*x)/TMath::Power([2],(1+TMath::Power([3],x/[1])))+[4]*TMath::Exp([5]+[6]*x)+[7]*TMath::Exp([8]*x)",0.15,30.);
776  fFuncWeightFONLL5overLHC13d3->SetParameters(2.94999e+00,3.47032e+00,2.81278e+00,2.5,1.93370e-02,3.86865e+00,-1.54113e-01,8.86944e-02,2.56267e-02);
777 
778  // weight function from the ratio of the LHC10f6a MC
779  // and FONLL calculations for pp data
780  fFuncWeightFONLL5overLHC10f6a=new TF1("funcWeightFONLL5overLHC10f6a","([0]*x)/TMath::Power([2],(1+TMath::Power([3],x/[1])))+[4]*TMath::Exp([5]+[6]*x)+[7]*TMath::Exp([8]*x)",0.15,40.);
781  fFuncWeightFONLL5overLHC10f6a->SetParameters(2.77730e+01,4.78942e+00,7.45378e+00,2.5,9.86255e-02,2.30120e+00,-4.16435e-01,3.43770e-01,-2.29380e-02);
786 
787 
788  // fhChi2 = new TH1F("fhChi2", "Chi2",100,0.,10.);
789  // fhChi2->Sumw2();
790  // fOutput->Add(fhChi2);
791 
792  fNentries=new TH1F("fNentries", "n Events/Candidates QA", 16,0.5,16.5);
793 
794  //Event and candidate QA - entries at each step
795  fNentries->GetXaxis()->SetBinLabel(1,"nEventsRejTM");
796  fNentries->GetXaxis()->SetBinLabel(2,"nEventsNoVtx");
797  fNentries->GetXaxis()->SetBinLabel(3,"nEventsRejCutPileup");
798  fNentries->GetXaxis()->SetBinLabel(4,"nLcGen");
799  fNentries->GetXaxis()->SetBinLabel(5,"nLcGenFidAcc");
800  fNentries->GetXaxis()->SetBinLabel(6,"nCandReco3Prong");
801  fNentries->GetXaxis()->SetBinLabel(7,"nCandLcBit");
802  fNentries->GetXaxis()->SetBinLabel(8,"nCandIsSelTracks");
803  fNentries->GetXaxis()->SetBinLabel(9,"nCandIsInFidAcc");
804  fNentries->GetXaxis()->SetBinLabel(10,"ptbin=-1");
805  fNentries->GetXaxis()->SetBinLabel(11,"nCandIsSelCand");
806  fNentries->GetXaxis()->SetBinLabel(12,"PID=0");
807  fNentries->GetXaxis()->SetBinLabel(13,"PID=1");
808  fNentries->GetXaxis()->SetBinLabel(14,"PID=2");
809  fNentries->GetXaxis()->SetBinLabel(15,"PID=3");
810  fNentries->GetXaxis()->SetBinLabel(16,"nLcSelected");
811  fNentries->GetXaxis()->SetNdivisions(1,kFALSE);
812 
813  AliAnalysisManager *man=AliAnalysisManager::GetAnalysisManager();
814  AliInputEventHandler* inputHandler = (AliInputEventHandler*) (man->GetInputEventHandler());
815  fPIDResponse = inputHandler->GetPIDResponse();
816 
821  fRDCutsAnalysis->GetPidHF()->SetOldPid(kFALSE);
824  }
825 
826 
827  PostData(1,fOutput);
828  PostData(3,fNentries);
829 
830  TString normName="NormalizationCounter";
831  AliAnalysisDataContainer *cont = GetOutputSlot(4)->GetContainer();
832  if(cont)normName=(TString)cont->GetName();
833  fCounter = new AliNormalizationCounter(normName.Data());
834  fCounter->Init();
835  PostData(4,fCounter);
836  if (fFillNtuple) {
837  //basic ntuple
838  TString ntName="fNtupleLambdac";
839  AliAnalysisDataContainer *contnt = GetOutputSlot(5)->GetContainer();
840  if(contnt)ntName=(TString)contnt->GetName();
841  if(fFillNtuple==1) fNtupleLambdac = new TNtuple(ntName.Data(), "Lc", "isLcBkg:InvMasspKpi:InvMasspiKp:Charge:PtTr0:PtTr1:PtTr2:PtLc:CosP:DecayL:DecayLSig:Dist12:SigVert:DCA:DecayLXY:DecayLXYSig:isLcResonant:selectionPID:PtLcMC:weightsPythia:weights7LHC106a:weights5LHC10f6a:weights5LHC13d3:Tr0Ppi:Tr0PK:Tr0Pp:Tr1Ppi:Tr1PK:Tr1Pp:Tr2Ppi:Tr2PK:Tr2Pp");
842  //NSigma PID
843  else if(fFillNtuple==2) fNtupleLambdac = new TNtuple(ntName.Data(), "Lc", "isLcBkg:InvMasspKpi:InvMasspiKp:Charge:PtTr0:PtTr1:PtTr2:PtLc:CosP:DecayL:DecayLSig:Dist12:SigVert:DCATr0:DecayLXY:DecayLXYSig:isLcResonant:selectionPID:PtLcMC:weightsPythia:weights7LHC106a:weights5LHC10f6a:weights5LHC13d3:Tr0Ppi:Tr0PK:Tr0Pp:Tr1Ppi:Tr1PK:Tr1Pp:Tr2Ppi:Tr2PK:Tr2Pp:d00:d01:d02:d0Squared:d00Sig:d01Sig:d02Sig:d00SigResidual:d01SigResidual:d02SigResidual:CosPXY:DCATr1:DCATr2:Dist23:RunNumber");
844  //2 prong decay products
845  else if(fFillNtuple==3) fNtupleLambdac = new TNtuple(ntName.Data(), "Lc", "isLcBkg:InvMasspKpi:InvMasspiKp:Charge:PtTr0:PtTr1:PtTr2:PtLc:CosP:DecayL:DecayLSig:Dist12:SigVert:DCATr0:DecayLXY:DecayLXYSig:isLcResonant:selectionPID:PtLcMC:weightsPythia:weights7LHC106a:weights5LHC10f6a:weights5LHC13d3:Tr0Ppi:Tr0PK:Tr0Pp:Tr1Ppi:Tr1PK:Tr1Pp:Tr2Ppi:Tr2PK:Tr2Pp:d00:d01:d02:d0Squared:d00Sig:d01Sig:d02Sig:d00SigResidual:d01SigResidual:d02SigResidual:CosPXY:DCATr1:DCATr2:Dist23:RunNumber:InvMasspK:InvMassKpi:InvMassppi:InvMassKp:InvMasspiK:InvMasspip");
846  else AliFatal("Invalid fill ntuple argument");
847  PostData(5,fNtupleLambdac);
848  }
849 
850  return;
851 }
852 
853 //________________________________________________________________________
854 void AliAnalysisTaskSELambdacTMVA::UserExec(Option_t */*option*/)
855 {
856  //
859  //
860  AliAODEvent *aod = dynamic_cast<AliAODEvent*> (InputEvent());
861  //tmp
862  fHistNEvents->Fill(1); // count event
863  // Post the data already here
864 
865 
866  TClonesArray *array3Prong = 0;
867  TClonesArray *arrayLikeSign =0;
868  if(!aod && AODEvent() && IsStandardAOD()) {
869  // In case there is an AOD handler writing a standard AOD, use the AOD
870  // event in memory rather than the input (ESD) event.
871  aod = dynamic_cast<AliAODEvent*> (AODEvent());
872  // in this case the braches in the deltaAOD (AliAOD.VertexingHF.root)
873  // have to taken from the AOD event hold by the AliAODExtension
874  AliAODHandler* aodHandler = (AliAODHandler*)
875  ((AliAnalysisManager::GetAnalysisManager())->GetOutputEventHandler());
876  if(aodHandler->GetExtensions()) {
877  AliAODExtension *ext = (AliAODExtension*)aodHandler->GetExtensions()->FindObject("AliAOD.VertexingHF.root");
878  AliAODEvent *aodFromExt = ext->GetAOD();
879  array3Prong=(TClonesArray*)aodFromExt->GetList()->FindObject("Charm3Prong");
880  arrayLikeSign=(TClonesArray*)aodFromExt->GetList()->FindObject("LikeSign3Prong");
881  }
882  } else if(aod) {
883  array3Prong=(TClonesArray*)aod->GetList()->FindObject("Charm3Prong");
884  arrayLikeSign=(TClonesArray*)aod->GetList()->FindObject("LikeSign3Prong");
885  }
886 
887  if(!aod) return;
888 
889  TClonesArray *arrayMC=0;
890  AliAODMCHeader *mcHeader=0;
891 
892  // load MC particles
893  if(fReadMC){
894 
895  arrayMC = (TClonesArray*)aod->GetList()->FindObject(AliAODMCParticle::StdBranchName());
896  if(!arrayMC) {
897  AliError("AliAnalysisTaskSELambdacTMVA::UserExec: MC particles branch not found!\n");
898  return;
899  }
900 
901 
902  // load MC header
903  mcHeader = (AliAODMCHeader*)aod->GetList()->FindObject(AliAODMCHeader::StdBranchName());
904  if(!mcHeader) {
905  AliError("AliAnalysisTaskSELambdacTMVA::UserExec: MC header branch not found!\n");
906  return;
907  }
908  //if(TString(AliAODMCHeader::StdBranchName()).Contains("LHC15f2")) {
909  // AliInfo("LHC15f2 - fIsHijing==kTRUE");
910  // fIsHijing=kTRUE;
911  //}
912  //else {
913  // AliInfo("Not LHC15f2 - fIsHijing==kFALSE");
914  // fIsHijing=kFALSE;
915  //}
916  }
917 
918 
919  if(!array3Prong || !aod) {
920  AliError("AliAnalysisTaskSELambdacTMVA::UserExec: Charm3Prong branch not found!\n");
921  return;
922  }
923  if(!arrayLikeSign) {
924  AliDebug(2,"AliAnalysisTaskSELambdacTMVA::UserExec: LikeSign3Prong branch not found!\n");
925  // return;
926  }
927 
928  //Trigger mask = 0 rejection for LHC13d3
929  Int_t runnumber = aod->GetRunNumber();
930  if (aod->GetTriggerMask() == 0 && (runnumber >= 195344 && runnumber <= 195677)){
931  Int_t nentriesTM = arrayMC->GetEntriesFast();
932  AliDebug(2,Form("Event rejected because of null trigger mask, n entries = %i",nentriesTM));
933  fNentries->Fill(1);
934  return;
935  }
936 
937  // fix for temporary bug in ESDfilter
938  // the AODs with null vertex pointer didn't pass the PhysSel
939  AliAODVertex *vtx1 = (AliAODVertex*)aod->GetPrimaryVertex();
940  if(!vtx1 || TMath::Abs(aod->GetMagneticField())<0.001) {
941  fNentries->Fill(2);
942  //return;
943  }
945  TString trigclass=aod->GetFiredTriggerClasses();
946  //if(trigclass.Contains("C0SMH-B-NOPF-ALLNOTRD") || trigclass.Contains("C0SMH-B-NOPF-ALL"))
947 
948  //Bool_t isThereA3prongWithGoodTracks = kFALSE;
949  //Bool_t isThereA3ProngLcKine = kFALSE;
950  //Bool_t isThereA3ProngLcKineANDpid = kFALSE;
951  //Bool_t isThereA3ProngLcMC = kFALSE;
952  //Bool_t isThereA3ProngCyes = kFALSE;
953  //Bool_t isThereA3ProngByes = kFALSE;
954  //Bool_t isThereA3ProngJPsi = kFALSE;
955 
956  Int_t n3Prong = array3Prong->GetEntriesFast();
957  Int_t nSelectedloose[1]={0};
958  Int_t nSelectedtight[1]={0};
959 
960  //MC Generated level
961  //loop over MC particles to find Lc generated
962  Bool_t isInFidAcc = kFALSE;
963  Bool_t isInAcc = kFALSE;
964  if(fReadMC) {
965  // Event selection as done is CF task
966  Double_t zPrimVertex = vtx1 ->GetZ();
967  Double_t zMCVertex = mcHeader->GetVtxZ();
968  if (TMath::Abs(zMCVertex) > fRDCutsAnalysis->GetMaxVtxZ()){
969  return;
970  }
971  for (Int_t iPart=0; iPart<arrayMC->GetEntriesFast(); iPart++) {
972  fIsLc=0;
973  fIsLcResonant=0;
974  AliAODMCParticle* mcPart = dynamic_cast<AliAODMCParticle*>(arrayMC->At(iPart));
975  if (!mcPart){
976  AliError("Failed casting particle from MC array!, Skipping particle");
977  continue;
978  }
979  //Check whether particle is Lc
980  SetIsLcGen(mcPart,arrayMC);
981  if(fIsLc==0) continue;
982  //-- is Lc --
983  isInFidAcc = fRDCutsAnalysis->IsInFiducialAcceptance(mcPart->Pt(),mcPart->Y());
984  fCandidateVars[0] = mcPart->Pt();
985  fCandidateVars[1] = mcPart->Eta();
986  fCandidateVars[2] = mcPart->Y();
987  fCandidateVars[3] = mcPart->Phi();
988  Int_t imother = -1;
989  if(!fIsHijing) imother=mcPart->GetMother();
990  if(imother>0) { //found mother
991  AliAODMCParticle* mcPartMother = dynamic_cast<AliAODMCParticle*>(arrayMC->At(imother));
992  if(!mcPart){
993  AliError("Failed casting mother particle, Skipping particle");
994  continue;
995  }
996  }
997 
998  //Check daughters
999  SetLambdacDaugh(mcPart,arrayMC,isInAcc);
1000  if(fIsLcResonant>=1 && (fIsHijing || imother>0)) { //if signal, and is LHC15f2 or has mother
1001  AliDebug(2,"Lc has p K pi in final state");
1003  fNentries->Fill(4);
1004  if(isInFidAcc){
1005  fNentries->Fill(5);
1006  if((TMath::Abs(mcPart->Y()) < 0.5)) {//limited acceptance
1007  AliDebug(2,"Lc in limited acceptance");
1009  }
1010  FillEffHists(kGenerated); //MC generated ---> Should be within fiducial acceptance
1011  if(isInAcc) FillEffHists(kGeneratedAcc); //all daughters in acceptance
1012  }
1013  }
1014  else if(fIsLcResonant==0){
1015  AliError("no p K pi final state");
1016  // TClonesArray *ares = (TClonesArray*)aod->GetList()->FindObject(AliAODMCParticle::StdBranchName());
1017  // Int_t nentriesres = ares->GetEntriesFast();
1018  // for(Int_t ires=0;ires<nentriesres;ires++) {
1019  // AliAODMCParticle* mcPartRes = dynamic_cast<AliAODMCParticle*>(ares->At(ires));
1020  // Printf("%i",ires);
1021  // mcPartRes->Print();
1022  // }
1023  // TIter next(aod->GetList());
1024  // while (TObject *obj = next())
1025  // obj->Print();
1026  }
1027  else AliError(Form("Not pKpi or background - should not happen! fIsLcResonant = %i",fIsLcResonant));
1028  fhIsLcResonantGen->Fill(Double_t(fIsLcResonant));
1029  fhIsLcGen->Fill(Double_t(fIsLc));
1030  }
1031  }
1032 
1033 
1034  fHistNEvents->Fill(2); // count event after event selection (as CF task)
1035 
1036  Bool_t isEvSelAnCuts=fRDCutsAnalysis->IsEventSelected(aod);
1037  if(!isEvSelAnCuts){ //reject if not selected with analysis cut
1038  if(fRDCutsAnalysis->GetWhyRejection()==1) // rejected for pileup
1039  fNentries->Fill(3);
1040  return;
1041  }
1042 
1043  //
1044  //Reconstruction level
1045  //loop over 3 prong candidates
1046  //
1047 
1048  for (Int_t i3Prong = 0; i3Prong < n3Prong; i3Prong++) {
1049  AliAODRecoDecayHF3Prong *d = (AliAODRecoDecayHF3Prong*)array3Prong->UncheckedAt(i3Prong);
1050  //(AliAODEvent *aod,AliAODRecoDecayHF3Prong *part,TClonesArray *arrayMC)
1051  fhSetIsLc->Fill(0);
1052  SetIsLcReco(d,arrayMC);
1053  fhSetIsLc->Fill(1);
1054  fhIsLcResonantReco->Fill(Double_t(fIsLcResonant));
1055  fhIsLcReco->Fill(Double_t(fIsLc));
1056  fCandidateVars[0] = d->Pt();
1057  fCandidateVars[1] = d->Eta();
1058  fCandidateVars[2] = d->Y(4122);
1059  fCandidateVars[3] = d->Phi();
1060 
1062  fNentries->Fill(6);
1063 
1064  Bool_t unsetvtx=kFALSE;
1065  if(!d->GetOwnPrimaryVtx()){
1066  d->SetOwnPrimaryVtx(vtx1);
1067  unsetvtx=kTRUE;
1068  }
1069 
1070  //add histogram with filter bit
1071  //one at start of task, one at filter bit selection
1072  //check every bit, bit vs pT
1073  //Filter bit selection and QA:
1074  fhSelectBit->Fill(1);
1075  if(d->GetSelectionMap()){
1076  // enum ESele {kD0toKpiCuts,kD0toKpiPID,kD0fromDstarCuts,kD0fromDstarPID,kDplusCuts,kDplusPID,kDsCuts,kDsPID,kLcCuts,kLcPID,kDstarCuts,kDstarPID};
1080 
1081  fhSelectBit->Fill(2);
1084  if(fLcCut&&!d->HasSelectionBit(AliRDHFCuts::kLcCuts)) continue;
1085  if(fLcPIDCut&&!d->HasSelectionBit(AliRDHFCuts::kLcPID)) continue;
1086  }
1088  fNentries->Fill(7);
1089 
1090  //track selection
1091  Int_t isSelectedTracks = fRDCutsAnalysis->IsSelected(d,AliRDHFCuts::kTracks,aod);
1092  if(!isSelectedTracks) continue;
1094  fNentries->Fill(8);
1095 
1096  //isThereA3prongWithGoodTracks=kTRUE;
1097 
1098  if (fRDCutsAnalysis->IsInFiducialAcceptance(d->Pt(),d->Y(4122))) {fNentries->Fill(9);}else{continue;}
1100 
1101  Int_t ptbin=fRDCutsAnalysis->PtBin(d->Pt());
1102  if(ptbin==-1) {fNentries->Fill(10); continue;} //out of bounds
1104 
1105  //idproton, pion using isSelectedPID
1106  //Bool_t isPID=fRDCutsAnalysis->GetIsUsePID();
1107  Int_t isSelectedPID=fRDCutsAnalysis->IsSelected(d,AliRDHFCuts::kPID,aod);
1108 
1109  if(isSelectedPID==0 ) fNentries->Fill(12);
1110  else if(isSelectedPID==1) fNentries->Fill(13);
1111  else if(isSelectedPID==2) fNentries->Fill(14);
1112  else fNentries->Fill(15);
1113  if(isSelectedPID>0) FillEffHists(kIsSelectedPID);
1114  //PID selection using maximum probability configuration
1115  Int_t selectionProb = GetPIDselectionMaxProb(d);
1116 
1117  Int_t selection=fRDCutsAnalysis->IsSelected(d,AliRDHFCuts::kCandidate,aod);
1118  if(!selection) continue;
1120  fNentries->Fill(11);
1121 
1122  FillMassHists(aod,d,arrayMC,selection,selectionProb);
1123 
1124 
1125  if(fFillNtuple) FillNtuple(aod,d,arrayMC,selection);
1127  if(fIsLc>=1 && fIsLc <= 2) fNentries->Fill(16);
1128  if(unsetvtx) d->UnsetOwnPrimaryVtx();
1129  }
1130  fCounter->StoreCandidates(aod,nSelectedloose[0],kTRUE);
1131  fCounter->StoreCandidates(aod,nSelectedtight[0],kFALSE);
1132 
1133  PostData(1,fOutput);
1134  PostData(3,fNentries);
1135  PostData(4,fCounter);
1136 
1137  return;
1138 }
1139 
1140 
1141 
1142 //________________________________________________________________________
1144 {
1145  //
1147  //
1148 
1149  if (fDebug > 1) printf("AnalysisTaskSELambdac: Terminate() \n");
1150 
1151  fOutput = dynamic_cast<TList*> (GetOutputData(1));
1152  if (!fOutput) {
1153  AliError("ERROR: fOutput not available\n");
1154  return;
1155  }
1156  //fHistNEvents = dynamic_cast<TH1F*>(fOutput->FindObject("fHistNEvents"));
1157 
1158  if(fFillNtuple){
1159  fNtupleLambdac = dynamic_cast<TNtuple*>(GetOutputData(5));
1160  }
1161 
1162 
1163  return;
1164 }
1165 
1166 //________________________________________________________________________
1168 
1169  //
1171  //
1172 
1173  Int_t lambdacLab[3]={0,0,0};
1174  // Int_t pdgs[3]={0,0,0};
1175  for(Int_t i=0;i<3;i++){
1176  AliAODTrack *daugh=(AliAODTrack*)d->GetDaughter(i);
1177  Int_t lab=daugh->GetLabel();
1178  if(lab<0) return 0;
1179  AliAODMCParticle *part= (AliAODMCParticle*)arrayMC->At(lab);
1180  if(!part) continue;
1181  // pdgs[i]=part->GetPdgCode();
1182  Int_t partPdgcode = TMath::Abs(part->GetPdgCode());
1183  if(partPdgcode==211 || partPdgcode==321 || partPdgcode==2212){
1184  Int_t motherLabel=part->GetMother();
1185  if(motherLabel<0) return 0;
1186  AliAODMCParticle *motherPart = (AliAODMCParticle*)arrayMC->At(motherLabel);
1187  if(!motherPart) continue;
1188  Int_t motherPdg = TMath::Abs(motherPart->GetPdgCode());
1189  if(motherPdg==4122) {
1190  if(GetLambdacDaugh(motherPart,arrayMC)){lambdacLab[i]=motherLabel;continue;}
1191  }
1192  if(motherPdg==313 || motherPdg==2224 || motherPdg==3124){
1193  Int_t granMotherLabel=motherPart->GetMother();
1194  if(granMotherLabel<0) return 0;
1195  AliAODMCParticle *granMotherPart = (AliAODMCParticle*)arrayMC->At(granMotherLabel);
1196  if(!granMotherPart) continue;
1197  Int_t granMotherPdg = TMath::Abs(granMotherPart->GetPdgCode());
1198  if(granMotherPdg ==4122) {
1199  if(GetLambdacDaugh(granMotherPart,arrayMC)) {lambdacLab[i]=granMotherLabel;continue;}
1200  }
1201  }
1202  }
1203  }
1204 
1205  if(lambdacLab[0]==lambdacLab[1] && lambdacLab[1]==lambdacLab[2]) {return lambdacLab[0];}
1206  return 0;
1207 
1208 }
1209 
1210 //-----------------------------
1211 
1212 Int_t AliAnalysisTaskSELambdacTMVA::LambdacDaugh(AliAODMCParticle *part, TClonesArray *arrayMC, Bool_t &IsInAcc) const {
1213 
1214  //
1218  //
1219 
1220  Int_t numberOfLambdac=0;
1221  IsInAcc=kTRUE;
1222  if(TMath::Abs(part->GetPdgCode())!=4122) return 0;
1223  // Int_t daughTmp[2];
1224  // daughTmp[0]=part->GetDaughter(0);
1225  // daughTmp[1]=part->GetDaughter(1);
1226  Int_t nDaugh = (Int_t)part->GetNDaughters();
1227  if(nDaugh<2) return 0;
1228  if(nDaugh>3) return 0;
1229  AliAODMCParticle* pdaugh1 = (AliAODMCParticle*)arrayMC->At(part->GetDaughter(0));
1230  if(!pdaugh1) {return 0;}
1231  Int_t number1 = TMath::Abs(pdaugh1->GetPdgCode());
1232  AliAODMCParticle* pdaugh2 = (AliAODMCParticle*)arrayMC->At(part->GetDaughter(1));
1233  if(!pdaugh2) {return 0;}
1234  Int_t number2 = TMath::Abs(pdaugh2->GetPdgCode());
1235 
1236  AliDebug(2,"Is non resonant?");
1237  if(nDaugh==3){
1238  Int_t thirdDaugh=part->GetDaughter(1)-1;
1239  AliAODMCParticle* pdaugh3 = (AliAODMCParticle*)arrayMC->At(thirdDaugh);
1240  Int_t number3 = TMath::Abs(pdaugh3->GetPdgCode());
1241  if((number1==321 && number2==211 && number3==2212) ||
1242  (number1==211 && number2==321 && number3==2212) ||
1243  (number1==211 && number2==2212 && number3==321) ||
1244  (number1==321 && number2==2212 && number3==211) ||
1245  (number1==2212 && number2==321 && number3==211) ||
1246  (number1==2212 && number2==211 && number3==321)) {
1247  numberOfLambdac++;
1248  if( TMath::Abs(pdaugh1->Eta()) > 0.9 || pdaugh1->Pt() < 0.1
1249  || TMath::Abs(pdaugh2->Eta()) > 0.9 || pdaugh2->Pt() < 0.1
1250  || TMath::Abs(pdaugh3->Eta()) > 0.9 || pdaugh3->Pt() < 0.1) IsInAcc=kFALSE;
1251  AliDebug(2,"Lc decays non-resonantly");
1252  return 1;
1253  }
1254  }
1255 
1256  if(nDaugh==2){
1257 
1258  //Lambda resonant
1259 
1260  //Lambda -> p K*0
1261  //
1262  Int_t nfiglieK=0;
1263 
1264  if((number1==2212 && number2==313)){
1265  nfiglieK=pdaugh2->GetNDaughters();
1266  if(nfiglieK!=2) return 0;
1267  AliAODMCParticle* pdaughK1 = (AliAODMCParticle*)arrayMC->At(pdaugh2->GetDaughter(0));
1268  AliAODMCParticle* pdaughK2 = (AliAODMCParticle*)arrayMC->At(pdaugh2->GetDaughter(1));
1269  if(!pdaughK1) return 0;
1270  if(!pdaughK2) return 0;
1271  if((TMath::Abs(pdaughK1->GetPdgCode())==211 && TMath::Abs(pdaughK2->GetPdgCode())==321) || (TMath::Abs(pdaughK1->GetPdgCode())==321 && TMath::Abs(pdaughK2->GetPdgCode())==211)) {
1272  numberOfLambdac++;
1273  if( TMath::Abs(pdaugh1->Eta()) > 0.9 || pdaugh1->Pt() < 0.1
1274  || TMath::Abs(pdaughK1->Eta()) > 0.9 || pdaughK1->Pt() < 0.1
1275  || TMath::Abs(pdaughK2->Eta()) > 0.9 || pdaughK2->Pt() < 0.1) IsInAcc=kFALSE;
1276  AliDebug(2,"Lc decays via K* p");
1277  return 3;
1278  }
1279  }
1280 
1281  if((number1==313 && number2==2212)){
1282  nfiglieK=pdaugh1->GetNDaughters();
1283  if(nfiglieK!=2) return 0;
1284  AliAODMCParticle* pdaughK1 = (AliAODMCParticle*)arrayMC->At(pdaugh1->GetDaughter(0));
1285  AliAODMCParticle* pdaughK2 = (AliAODMCParticle*)arrayMC->At(pdaugh1->GetDaughter(1));
1286  if(!pdaughK1) return 0;
1287  if(!pdaughK2) return 0;
1288  if((TMath::Abs(pdaughK1->GetPdgCode())==211 && TMath::Abs(pdaughK2->GetPdgCode())==321) || (TMath::Abs(pdaughK1->GetPdgCode())==321 && TMath::Abs(pdaughK2->GetPdgCode())==211)) {
1289  numberOfLambdac++;
1290  if( TMath::Abs(pdaugh2->Eta()) > 0.9 || pdaugh2->Pt() < 0.1
1291  || TMath::Abs(pdaughK1->Eta()) > 0.9 || pdaughK1->Pt() < 0.1
1292  || TMath::Abs(pdaughK2->Eta()) > 0.9 || pdaughK2->Pt() < 0.1) IsInAcc=kFALSE;
1293  AliDebug(2,"Lc decays via K* p");
1294  return 3;
1295  }
1296  }
1297 
1298  //Lambda -> Delta++ k
1299  Int_t nfiglieDelta=0;
1300  if(number1==321 && number2==2224){
1301  nfiglieDelta=pdaugh2->GetNDaughters();
1302  if(nfiglieDelta!=2) return 0;
1303  AliAODMCParticle *pdaughD1=(AliAODMCParticle*)arrayMC->At(pdaugh2->GetDaughter(0));
1304  AliAODMCParticle *pdaughD2=(AliAODMCParticle*)arrayMC->At(pdaugh2->GetDaughter(1));
1305  if(!pdaughD1) return 0;
1306  if(!pdaughD2) return 0;
1307  if((TMath::Abs(pdaughD1->GetPdgCode())==211 && TMath::Abs(pdaughD2->GetPdgCode())==2212) || (TMath::Abs(pdaughD1->GetPdgCode())==2212 && TMath::Abs(pdaughD2->GetPdgCode())==211)) {
1308  numberOfLambdac++;
1309  if( TMath::Abs(pdaugh1->Eta()) > 0.9 || pdaugh1->Pt() < 0.1
1310  || TMath::Abs(pdaughD1->Eta()) > 0.9 || pdaughD1->Pt() < 0.1
1311  || TMath::Abs(pdaughD2->Eta()) > 0.9 || pdaughD2->Pt() < 0.1) IsInAcc=kFALSE;
1312  AliDebug(2,"Lc decays via Delta++ k");
1313  return 4;
1314  }
1315  }
1316  if(number1==2224 && number2==321){
1317  nfiglieDelta=pdaugh1->GetNDaughters();
1318  if(nfiglieDelta!=2) return 0;
1319  AliAODMCParticle* pdaughD1 = (AliAODMCParticle*)arrayMC->At(pdaugh1->GetDaughter(0));
1320  AliAODMCParticle* pdaughD2 = (AliAODMCParticle*)arrayMC->At(pdaugh1->GetDaughter(1));
1321  if(!pdaughD1) return 0;
1322  if(!pdaughD2) return 0;
1323  if((TMath::Abs(pdaughD1->GetPdgCode())==211 && TMath::Abs(pdaughD2->GetPdgCode())==2212) || (TMath::Abs(pdaughD1->GetPdgCode())==2212 && TMath::Abs(pdaughD2->GetPdgCode())==211)) {
1324  numberOfLambdac++;
1325  if( TMath::Abs(pdaugh2->Eta()) > 0.9 || pdaugh2->Pt() < 0.1
1326  || TMath::Abs(pdaughD1->Eta()) > 0.9 || pdaughD1->Pt() < 0.1
1327  || TMath::Abs(pdaughD2->Eta()) > 0.9 || pdaughD2->Pt() < 0.1) IsInAcc=kFALSE;
1328  AliDebug(2,"Lc decays via Delta++ k");
1329  return 4;
1330  }
1331  }
1332 
1333 
1334  //Lambdac -> Lambda(1520) pi
1335  Int_t nfiglieLa=0;
1336  if(number1==3124 && number2==211){
1337  nfiglieLa=pdaugh1->GetNDaughters();
1338  if(nfiglieLa!=2) return 0;
1339  AliAODMCParticle *pdaughL1=(AliAODMCParticle*)arrayMC->At(pdaugh1->GetDaughter(0));
1340  AliAODMCParticle *pdaughL2=(AliAODMCParticle*)arrayMC->At(pdaugh1->GetDaughter(1));
1341  if(!pdaughL1) return 0;
1342  if(!pdaughL2) return 0;
1343  if((TMath::Abs(pdaughL1->GetPdgCode())==321 && TMath::Abs(pdaughL2->GetPdgCode())==2212) || (TMath::Abs(pdaughL1->GetPdgCode())==2212 && TMath::Abs(pdaughL2->GetPdgCode())==321)) {
1344  numberOfLambdac++;
1345  if( TMath::Abs(pdaugh2->Eta()) > 0.9 || pdaugh2->Pt() < 0.1
1346  || TMath::Abs(pdaughL1->Eta()) > 0.9 || pdaughL1->Pt() < 0.1
1347  || TMath::Abs(pdaughL2->Eta()) > 0.9 || pdaughL2->Pt() < 0.1) IsInAcc=kFALSE;
1348  AliDebug(2,"Lc decays via Lambda(1520) pi");
1349  return 2;
1350  }
1351  }
1352  if(number1==211 && number2==3124){
1353  nfiglieLa=pdaugh2->GetNDaughters();
1354  if(nfiglieLa!=2) return 0;
1355  AliAODMCParticle *pdaughL1=(AliAODMCParticle*)arrayMC->At(pdaugh2->GetDaughter(0));
1356  AliAODMCParticle *pdaughL2=(AliAODMCParticle*)arrayMC->At(pdaugh2->GetDaughter(1));
1357  if(!pdaughL1) return 0;
1358  if(!pdaughL2) return 0;
1359  if((TMath::Abs(pdaughL1->GetPdgCode())==321 && TMath::Abs(pdaughL2->GetPdgCode())==2212) || (TMath::Abs(pdaughL1->GetPdgCode())==2212 && TMath::Abs(pdaughL2->GetPdgCode())==321)) {
1360  numberOfLambdac++;
1361  if( TMath::Abs(pdaugh1->Eta()) > 0.9 || pdaugh1->Pt() < 0.1
1362  || TMath::Abs(pdaughL1->Eta()) > 0.9 || pdaughL1->Pt() < 0.1
1363  || TMath::Abs(pdaughL2->Eta()) > 0.9 || pdaughL2->Pt() < 0.1) IsInAcc=kFALSE;
1364  AliDebug(2,"Lc decays via Lambda(1520) pi");
1365  return 2;
1366  }
1367  }
1368  }
1369 
1370  if(numberOfLambdac>0) {return -100; AliDebug(2,"Lc decays via one of 4 resonances!");}
1371  return 0;
1372 }
1373 
1374 //-----------------------------
1375 
1376 void AliAnalysisTaskSELambdacTMVA::SetIsLcGen(AliAODMCParticle *mcPart, TClonesArray *arrayMC) {
1377 
1378  //
1381  //
1382 
1383  fIsLc=0;
1384  if(TMath::Abs(mcPart->GetPdgCode())==4122) {
1385  AliDebug(2,"Found Lc! now check mother");
1386  fIsLc=1;
1387  Int_t pdgMom = 0;
1388  pdgMom=fVertUtil->CheckOrigin(arrayMC,mcPart,fKeepLcNotFromQuark ? kFALSE : kTRUE);
1389  if(pdgMom == 5){
1390  AliDebug(2,"Lc comes from b");
1391  fIsLc=2;
1392  }
1393  else if(pdgMom==4) {
1394  fIsLc=1;
1395  }
1396  else {
1397  fIsLc=0;
1398  fhIsLcResonantGen->Fill(-1);
1399  }
1400  }
1401 }
1402 
1403 
1404 //-----------------------------
1405 
1407  TClonesArray *arrayMC) {
1408 
1409  //
1413  //
1414 
1415  Int_t labDp=-1;
1416  fIsLc = 0;
1417  fIsLcResonant=0;
1418  if(!fReadMC) return;
1419  else{ //MC, check if Lc prompt or non prompt
1420  Int_t pdgCand =4122;
1421  Int_t pdgDaughter[3]={-1,-1,-1};
1422  pdgDaughter[0]=2212;
1423  pdgDaughter[1]=321;
1424  pdgDaughter[2]=211;
1425 
1426  labDp = part->MatchToMC(pdgCand,arrayMC,3,pdgDaughter);
1427  if(labDp>=0){
1428  AliAODMCParticle *partDp = (AliAODMCParticle*)arrayMC->At(labDp);
1429  Int_t pdgMom=fVertUtil->CheckOrigin(arrayMC,partDp,fKeepLcNotFromQuark ? kFALSE : kTRUE);
1430  fhRecoPDGmom->Fill(pdgMom);
1431  if(pdgMom == 4) fIsLc=1;
1432  else if(pdgMom == 5) fIsLc=2;
1433  else fIsLc=0;
1434  Bool_t dummy = kTRUE;
1435  if(fIsLc>0) SetLambdacDaugh(partDp, arrayMC, dummy);
1436  }
1437 
1438  }
1439 }
1440 
1441 //---------------------------
1442 
1443 void AliAnalysisTaskSELambdacTMVA::FillMassHists(AliAODEvent *aod, AliAODRecoDecayHF3Prong *d, TClonesArray *arrayMC, Int_t selection, Int_t selectionProb) {
1445  Bool_t IsInjected = 0;
1446  Double_t invMassLcpKpi = d->InvMassLcpKpi();
1447  Double_t invMassLcpiKp = d->InvMassLcpiKp();
1448  Bool_t ispKpiMC = 0;
1449  Bool_t ispiKpMC = 0;
1450 
1451  if(fReadMC) {
1452  ispKpiMC = IspKpiMC(d,arrayMC);
1453  ispiKpMC = IspiKpMC(d,arrayMC);
1454  AliAODMCHeader *mcHeader2 = (AliAODMCHeader*)aod->GetList()->FindObject(AliAODMCHeader::StdBranchName());
1455  if(!fIsHijing) IsInjected = fVertUtil->IsCandidateInjected(d,mcHeader2,arrayMC); //for dedicated MC set to 0
1456 
1457  //signal
1458  if(fIsLc>=1) {
1459  //MC PID
1460  fhMCmassLcPtSig->Fill(d->Pt(),ispKpiMC ? invMassLcpKpi : invMassLcpiKp);
1461  if(fIsLc==1) fhMCmassLcPtSigc->Fill(d->Pt(),ispKpiMC ? invMassLcpKpi : invMassLcpiKp);
1462  else if(fIsLc==2) fhMCmassLcPtSigb->Fill(d->Pt(),ispKpiMC ? invMassLcpKpi : invMassLcpiKp);
1463  //Real PID
1464  if(selection==1){
1465  fhPIDmassLcPtSig->Fill(d->Pt(),invMassLcpKpi);
1466  if(fIsLc==1) fhPIDmassLcPtSigc->Fill(d->Pt(),invMassLcpKpi);
1467  else if(fIsLc==2) fhPIDmassLcPtSigb->Fill(d->Pt(),invMassLcpKpi);
1468  }
1469  else if(selection==2){
1470  fhPIDmassLcPtSig->Fill(d->Pt(),invMassLcpiKp);
1471  if(fIsLc==1) fhPIDmassLcPtSigc->Fill(d->Pt(),invMassLcpiKp);
1472  else if(fIsLc==2) fhPIDmassLcPtSigb->Fill(d->Pt(),invMassLcpiKp);
1473  }
1474  else if(selection==3){
1475  fhPIDmassLcPtSig->Fill(d->Pt(),invMassLcpiKp,0.5);
1476  fhPIDmassLcPtSig->Fill(d->Pt(),invMassLcpKpi,0.5);
1477  if(fIsLc==1) {
1478  fhPIDmassLcPtSigc->Fill(d->Pt(),invMassLcpiKp,0.5);
1479  fhPIDmassLcPtSigc->Fill(d->Pt(),invMassLcpKpi,0.5);
1480  }
1481  else if(fIsLc==2) {
1482  fhPIDmassLcPtSigb->Fill(d->Pt(),invMassLcpiKp,0.5);
1483  fhPIDmassLcPtSigb->Fill(d->Pt(),invMassLcpKpi,0.5);
1484  }
1485  }
1486  //max prob PID
1487  if(selectionProb==1) {
1488  fhProbmassLcPtSig->Fill(d->Pt(), invMassLcpKpi);
1489  if(fIsLc==1)fhProbmassLcPtSigc->Fill(d->Pt(), invMassLcpKpi);
1490  if(fIsLc==2)fhProbmassLcPtSigb->Fill(d->Pt(), invMassLcpKpi);
1491  }
1492  else if(selectionProb==2) {
1493  fhProbmassLcPtSig->Fill(d->Pt(), invMassLcpiKp);
1494  if(fIsLc==1)fhProbmassLcPtSigc->Fill(d->Pt(), invMassLcpiKp);
1495  if(fIsLc==2)fhProbmassLcPtSigb->Fill(d->Pt(), invMassLcpiKp);
1496  }
1497 
1498  // mis id'd signal candidates
1499  if(ispKpiMC && selection==2){ //RDHF PID
1500  fhPtMisIdpKpi->Fill(fCandidateVars[0]);
1501  fhInvMassMisIdpKpi->Fill(fCandidateVars[0],invMassLcpiKp);
1502  }
1503  else if(ispiKpMC && selection==1){
1504  fhPtMisIdpiKp->Fill(fCandidateVars[0]);
1505  fhInvMassMisIdpiKp->Fill(fCandidateVars[0],invMassLcpKpi);
1506  }
1507  else fhPtCorrId->Fill(fCandidateVars[0]);
1508 
1509  if(ispKpiMC && selectionProb==2){ //PID using max prob. criteria
1511  fhInvMassMisIdpKpiProb->Fill(fCandidateVars[0],invMassLcpiKp);
1512  }
1513  else if(ispiKpMC && selectionProb==1){
1515  fhInvMassMisIdpiKpProb->Fill(fCandidateVars[0],invMassLcpKpi);
1516  }
1517  else fhPtCorrIdProb->Fill(fCandidateVars[0]);
1518 
1519  }
1520  }
1521  //Bkg
1522  if(!fReadMC || (fIsLc==0 && (!IsInjected || fSyst ==0))) { //data or non-injected background or pp background
1523  //MC PID
1524  if(fReadMC) fhMCmassLcPt->Fill(d->Pt(),ispKpiMC ? invMassLcpKpi : invMassLcpiKp);
1525  //Real PID
1526  if(selection==1){
1527  fhPIDmassLcPt->Fill(d->Pt(),invMassLcpKpi);
1528  }
1529  else if(selection==2){
1530  fhPIDmassLcPt->Fill(d->Pt(),invMassLcpiKp);
1531  }
1532  else if(selection==3){
1533  fhPIDmassLcPt->Fill(d->Pt(),invMassLcpiKp,0.5);
1534  fhPIDmassLcPt->Fill(d->Pt(),invMassLcpKpi,0.5);
1535  }
1536  //max prob PID
1537  if(selectionProb==1) fhProbmassLcPt->Fill(d->Pt(),invMassLcpKpi);
1538  else if(selectionProb==2) fhProbmassLcPt->Fill(d->Pt(),invMassLcpiKp);
1539  }
1540 }
1541 
1542 //---------------------------
1543 
1545  TClonesArray *arrayMC, Int_t selection)
1546 {
1547  //
1549  //
1550 
1551  if(fReadMC && !fKeepBkgNt && fIsLc==0) return; //don't continue if bkg and only want signal
1552 
1553  Bool_t IsInjected = 0;
1554  Bool_t IsLc = 0;
1555  Bool_t IsLcfromLb = 0;
1556 
1557  if(fReadMC){
1558  AliAODMCHeader *mcHeader3 = (AliAODMCHeader*)aod->GetList()->FindObject(AliAODMCHeader::StdBranchName());
1559  if(!fIsHijing) IsInjected = fVertUtil->IsCandidateInjected(part,mcHeader3,arrayMC); //for dedicated MC set to 0
1560  }
1561  if(fIsLc>=1 && fIsLc<=2) IsLc=kTRUE;
1562  if(fIsLc==2) IsLcfromLb=kTRUE;
1563  if(fReadMC && IsInjected && !IsLc && fSyst >=1 ) return; //dont fill if injected bkg, pPb or PbPb
1564 
1565  Double_t invMasspKpi=-1.;
1566  Double_t invMasspiKp=-1.;
1567  //apply MC PID
1568  if(fReadMC && fMCPid){
1569  if(IspKpiMC(part,arrayMC)) invMasspKpi=part->InvMassLcpKpi();
1570  else if(IspiKpMC(part,arrayMC)) invMasspiKp=part->InvMassLcpiKp();
1571  //else return;
1572  }
1573  // apply realistic PID
1574  if(fRealPid){
1575  if(selection==1 || selection==3) invMasspKpi=part->InvMassLcpKpi();
1576  else if(selection>=2) invMasspiKp=part->InvMassLcpiKp();
1577  }
1578  // Float_t centrality=fRDCutsAnalysis->GetCentrality(aod);
1579  // Int_t runNumber=aod->GetRunNumber();
1580 
1581  //fill ntuple
1582  // 1 - loose pid
1583  // 2 - bayesian pid
1584  Float_t tmp[53];
1585  //Is Lc
1586  if(!IsInjected && IsLc==0) tmp[0]=0; //non-injected bkg
1587  else if(IsLc==1 && !IsLcfromLb) tmp[0]=1; //prompt Lc
1588  else if(IsLc==1 && IsLcfromLb) tmp[0]=2; //non-prompt Lc
1589  else if(IsInjected && IsLc==0) tmp[0]=3; //injected bkg
1590  else tmp[0]=-99; //should not happen
1591 
1592  //invariant mass
1593  tmp[2]=part->InvMassLcpiKp();
1594  tmp[1]=part->InvMassLcpKpi();
1595  tmp[3]=part->Charge();
1596  //pt of decay products
1597  tmp[4]=part->PtProng(0);
1598  tmp[5]=part->PtProng(1); //pt kaon
1599  tmp[6]=part->PtProng(2);
1600  Float_t ptLc=part->Pt();
1601  tmp[7]=ptLc;
1602  tmp[8]=part->CosPointingAngle();
1603  tmp[9]=part->DecayLength();
1604  tmp[10]=part->NormalizedDecayLength();
1605  tmp[11]=TMath::Min(part->GetDist12toPrim(),part->GetDist23toPrim());
1606  tmp[12]=part->GetSigmaVert();
1607  Double_t dcas[3]={0};
1608  part->GetDCAs(dcas);
1609  tmp[13]=TMath::Max(dcas[0],TMath::Max(dcas[1],dcas[2]));
1610  tmp[14]=part->DecayLengthXY();
1611  tmp[15]=part->NormalizedDecayLengthXY();
1612 
1613  //Check resonant decays for efficiencies
1614  tmp[16]=fIsLcResonant; // bkg
1615  //PID selection
1616  tmp[17]=selection;
1617  //FONLL weights
1618 
1619  //Get MC Lc to get true pT
1620  Double_t ptLcMC=-1;
1621  Double_t weightPythia=-1,weight7LHC10f6a=-1,weight5LHC10f6a=-1,weight5LHC13d3=-1;
1622  if(IsLc) {
1623  Int_t labDp = -1;
1624  Int_t pdgCand =4122;
1625  Int_t pdgDaughter[3]={-1,-1,-1};
1626  pdgDaughter[0]=2212;
1627  pdgDaughter[1]=321;
1628  pdgDaughter[2]=211;
1629  labDp = part->MatchToMC(pdgCand,arrayMC,3,pdgDaughter);
1630  if(labDp>=0){
1631  AliAODMCParticle *motherPart = (AliAODMCParticle*)arrayMC->At(labDp);
1632 
1633  ptLcMC = motherPart->Pt();
1634  weightPythia = fFuncWeightPythia->Eval(ptLcMC);
1635  weight7LHC10f6a = fFuncWeightFONLL7overLHC10f6a->Eval(ptLcMC);
1636  weight5LHC10f6a = fFuncWeightFONLL5overLHC10f6a->Eval(ptLcMC);
1637  weight5LHC13d3 = fFuncWeightFONLL5overLHC13d3->Eval(ptLcMC);
1638  }
1639  }
1640  tmp[18]=ptLcMC;
1641  tmp[19]=weightPythia;
1642  tmp[20]=weight7LHC10f6a;
1643  tmp[21]=weight5LHC10f6a;
1644  tmp[22]=weight5LHC13d3;
1645 
1646  AliVTrack *track0=dynamic_cast<AliVTrack*>(part->GetDaughter(0));
1647  AliVTrack *track1=dynamic_cast<AliVTrack*>(part->GetDaughter(1));
1648  AliVTrack *track2=dynamic_cast<AliVTrack*>(part->GetDaughter(2));
1649  if(fFillNtuple>=1) {
1650  if(fRDCutsAnalysis->GetPidHF()->GetUseCombined()) {//check this
1651  //bayesian probabilities
1652  Double_t prob0[AliPID::kSPECIES];
1653  Double_t prob1[AliPID::kSPECIES];
1654  Double_t prob2[AliPID::kSPECIES];
1655 
1656  if (!track0 || !track1 || !track2) {
1657  AliError("AliVTrack missing - wont fill Ntuple");
1658  return;
1659  }
1660  fRDCutsAnalysis->GetPidHF()->GetPidCombined()->ComputeProbabilities(track0,fRDCutsAnalysis->GetPidHF()->GetPidResponse(),prob0);
1661  fRDCutsAnalysis->GetPidHF()->GetPidCombined()->ComputeProbabilities(track1,fRDCutsAnalysis->GetPidHF()->GetPidResponse(),prob1);
1662  fRDCutsAnalysis->GetPidHF()->GetPidCombined()->ComputeProbabilities(track2,fRDCutsAnalysis->GetPidHF()->GetPidResponse(),prob2);
1663  //if(prob0[AliPID::kPion] < 0.3 && prob0[AliPID::kProton] < 0.3) return;
1664  //if(prob1[AliPID::kKaon] < 0.3) return;
1665  //if(prob2[AliPID::kPion] < 0.3 && prob2[AliPID::kProton] < 0.3) return;
1666  tmp[23]=prob0[AliPID::kPion]; //track 0, pion
1667  tmp[24]=prob0[AliPID::kKaon]; //kaon
1668  tmp[25]=prob0[AliPID::kProton]; //proton
1669  tmp[26]=prob1[AliPID::kPion]; //track 1, pion
1670  tmp[27]=prob1[AliPID::kKaon]; //kaon
1671  tmp[28]=prob1[AliPID::kProton]; //proton
1672  tmp[29]=prob2[AliPID::kPion]; //track 2, pion
1673  tmp[30]=prob2[AliPID::kKaon]; //kaon
1674  tmp[31]=prob2[AliPID::kProton]; //proton
1675  }
1676  else {
1677  //fill w 0
1678  for(Int_t iprob=23;iprob<=31;iprob++) {
1679  tmp[iprob]=-1;
1680  }
1681  }
1682  }
1683  if(fFillNtuple>=2) {
1684  Double_t d00 = part->Getd0Prong(0);
1685  Double_t d01 = part->Getd0Prong(1);
1686  Double_t d02 = part->Getd0Prong(2);
1687  Double_t d0err0 = part->Getd0errProng(0);
1688  Double_t d0err1 = part->Getd0errProng(1);
1689  Double_t d0err2 = part->Getd0errProng(2);
1690  tmp[32]=d00;
1691  tmp[33]=d01;
1692  tmp[34]=d02;
1693  tmp[35]=d00*d00 + d01*d01 + d02*d02;
1694  tmp[36]=d00/d0err0;
1695  tmp[37]=d01/d0err1;
1696  tmp[38]=d02/d0err2;
1697  Double_t dd0,edd0;
1698  Double_t dd1,edd1;
1699  Double_t dd2,edd2;
1700  part->Getd0MeasMinusExpProng(0,aod->GetMagneticField(),dd0,edd0);
1701  part->Getd0MeasMinusExpProng(1,aod->GetMagneticField(),dd1,edd1);
1702  part->Getd0MeasMinusExpProng(2,aod->GetMagneticField(),dd2,edd2);
1703  Double_t ns0=dd0/edd0;
1704  Double_t ns1=dd1/edd1;
1705  Double_t ns2=dd2/edd2;
1706  tmp[39]=ns0;
1707  tmp[40]=ns1;
1708  tmp[41]=ns2;
1709  tmp[42]=part->CosPointingAngleXY();
1710  tmp[13]=dcas[0];
1711  tmp[43]=dcas[1];
1712  tmp[44]=dcas[2];
1713  tmp[11]=part->GetDist12toPrim();
1714  tmp[45]=part->GetDist23toPrim();
1715  Int_t runNumber=aod->GetRunNumber();
1716  tmp[46]=(Float_t)runNumber;
1717  }
1718  if(fFillNtuple>=3) {
1719  tmp[47]=part->InvMass2Prongs(1,0,321,2212); //inv mass pK
1720  tmp[48]=part->InvMass2Prongs(2,1,211,321); //inv mass Kpi
1721  tmp[49]=part->InvMass2Prongs(2,0,211,2212);//inv mass ppi
1722  tmp[50]=part->InvMass2Prongs(1,2,321,2212); //inv mass Kp
1723  tmp[51]=part->InvMass2Prongs(0,1,211,321); //inv mass piK
1724  tmp[52]=part->InvMass2Prongs(0,2,211,2212);//inv mass pip
1725  }
1726 
1727  fNtupleLambdac->Fill(tmp);
1728  PostData(5,fNtupleLambdac);
1729 
1730  return;
1731 }
1732 
1733 //---------------------------
1734 
1736 
1737  //
1740  //
1741 
1742  //fill according to kStep - hArray[nSteps]
1743  if(!fIsLc) {
1744  fhNBkgNI[kStep]->Fill(fCandidateVars[0]);
1745  fhPtEtaBkgNI[kStep]->Fill(fCandidateVars[0],fCandidateVars[1]);
1746  fhPtYBkgNI[kStep]->Fill(fCandidateVars[0],fCandidateVars[2]);
1747  fhPtPhiBkgNI[kStep]->Fill(fCandidateVars[0],fCandidateVars[3]);
1748  }
1749 
1750  else{
1751  fhNLc[kStep]->Fill(fCandidateVars[0]);
1752  fhPtEtaLc[kStep]->Fill(fCandidateVars[0],fCandidateVars[1]);
1753  fhPtYLc[kStep]->Fill(fCandidateVars[0],fCandidateVars[2]);
1754  fhPtPhiLc[kStep]->Fill(fCandidateVars[0],fCandidateVars[3]);
1755 
1756  if(fIsLc==1) { //prompt Lc
1757  fhNLcc[kStep]->Fill(fCandidateVars[0]);
1758  fhPtEtaLcc[kStep]->Fill(fCandidateVars[0],fCandidateVars[1]);
1759  fhPtYLcc[kStep]->Fill(fCandidateVars[0],fCandidateVars[2]);
1760  fhPtPhiLcc[kStep]->Fill(fCandidateVars[0],fCandidateVars[3]);
1761  if(fIsLcResonant==1){
1762  fhNLcNonRc[kStep]->Fill(fCandidateVars[0]);
1763  fhPtEtaLcNonRc[kStep]->Fill(fCandidateVars[0],fCandidateVars[1]);
1764  fhPtYLcNonRc[kStep]->Fill(fCandidateVars[0],fCandidateVars[2]);
1765  fhPtPhiLcNonRc[kStep]->Fill(fCandidateVars[0],fCandidateVars[3]);
1766  }
1767  else if(fIsLcResonant==2){
1768  fhNLcL1520c[kStep]->Fill(fCandidateVars[0]);
1769  fhPtEtaLcL1520c[kStep]->Fill(fCandidateVars[0],fCandidateVars[1]);
1770  fhPtYLcL1520c[kStep]->Fill(fCandidateVars[0],fCandidateVars[2]);
1771  fhPtPhiLcL1520c[kStep]->Fill(fCandidateVars[0],fCandidateVars[3]);
1772  }
1773  else if(fIsLcResonant==3){
1774  fhNLcKstarc[kStep]->Fill(fCandidateVars[0]);
1775  fhPtEtaLcKstarc[kStep]->Fill(fCandidateVars[0],fCandidateVars[1]);
1776  fhPtYLcKstarc[kStep]->Fill(fCandidateVars[0],fCandidateVars[2]);
1777  fhPtPhiLcKstarc[kStep]->Fill(fCandidateVars[0],fCandidateVars[3]);
1778  }
1779  else if(fIsLcResonant==4){
1780  fhNLcDeltac[kStep]->Fill(fCandidateVars[0]);
1781  fhPtEtaLcDeltac[kStep]->Fill(fCandidateVars[0],fCandidateVars[1]);
1782  fhPtYLcDeltac[kStep]->Fill(fCandidateVars[0],fCandidateVars[2]);
1783  fhPtPhiLcDeltac[kStep]->Fill(fCandidateVars[0],fCandidateVars[3]);
1784  }
1785  }
1786  else if(fIsLc==2) { //non-prompt Lc
1787  fhNLcb[kStep]->Fill(fCandidateVars[0]);
1788  fhPtEtaLcb[kStep]->Fill(fCandidateVars[0],fCandidateVars[1]);
1789  fhPtYLcb[kStep]->Fill(fCandidateVars[0],fCandidateVars[2]);
1790  fhPtPhiLcb[kStep]->Fill(fCandidateVars[0],fCandidateVars[3]);
1791  if(fIsLcResonant==1){
1792  fhNLcNonRb[kStep]->Fill(fCandidateVars[0]);
1793  fhPtEtaLcNonRb[kStep]->Fill(fCandidateVars[0],fCandidateVars[1]);
1794  fhPtYLcNonRb[kStep]->Fill(fCandidateVars[0],fCandidateVars[2]);
1795  fhPtPhiLcNonRb[kStep]->Fill(fCandidateVars[0],fCandidateVars[3]);
1796  }
1797  else if(fIsLcResonant==2){
1798  fhNLcL1520b[kStep]->Fill(fCandidateVars[0]);
1799  fhPtEtaLcL1520b[kStep]->Fill(fCandidateVars[0],fCandidateVars[1]);
1800  fhPtYLcL1520b[kStep]->Fill(fCandidateVars[0],fCandidateVars[2]);
1801  fhPtPhiLcL1520b[kStep]->Fill(fCandidateVars[0],fCandidateVars[3]);
1802  }
1803  else if(fIsLcResonant==3){
1804  fhNLcKstarb[kStep]->Fill(fCandidateVars[0]);
1805  fhPtEtaLcKstarb[kStep]->Fill(fCandidateVars[0],fCandidateVars[1]);
1806  fhPtYLcKstarb[kStep]->Fill(fCandidateVars[0],fCandidateVars[2]);
1807  fhPtPhiLcKstarb[kStep]->Fill(fCandidateVars[0],fCandidateVars[3]);
1808  }
1809  else if(fIsLcResonant==4){
1810  fhNLcDeltab[kStep]->Fill(fCandidateVars[0]);
1811  fhPtEtaLcDeltab[kStep]->Fill(fCandidateVars[0],fCandidateVars[1]);
1812  fhPtYLcDeltab[kStep]->Fill(fCandidateVars[0],fCandidateVars[2]);
1813  fhPtPhiLcDeltab[kStep]->Fill(fCandidateVars[0],fCandidateVars[3]);
1814  }
1815  }
1816  }
1817 }
1818 
1819 
1820 
1821 //-----------------------------
1823 
1824  //
1826  //
1827 
1828  Int_t lab[3]={0,0,0},pdgs[3]={0,0,0};
1829  for(Int_t i=0;i<3;i++){
1830  AliAODTrack *daugh=(AliAODTrack*)d->GetDaughter(i);
1831  lab[i]=daugh->GetLabel();
1832  if(lab[i]<0) return kFALSE;
1833  AliAODMCParticle *part= (AliAODMCParticle*)arrayMC->At(lab[i]);
1834  if(!part) return kFALSE;
1835  pdgs[i]=TMath::Abs(part->GetPdgCode());
1836  }
1837 
1838  if(pdgs[0]==2212 && pdgs[1]==321 && pdgs[2]==211) return kTRUE;
1839 
1840  return kFALSE;
1841 }
1842 //-----------------------------
1844 
1845  //
1847  //
1848 
1849  Int_t lab[3]={0,0,0},pdgs[3]={0,0,0};
1850  for(Int_t i=0;i<3;i++){
1851  AliAODTrack *daugh=(AliAODTrack*)d->GetDaughter(i);
1852  lab[i]=daugh->GetLabel();
1853  if(lab[i]<0) return kFALSE;
1854  AliAODMCParticle *part= (AliAODMCParticle*)arrayMC->At(lab[i]);
1855  if(!part) return kFALSE;
1856  pdgs[i]=TMath::Abs(part->GetPdgCode());
1857  }
1858 
1859  if(pdgs[2]==2212 && pdgs[1]==321 && pdgs[0]==211) {return kTRUE;}
1860 
1861  return kFALSE;
1862 }
1863 
1865  if(d->HasSelectionBit(AliRDHFCuts::kD0toKpiCuts)) hSelectionBits->Fill(1,fCandidateVars[0]);
1866  if(d->HasSelectionBit(AliRDHFCuts::kD0toKpiPID)) hSelectionBits->Fill(2,fCandidateVars[0]);
1867  if(d->HasSelectionBit(AliRDHFCuts::kD0fromDstarCuts)) hSelectionBits->Fill(3,fCandidateVars[0]);
1868  if(d->HasSelectionBit(AliRDHFCuts::kD0fromDstarPID)) hSelectionBits->Fill(4,fCandidateVars[0]);
1869  if(d->HasSelectionBit(AliRDHFCuts::kDplusCuts)) hSelectionBits->Fill(5,fCandidateVars[0]);
1870  if(d->HasSelectionBit(AliRDHFCuts::kDplusPID)) hSelectionBits->Fill(6,fCandidateVars[0]);
1871  if(d->HasSelectionBit(AliRDHFCuts::kDsCuts)) hSelectionBits->Fill(7,fCandidateVars[0]);
1872  if(d->HasSelectionBit(AliRDHFCuts::kDsPID)) hSelectionBits->Fill(8,fCandidateVars[0]);
1873  if(d->HasSelectionBit(AliRDHFCuts::kLcCuts)) hSelectionBits->Fill(9,fCandidateVars[0]);
1874  if(d->HasSelectionBit(AliRDHFCuts::kLcPID)) hSelectionBits->Fill(10,fCandidateVars[0]);
1875  if(d->HasSelectionBit(AliRDHFCuts::kDstarCuts)) hSelectionBits->Fill(11,fCandidateVars[0]);
1876  if(d->HasSelectionBit(AliRDHFCuts::kDstarPID)) hSelectionBits->Fill(12,fCandidateVars[0]);
1877 }
1878 
1880 
1881  Int_t selection = 0;
1882 
1883  if(fRDCutsAnalysis->GetPidHF()->GetUseCombined()) {//check this
1884  AliVTrack *track0=dynamic_cast<AliVTrack*>(part->GetDaughter(0));
1885  AliVTrack *track1=dynamic_cast<AliVTrack*>(part->GetDaughter(1));
1886  AliVTrack *track2=dynamic_cast<AliVTrack*>(part->GetDaughter(2));
1887  //bayesian probabilities
1888  Double_t prob0[AliPID::kSPECIES];
1889  Double_t prob1[AliPID::kSPECIES];
1890  Double_t prob2[AliPID::kSPECIES];
1891 
1892  if (!track0 || !track1 || !track2) {
1893  AliError("AliVTrack missing");
1894  return 0;
1895  }
1896  fRDCutsAnalysis->GetPidHF()->GetPidCombined()->ComputeProbabilities(track0,fRDCutsAnalysis->GetPidHF()->GetPidResponse(),prob0);
1897  fRDCutsAnalysis->GetPidHF()->GetPidCombined()->ComputeProbabilities(track1,fRDCutsAnalysis->GetPidHF()->GetPidResponse(),prob1);
1898  fRDCutsAnalysis->GetPidHF()->GetPidCombined()->ComputeProbabilities(track2,fRDCutsAnalysis->GetPidHF()->GetPidResponse(),prob2);
1899  if(prob0[AliPID::kProton] * prob1[AliPID::kKaon] * prob2[AliPID::kPion] > prob2[AliPID::kProton] * prob1[AliPID::kKaon] * prob0[AliPID::kPion]) selection = 1; // pKpi
1900  else selection = 2; // piKp
1901  }
1902  return selection;
1903 }
1904 
1905 
Double_t NormalizedDecayLengthXY() const
Double_t NormalizedDecayLength() const
Bool_t fLcCut
Vertexer heavy flavour (used to pass the cuts)
ClassImp(AliAnalysisTaskTriggerRates) AliAnalysisTaskTriggerRates
TH2F * fhMCmassLcPtSig
!Lc signal invariant mass vs pt
TH2F * fhPtYLcNonRb[12]
! hist. for n Lc from b non resonant, pT vs rapidity
Bool_t fRealPid
flag for access to MC
TH2F * fhInvMassMisIdpKpiProb
! hist for inv mass pKpi signal mis id'd as piKp most prob PID
TH1F * fhIsLcGen
!hist for resonant flag gen
TH2F * fhPtPhiLcDeltac[12]
! hist. for n Lc from c Delta++ + K, pT vs phi
TH2F * fhPtEtaLcDeltab[12]
! hist. for n Lc from b Delta++ + K, pT vs eta
TH2F * fhPtPhiLc[12]
! hist. for n Lc tot., pT vs phi
void StoreCandidates(AliVEvent *, Int_t nCand=0, Bool_t flagFilter=kTRUE)
void FillSelectionBits(AliAODRecoDecayHF3Prong *d, TH2F *hSelectionBits)
TH2F * fhProbmassLcPtSigb
!Lc from b signal invariant mass vs pt
void Getd0MeasMinusExpProng(Int_t ip, Double_t magf, Double_t &d0diff, Double_t &errd0diff) const
TH2F * fhPtEtaBkgNI[12]
! hist. for n bkg, pT vs eta
Bool_t HasSelectionBit(Int_t i) const
TH1F * fhNLcL1520c[12]
! hist. for n Lc from c L1520 + pi, pT
Bool_t GetUseCombined()
Definition: AliAODPidHF.h:165
TH1F * fhNLcb[12]
! hist. for n Lc tot. from b, pT
TH2F * fhPIDmassLcPtSig
!Lc signal invariant mass vs pt
virtual void Terminate(Option_t *option)
Int_t GetPIDselectionMaxProb(AliAODRecoDecayHF3Prong *part)
TList * fOutput
! list send on output slot 0
void FillNtuple(AliAODEvent *aod, AliAODRecoDecayHF3Prong *part, TClonesArray *arrayMC, Int_t selection)
TH2F * fhInvMassMisIdpKpi
! hist for inv mass pKpi signal mis id'd as piKp
Int_t LambdacDaugh(AliAODMCParticle *part, TClonesArray *arrayMC, Bool_t &isInAcc) const
TH2F * fhPtPhiLcc[12]
! hist. for n Lc tot. from c, pT vs phi
TH2F * fhPIDmassLcPtSigb
!Lc from b signal invariant mass vs pt
TH2F * fhProbmassLcPtSigc
!Lc from c signal invariant mass vs pt
Float_t fUpmasslimit
pt of Lc candidate
Float_t fCandidateVars[4]
is Lc resonant - 1=non resonant, 2=via L1520 + pi, 3=via K* + p, 4=via Delta++ + K ...
TH2F * fhPtYLc[12]
! hist. for n Lc tot., pT vs rapidity
Int_t GetWhyRejection() const
Definition: AliRDHFCuts.h:294
Double_t CosPointingAngleXY() const
ULong_t GetSelectionMap() const
TH1F * fhPtMisIdpiKpProb
! hist for pt pKpi signal mis id'd as piKp most prob PID
void FillMassHists(AliAODEvent *aod, AliAODRecoDecayHF3Prong *d, TClonesArray *arrayMC, Int_t selection, Int_t selectionProb)
TH2F * fhPtYLcNonRc[12]
! hist. for n Lc from c non resonant, pT vs rapidity
TH2F * fhPtYLcc[12]
! hist. for n Lc tot. from c, pT vs rapidity
AliPIDResponse * fPIDResponse
histo with number of entries
TH1F * fhPtCorrId
! hist for correctly id'd pKpi
static Int_t CheckOrigin(TClonesArray *arrayMC, AliAODMCParticle *mcPart, Bool_t searchUpToQuark=kTRUE)
Double_t GetMaxVtxZ() const
Definition: AliRDHFCuts.h:241
Bool_t fKeepLcNotFromQuark
filling ntuple type
TH2F * fhPtEtaLc[12]
! hist. for n Lc tot., pT vs eta
TH2F * fhPtEtaLcKstarc[12]
! hist. for n Lc from c K* + p, pT vs eta
TH2F * fhPtEtaLcL1520c[12]
! hist. for n Lc from c L1520 + pi, pT vs eta
TH2F * fhPtEtaLcNonRc[12]
! hist. for n Lc from c non resonant, pT vs eta
AliAODPidHF * GetPidHF() const
Definition: AliRDHFCuts.h:231
TH2F * fhPtYLcDeltab[12]
! hist. for n Lc from b Delta++ + K, pT vs rapidity
AliNormalizationCounter * fCounter
!AliNormalizationCounter on output slot 7
TF1 * fFuncWeightPythia
! weight function for Pythia vs pPb prod.
void SetLambdacDaugh(AliAODMCParticle *part, TClonesArray *arrayMC, Bool_t &isInAcc)
Bool_t fReadMC
flag for collision system. 0=pp, 1=PbPb, 2=pPb
TH2F * fhPtPhiLcKstarc[12]
! hist. for n Lc from c K* + p, pT vs phi
TH1F * fhNLcDeltac[12]
! hist. for n Lc from c Delta++ + K, pT
Int_t MatchToMCLambdac(AliAODRecoDecayHF3Prong *d, TClonesArray *arrayMC) const
TH2F * fhInvMassMisIdpiKpProb
! hist for inv mass pKpi signal mis id'd as piKp most prob PID
TH2F * fhMCmassLcPt
!Lc Bkg+signal invariant mass vs pt
TH2F * fhPtEtaLcL1520b[12]
! hist. for n Lc from b L1520 + pi, pT vs eta
Int_t fSyst
flag to keep background in
TH2F * fhPtYLcDeltac[12]
! hist. for n Lc from c Delta++ + K, pT vs rapidity
TH2F * fhPIDmassLcPtSigc
!Lc from c signal invariant mass vs pt
TH2F * fhPtYLcL1520b[12]
! hist. for n Lc from b L1520 + pi, pT vs rapidity
TH2F * fhPtPhiLcb[12]
! hist. for n Lc tot. from b, pT vs phi
AliPIDCombined * GetPidCombined() const
Definition: AliAODPidHF.h:161
TH2F * fhProbmassLcPtSig
!Lc signal invariant mass vs pt
TH2F * fhSelectionBits
! hist for ALL Filter bits
TH2F * fhInvMassMisIdpiKp
! hist for inv mass pKpi signal mis id'd as piKp
TNtuple * fNtupleLambdac
! output ntuple
TH2F * fhPtPhiLcL1520c[12]
! hist. for n Lc from c L1520 + pi, pT vs phi
virtual Bool_t IsInFiducialAcceptance(Double_t pt, Double_t y) const
TH1F * fhNLcc[12]
! hist. for n Lc tot. from c, pT
TH1F * fhSelectBit
! hist for Filter Bit
TH1F * fhIsLcResonantGen
!hist for resonant flag gen
TH2F * fhSelectionBitsSigb
! hist for ALL Filter bits Lc from b
Bool_t IspiKpMC(AliAODRecoDecayHF3Prong *d, TClonesArray *arrayMC) const
TH2F * fhPtYBkgNI[12]
! hist. for n bkg, pT vs rapidity
AliAODVertex * GetOwnPrimaryVtx() const
TH2F * fhPtPhiLcDeltab[12]
! hist. for n Lc from b Delta++ + K, pT vs phi
Double_t GetSigmaVert(const AliAODEvent *aod=0x0)
AliAODPidHF * GetPidprot() const
TH1F * fhNLcKstarb[12]
! hist. for n Lc from b K* + p, pT
TH1F * fNentries
flag for whether Lc is from Hijing
AliAnalysisVertexingHF * fVHF
apply analysis cuts
Bool_t fKeepBkgNt
flag to keep Lc not from quark
Double_t Getd0errProng(Int_t ip) const
prongs
TH1F * fhNBkgNI[12]
! hist. for n bkg, pT
TH2F * fhPIDmassLcPt
!Lc Bkg+signal invariant mass vs pt
TH2F * fhPtPhiLcNonRb[12]
! hist. for n Lc from b non resonant, pT vs phi
TH2F * fhPtEtaLcc[12]
! hist. for n Lc tot. from c, pT vs eta
TH2F * fhMCmassLcPtSigc
!Lc from c signal invariant mass vs pt
Bool_t IspKpiMC(AliAODRecoDecayHF3Prong *d, TClonesArray *arrayMC) const
AliPIDResponse * GetPidResponse() const
Definition: AliAODPidHF.h:160
Float_t fLowmasslimit
upper inv mass limit for histos
Bool_t IsCandidateInjected(AliAODRecoDecayHF *cand, AliAODMCHeader *header, TClonesArray *arrayMC)
TH2F * fhProbmassLcPt
!Lc Bkg+signal invariant mass vs pt
TH1F * fhPtMisIdpiKp
! hist for pt pKpi signal mis id'd as piKp
void GetDCAs(Double_t dca[3]) const
AliAODPidHF * GetPidpion() const
Bool_t Data(TH1F *h, Double_t *rangefit, Bool_t writefit, Double_t &sgn, Double_t &errsgn, Double_t &bkg, Double_t &errbkg, Double_t &sgnf, Double_t &errsgnf, Double_t &sigmafit, Int_t &status)
Bool_t GetLambdacDaugh(AliAODMCParticle *part, TClonesArray *arrayMC) const
void SetOwnPrimaryVtx(const AliAODVertex *vtx)
Double_t DecayLengthXY() const
virtual void UserExec(Option_t *option)
TH2F * fhPtPhiLcL1520b[12]
! hist. for n Lc from b L1520 + pi, pT vs phi
TH1F * fhSetIsLc
! hist for before/after reco check MC LC
TH2F * fhPtEtaLcDeltac[12]
! hist. for n Lc from c Delta++ + K, pT vs eta
TH2F * fhPtPhiBkgNI[12]
! hist. for n bkg, pT vs phi
TH1F * fHistNEvents
!hist. for No. of events
TH2F * fhPtYLcb[12]
! hist. for n Lc tot. from b, pT vs rapidity
Bool_t IsEventSelected(AliVEvent *event)
virtual Int_t IsSelected(TObject *obj, Int_t selectionLevel)
void StoreEvent(AliVEvent *, AliRDHFCuts *, Bool_t mc=kFALSE, Int_t multiplicity=-9999, Double_t spherocity=-99.)
TH2F * fhPtPhiLcKstarb[12]
! hist. for n Lc from b K* + p, pT vs phi
TF1 * fFuncWeightFONLL5overLHC10f6a
! weight function for FONLL vs p prod.
void SetOldPid(Bool_t oldPid)
Definition: AliAODPidHF.h:108
TH2F * fhPtYLcKstarb[12]
! hist. for n Lc from b K* + p, pT vs rapidity
TH2F * fhPtYLcL1520c[12]
! hist. for n Lc from c L1520 + pi, pT vs rapidity
TF1 * fFuncWeightFONLL7overLHC10f6a
! weight function for FONLL vs p prod.
TH1F * fhNLcL1520b[12]
! hist. for n Lc from b L1520 + pi, pT
TH1F * fhPtMisIdpKpiProb
! hist for pt pKpi signal mis id'd as piKp most prob PID
TH1F * fhNLcNonRc[12]
! hist. for n Lc from c non resonant, pT
TH2F * fhPtEtaLcb[12]
! hist. for n Lc tot. from b, pT vs eta
void SetIsLcReco(AliAODRecoDecayHF3Prong *part, TClonesArray *arrayMC)
TH1F * fhIsLcReco
!hist for resonant flag reco
Bool_t GetIsUsePID() const
Definition: AliRDHFCuts.h:254
TH2F * fhPtPhiLcNonRc[12]
! hist. for n Lc from c non resonant, pT vs phi
TH1F * fhIsLcResonantReco
!hist for resonant flag reco
TH1F * fhNLcNonRb[12]
! hist. for n Lc from b non resonant, pT
TH2F * fhPtYLcKstarc[12]
! hist. for n Lc from c K* + p, pT vs rapidity
TH2F * fhMCmassLcPtSigb
!Lc from b signal invariant mass vs pt
Double_t CosPointingAngle() const
TH1F * fhPtMisIdpKpi
! hist for pt pKpi signal mis id'd as piKp
TH1F * fhNLc[12]
! hist. for n Lc tot., pT
TH1F * fhNLcKstarc[12]
! hist. for n Lc from c K* + p, pT
void SetIsLcGen(AliAODMCParticle *partMC, TClonesArray *arrayMC)
Int_t fIsLcResonant
is MC Lc - 0=not Lc, 1=Lc from c, 2=Lc from b
Int_t PtBin(Double_t pt) const
TH1F * fhNLcDeltab[12]
! hist. for n Lc from b Delta++ + K, pT
Double_t DecayLength() const
TH2F * fhSelectionBitsSigc
! hist for ALL Filter bits Lc from c
TH2F * fhPtEtaLcNonRb[12]
! hist. for n Lc from b non resonant, pT vs eta
TH2F * fhPtEtaLcKstarb[12]
! hist. for n Lc from b K* + p, pT vs eta
Bool_t fIsHijing
flag for Lc filter bit PID
TF1 * fFuncWeightFONLL5overLHC13d3
! weight function for FONLL vs pPb prod.
Bool_t fMCPid
flag for access to MC
void SetPidResponse(AliPIDResponse *pidResp)
Definition: AliAODPidHF.h:111
Class with functions useful for different D2H analyses //.
TH1F * fhPtCorrIdProb
! hist for correctly id'd pKpi most prob PID
Bool_t fLcPIDCut
flag for Lc filter bit cut
AliRDHFCutsLctopKpi * fRDCutsAnalysis
lower inv mass limit for histos