AliPhysics  e59a9ba (e59a9ba)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliAnalysisTaskSELambdacTMVA.h
Go to the documentation of this file.
1 #ifndef ALIANALYSISTASKSELAMBDACTMVA_H
2 #define ALIANALYSISTASKSELAMBDACTMVA_H
3 
4 /* Copyright(c) 1998-2008, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice */
6 
7 /* $Id$ */
8 
9 //*************************************************************************
17 //*************************************************************************
18 
19 #include <TROOT.h>
20 #include <TSystem.h>
21 #include <TNtuple.h>
22 #include <TH1F.h>
23 #include <TH2F.h>
24 #include <TArrayD.h>
25 
26 #include "AliAnalysisTaskSE.h"
27 #include "AliAnalysisVertexingHF.h"
28 #include "AliAODMCParticle.h"
29 #include "AliRDHFCutsLctopKpi.h"
30 #include "AliRDHFCuts.h"
31 #include "TClonesArray.h"
32 //#include "AliAODpidUtil.h"
33 #include "AliPIDResponse.h"
35 #include "AliVertexingHFUtils.h"
36 
37 class AliAnalysisTaskSELambdacTMVA : public AliAnalysisTaskSE
38 {
40  enum {
46  kLcBit = 5,
49  kPtRange = 8,
53  };
54 
55  public:
56 
58  AliAnalysisTaskSELambdacTMVA(const char *name, Int_t fillNtuple,AliRDHFCutsLctopKpi *lccutsana);
60 
61  void SetKeepLcNotFromQuark(Bool_t keep = kTRUE) {fKeepLcNotFromQuark = keep;}
62  void SetReadMC(Bool_t readMC=kTRUE){fReadMC=readMC;}
63  void SetMCPid(){fMCPid=kTRUE;fReadMC=kTRUE;fRealPid=kFALSE;fResPid=kFALSE;return;}
64  void SetRealPid(){fRealPid=kTRUE;fMCPid=kFALSE;return;}
65  void SetResonantPid(){fResPid=kTRUE;fRealPid=kTRUE;fMCPid=kFALSE;return;}
66  void SetCutsKF(Float_t cutsKF[2]){for(Int_t i=0;i<2;i++){fCutsKF[i]=cutsKF[i];}return;}
67  void SetUseKF(Bool_t useKF=kTRUE){fUseKF=useKF;}
68  void SetIsHijing(Bool_t isHijing=kTRUE){fIsHijing=isHijing;}
69  void SetKeepBkgNt(Bool_t keepBkgNt=kTRUE){fKeepBkgNt=keepBkgNt;}
70  void SetAnalysis(Bool_t analysis=kTRUE){fAnalysis=analysis;}
71  void SetUseFilterBitCut(Bool_t setter) { fLcCut = setter; return; }
72  void SetUseFilterBitPID(Bool_t setter) { fLcPIDCut = setter; return; }
73  void SetCollisionSystem(Int_t syst) {fSyst = syst; return; }
74  void SetLambdacDaugh(AliAODMCParticle *part, TClonesArray *arrayMC, Bool_t &isInAcc) {fIsLcResonant=LambdacDaugh(part,arrayMC,isInAcc);}
75  void SetIsLcGen(AliAODMCParticle *partMC, TClonesArray *arrayMC);
76  void SetIsLcReco(AliAODRecoDecayHF3Prong *part, TClonesArray *arrayMC);
77 
78  Bool_t GetLambdacDaugh(AliAODMCParticle *part, TClonesArray *arrayMC) const {Bool_t dummy=kTRUE; return LambdacDaugh(part,arrayMC,dummy)>=1 ? kTRUE : kFALSE;}
80 
81  Bool_t IspiKpMC(AliAODRecoDecayHF3Prong *d,TClonesArray *arrayMC) const ;
82  Bool_t IspKpiMC(AliAODRecoDecayHF3Prong *d,TClonesArray *arrayMC) const ;
83  Int_t MatchToMCLambdac(AliAODRecoDecayHF3Prong *d,TClonesArray *arrayMC) const ;
84  Int_t LambdacDaugh(AliAODMCParticle *part,TClonesArray *arrayMC, Bool_t &isInAcc) const;
85  void FillMassHists(AliAODEvent *aod,AliAODRecoDecayHF3Prong *d, TClonesArray *arrayMC, Int_t selection, Int_t selectionProb);
86  void FillNtuple(AliAODEvent *aod,AliAODRecoDecayHF3Prong *part, TClonesArray *arrayMC, Int_t selection);
87  void FillEffHists(Int_t kStep);
88  void FillSelectionBits(AliAODRecoDecayHF3Prong *d, TH2F *hSelectionBits);
89 
90  // Implementation of interface methods
91  virtual void UserCreateOutputObjects();
92  virtual void Init();
93  virtual void LocalInit() {Init();}
94  virtual void UserExec(Option_t *option);
95  virtual void Terminate(Option_t *option);
96 
97  private:
98 
101 
102  Bool_t ReconstructKF(AliAODRecoDecayHF3Prong *d,Int_t *pdgs,Double_t field) const;
103 
104  TList *fOutput;
105  TH1F *fHistNEvents;
107  TH1F *fhSelectBit;
111  TH1F *fhSetIsLc;
116  TH2F *fhMCmassLcPt;
126  TH1F *fhIsLcGen;
127  TH1F *fhIsLcReco;
128  TH1F *fhRecoPDGmom;
129  TH1F *fhNBkgNI[12];
130  TH1F *fhNLc[12];
131  TH1F *fhNLcc[12];
132  TH1F *fhNLcNonRc[12];
133  TH1F *fhNLcL1520c[12];
134  TH1F *fhNLcKstarc[12];
135  TH1F *fhNLcDeltac[12];
136  TH1F *fhNLcb[12];
137  TH1F *fhNLcNonRb[12];
138  TH1F *fhNLcL1520b[12];
139  TH1F *fhNLcKstarb[12];
140  TH1F *fhNLcDeltab[12];
141  TH2F *fhPtEtaBkgNI[12];
142  TH2F *fhPtEtaLc[12];
143  TH2F *fhPtEtaLcc[12];
144  TH2F *fhPtEtaLcNonRc[12];
145  TH2F *fhPtEtaLcL1520c[12];
146  TH2F *fhPtEtaLcKstarc[12];
147  TH2F *fhPtEtaLcDeltac[12];
148  TH2F *fhPtEtaLcb[12];
149  TH2F *fhPtEtaLcNonRb[12];
150  TH2F *fhPtEtaLcL1520b[12];
151  TH2F *fhPtEtaLcKstarb[12];
152  TH2F *fhPtEtaLcDeltab[12];
153  TH2F *fhPtYBkgNI[12];
154  TH2F *fhPtYLc[12];
155  TH2F *fhPtYLcc[12];
156  TH2F *fhPtYLcNonRc[12];
157  TH2F *fhPtYLcL1520c[12];
158  TH2F *fhPtYLcKstarc[12];
159  TH2F *fhPtYLcDeltac[12];
160  TH2F *fhPtYLcb[12];
161  TH2F *fhPtYLcNonRb[12];
162  TH2F *fhPtYLcL1520b[12];
163  TH2F *fhPtYLcKstarb[12];
164  TH2F *fhPtYLcDeltab[12];
165  TH2F *fhPtPhiBkgNI[12];
166  TH2F *fhPtPhiLc[12];
167  TH2F *fhPtPhiLcc[12];
168  TH2F *fhPtPhiLcNonRc[12];
169  TH2F *fhPtPhiLcL1520c[12];
170  TH2F *fhPtPhiLcKstarc[12];
171  TH2F *fhPtPhiLcDeltac[12];
172  TH2F *fhPtPhiLcb[12];
173  TH2F *fhPtPhiLcNonRb[12];
174  TH2F *fhPtPhiLcL1520b[12];
175  TH2F *fhPtPhiLcKstarb[12];
176  TH2F *fhPtPhiLcDeltab[12];
179  TH1F *fhPtCorrId;
187  TNtuple *fNtupleLambdac;
195  Float_t fCutsKF[2];
196  Int_t fIsLc;
198  Float_t fCandidateVars[4];
199  Float_t fPtLc;
200  Float_t fUpmasslimit;
201  Float_t fLowmasslimit;
203  TList *fListCuts;
204  Int_t fFillNtuple;
206  Bool_t fKeepBkgNt;
207  Int_t fSyst;
208  Bool_t fReadMC;
209  Bool_t fMCPid;
210  Bool_t fRealPid;
211  Bool_t fResPid;
212  Bool_t fUseKF;
213  Bool_t fAnalysis;
215  Bool_t fLcCut;
216  Bool_t fLcPIDCut;
217  Bool_t fIsHijing;
218  TH1F *fNentries;
219  //AliAODpidUtil* fUtilPid;
220  AliPIDResponse *fPIDResponse;
223 
225  ClassDef(AliAnalysisTaskSELambdacTMVA,9);
226 };
228 
229 #endif
230 
Bool_t fLcCut
Vertexer heavy flavour (used to pass the cuts)
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
void SetKeepBkgNt(Bool_t keepBkgNt=kTRUE)
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 FillSelectionBits(AliAODRecoDecayHF3Prong *d, TH2F *hSelectionBits)
TH2F * fhProbmassLcPtSigb
!Lc from b signal invariant mass vs pt
Bool_t fAnalysis
flag to cut with KF vertexer
TH2F * fhPtEtaBkgNI[12]
! hist. for n bkg, pT vs eta
TH1F * fHistNEventsRejTM
!hist. for Rejected events from null trigger mask
AliAnalysisTaskSELambdacTMVA & operator=(const AliAnalysisTaskSELambdacTMVA &source)
TH1F * fhNLcL1520c[12]
! hist. for n Lc from c L1520 + pi, pT
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
TF1 * fFuncWeightFONLL7overLHC10f7aLc
! weight function for FONLL vs p prod. Lc
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
TF1 * fFuncWeightFONLL7overLHC11b2Lc
! weight function for FONLL vs p prod. Lc
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
TH2F * fhPtEtaLc[12]
! hist. for n Lc tot., pT vs eta
Bool_t fKeepLcNotFromQuark
filling ntuple type
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
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
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
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
TH2F * fhPtPhiLcDeltab[12]
! hist. for n Lc from b Delta++ + K, pT vs phi
Float_t fPtLc
candidate variables, 0=Pt, 1=Eta, 2=Y, 3=Phi
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
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
Float_t fLowmasslimit
upper inv mass limit for histos
TH2F * fhProbmassLcPt
!Lc Bkg+signal invariant mass vs pt
TH1F * fhPtMisIdpiKp
! hist for pt pKpi signal mis id'd as piKp
Bool_t GetLambdacDaugh(AliAODMCParticle *part, TClonesArray *arrayMC) const
virtual void UserExec(Option_t *option)
void SetIsHijing(Bool_t isHijing=kTRUE)
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
Bool_t ReconstructKF(AliAODRecoDecayHF3Prong *d, Int_t *pdgs, Double_t field) const
TH2F * fhPtYLcb[12]
! hist. for n Lc tot. from b, pT vs rapidity
TH2F * fhPtPhiLcKstarb[12]
! hist. for n Lc from b K* + p, pT vs phi
TF1 * fFuncWeightFONLL5overLHC10f6a
! weight function for FONLL vs p prod.
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
TH2F * fhPtPhiLcNonRc[12]
! hist. for n Lc from c non resonant, pT vs phi
TH1F * fhIsLcResonantReco
!hist for resonant flag reco
Bool_t fUseKF
flag for PID with resonant channels
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
TH1F * fhPtMisIdpKpi
! hist for pt pKpi signal mis id'd as piKp
TH1F * fhNLc[12]
! hist. for n Lc tot., pT
void SetKeepLcNotFromQuark(Bool_t keep=kTRUE)
TF1 * fFuncWeightFONLL5overLHC13d3Lc
! weight function for FONLL vs pPb prod. Lc
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
TH1F * fhNLcDeltab[12]
! hist. for n Lc from b Delta++ + K, pT
void SetAnalysis(Bool_t analysis=kTRUE)
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
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