AliPhysics  vAN-20150822 (d56cf94)
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros
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 SetAnalysis(Bool_t analysis=kTRUE){fAnalysis=analysis;}
69  void SetUseFilterBitCut(Bool_t setter) { fLcCut = setter; return; }
70  void SetUseFilterBitPID(Bool_t setter) { fLcPIDCut = setter; return; }
71  void SetCollisionSystem(Int_t syst) {fSyst = syst; return; }
72  void SetLambdacDaugh(AliAODMCParticle *part, TClonesArray *arrayMC, Bool_t &isInAcc) {fIsLcResonant=LambdacDaugh(part,arrayMC,isInAcc);}
73  void SetIsLcGen(AliAODMCParticle *partMC, TClonesArray *arrayMC);
74  void SetIsLcReco(AliAODRecoDecayHF3Prong *part, TClonesArray *arrayMC);
75 
76  Bool_t GetLambdacDaugh(AliAODMCParticle *part, TClonesArray *arrayMC) const {Bool_t dummy=kTRUE; return LambdacDaugh(part,arrayMC,dummy)>=1 ? kTRUE : kFALSE;}
78 
79  Bool_t IspiKpMC(AliAODRecoDecayHF3Prong *d,TClonesArray *arrayMC) const ;
80  Bool_t IspKpiMC(AliAODRecoDecayHF3Prong *d,TClonesArray *arrayMC) const ;
81  Int_t MatchToMCLambdac(AliAODRecoDecayHF3Prong *d,TClonesArray *arrayMC) const ;
82  Int_t LambdacDaugh(AliAODMCParticle *part,TClonesArray *arrayMC, Bool_t &isInAcc) const;
83  void FillMassHists(AliAODEvent *aod,AliAODRecoDecayHF3Prong *d, TClonesArray *arrayMC, Int_t selection, Int_t selectionProb);
84  void FillNtuple(AliAODEvent *aod,AliAODRecoDecayHF3Prong *part, TClonesArray *arrayMC, Int_t selection);
85  void FillEffHists(Int_t kStep);
86  void FillSelectionBits(AliAODRecoDecayHF3Prong *d, TH2F *hSelectionBits);
87 
88  // Implementation of interface methods
89  virtual void UserCreateOutputObjects();
90  virtual void Init();
91  virtual void LocalInit() {Init();}
92  virtual void UserExec(Option_t *option);
93  virtual void Terminate(Option_t *option);
94 
95  private:
96 
99 
100  Bool_t ReconstructKF(AliAODRecoDecayHF3Prong *d,Int_t *pdgs,Double_t field) const;
101 
102  TList *fOutput;
103  TH1F *fHistNEvents;
105  TH1F *fhSelectBit;
109  TH1F *fhSetIsLc;
114  TH2F *fhMCmassLcPt;
124  TH1F *fhIsLcGen;
125  TH1F *fhIsLcReco;
126  TH1F *fhRecoPDGmom;
127  TH1F *fhNBkgNI[12];
128  TH1F *fhNLc[12];
129  TH1F *fhNLcc[12];
130  TH1F *fhNLcNonRc[12];
131  TH1F *fhNLcL1520c[12];
132  TH1F *fhNLcKstarc[12];
133  TH1F *fhNLcDeltac[12];
134  TH1F *fhNLcb[12];
135  TH1F *fhNLcNonRb[12];
136  TH1F *fhNLcL1520b[12];
137  TH1F *fhNLcKstarb[12];
138  TH1F *fhNLcDeltab[12];
139  TH2F *fhPtEtaBkgNI[12];
140  TH2F *fhPtEtaLc[12];
141  TH2F *fhPtEtaLcc[12];
142  TH2F *fhPtEtaLcNonRc[12];
143  TH2F *fhPtEtaLcL1520c[12];
144  TH2F *fhPtEtaLcKstarc[12];
145  TH2F *fhPtEtaLcDeltac[12];
146  TH2F *fhPtEtaLcb[12];
147  TH2F *fhPtEtaLcNonRb[12];
148  TH2F *fhPtEtaLcL1520b[12];
149  TH2F *fhPtEtaLcKstarb[12];
150  TH2F *fhPtEtaLcDeltab[12];
151  TH2F *fhPtYBkgNI[12];
152  TH2F *fhPtYLc[12];
153  TH2F *fhPtYLcc[12];
154  TH2F *fhPtYLcNonRc[12];
155  TH2F *fhPtYLcL1520c[12];
156  TH2F *fhPtYLcKstarc[12];
157  TH2F *fhPtYLcDeltac[12];
158  TH2F *fhPtYLcb[12];
159  TH2F *fhPtYLcNonRb[12];
160  TH2F *fhPtYLcL1520b[12];
161  TH2F *fhPtYLcKstarb[12];
162  TH2F *fhPtYLcDeltab[12];
163  TH2F *fhPtPhiBkgNI[12];
164  TH2F *fhPtPhiLc[12];
165  TH2F *fhPtPhiLcc[12];
166  TH2F *fhPtPhiLcNonRc[12];
167  TH2F *fhPtPhiLcL1520c[12];
168  TH2F *fhPtPhiLcKstarc[12];
169  TH2F *fhPtPhiLcDeltac[12];
170  TH2F *fhPtPhiLcb[12];
171  TH2F *fhPtPhiLcNonRb[12];
172  TH2F *fhPtPhiLcL1520b[12];
173  TH2F *fhPtPhiLcKstarb[12];
174  TH2F *fhPtPhiLcDeltab[12];
175  TNtuple *fNtupleLambdac;
176  Float_t fCutsKF[2];
177  Int_t fIsLc;
179  Float_t fCandidateVars[4];
180  Float_t fPtLc;
181  Float_t fUpmasslimit;
182  Float_t fLowmasslimit;
184  TList *fListCuts;
185  Int_t fFillNtuple;
187  Int_t fSyst;
188  Bool_t fReadMC;
189  Bool_t fMCPid;
190  Bool_t fRealPid;
191  Bool_t fResPid;
192  Bool_t fUseKF;
193  Bool_t fAnalysis;
195  Bool_t fLcCut;
196  Bool_t fLcPIDCut;
197  TH1F *fNentries;
198  //AliAODpidUtil* fUtilPid;
199  AliPIDResponse *fPIDResponse;
202 
204  ClassDef(AliAnalysisTaskSELambdacTMVA,6);
205 };
207 
208 #endif
209 
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
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)
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
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
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
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 * 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 Lc not from quark
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
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 Lc filter bit PID
AliAnalysisVertexingHF * fVHF
apply analysis cuts
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
Bool_t GetLambdacDaugh(AliAODMCParticle *part, TClonesArray *arrayMC) 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
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
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
TH1F * fhNLcL1520b[12]
! hist. for n Lc from b L1520 + pi, pT
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 * fhNLc[12]
! hist. for n Lc tot., pT
void SetKeepLcNotFromQuark(Bool_t keep=kTRUE)
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 fMCPid
flag for access to MC
Class with functions useful for different D2H analyses //.
Bool_t fLcPIDCut
flag for Lc filter bit cut
AliRDHFCutsLctopKpi * fRDCutsAnalysis
lower inv mass limit for histos