AliPhysics  32e057f (32e057f)
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 
38 {
40  enum {
46  kLcBit = 5,
49  kPtRange = 8,
53  };
54 
55  public:
56 
58  AliAnalysisTaskSELambdacTMVA(const char *name, Int_t fillNtuple,Int_t fillNtupleReco,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  void SetUseNchWeight(Bool_t opt = kTRUE) {fUseNchWeight = opt;}
78  void SetMCNchHisto(TH1F* h){
79  if(fHistoMCNch) delete fHistoMCNch;
80  fHistoMCNch=new TH1F(*h);
81  }
82 
83  Bool_t GetLambdacDaugh(AliAODMCParticle *part, TClonesArray *arrayMC) const {Bool_t dummy=kTRUE; return LambdacDaugh(part,arrayMC,dummy)>=1 ? kTRUE : kFALSE;}
86 
87  Bool_t IspiKpMC(AliAODRecoDecayHF3Prong *d,TClonesArray *arrayMC) const ;
88  Bool_t IspKpiMC(AliAODRecoDecayHF3Prong *d,TClonesArray *arrayMC) const ;
89  Int_t MatchToMCLambdac(AliAODRecoDecayHF3Prong *d,TClonesArray *arrayMC) const ;
90  Int_t LambdacDaugh(AliAODMCParticle *part,TClonesArray *arrayMC, Bool_t &isInAcc) const;
91  void FillMassHists(AliAODEvent *aod,AliAODRecoDecayHF3Prong *d, TClonesArray *arrayMC, Int_t selection, Int_t selectionProb);
92  void FillNtuple(AliAODEvent *aod,AliAODRecoDecayHF3Prong *part, TClonesArray *arrayMC, Int_t selection);
93  void FillRecoNtuple(AliAODEvent *aod,AliAODRecoDecayHF3Prong *part, TClonesArray *arrayMC);
94  void FillEffHists(Int_t kStep);
95  void FillSelectionBits(AliAODRecoDecayHF3Prong *d, TH2F *hSelectionBits);
96 
97  // Implementation of interface methods
98  virtual void UserCreateOutputObjects();
99  virtual void Init();
100  virtual void LocalInit() {Init();}
101  virtual void UserExec(Option_t *option);
102  virtual void Terminate(Option_t *option);
103 
104  private:
105 
108 
110 
112  TH1F *fHistNEvents;
114  TH1F *fhSelectBit;
118  TH1F *fhSetIsLc;
133  TH1F *fhIsLcGen;
134  TH1F *fhIsLcReco;
135  TH1F *fhRecoPDGmom;
136  TH1F *fhNBkgNI[12];
137  TH1F *fhNLc[12];
138  TH1F *fhNLcc[12];
139  TH1F *fhNLcNonRc[12];
140  TH1F *fhNLcL1520c[12];
141  TH1F *fhNLcKstarc[12];
142  TH1F *fhNLcDeltac[12];
143  TH1F *fhNLcb[12];
144  TH1F *fhNLcNonRb[12];
145  TH1F *fhNLcL1520b[12];
146  TH1F *fhNLcKstarb[12];
147  TH1F *fhNLcDeltab[12];
161  TH2F *fhPtYLc[12];
162  TH2F *fhPtYLcc[12];
167  TH2F *fhPtYLcb[12];
186  TH1F *fhPtCorrId;
194  TNtuple *fNtupleLambdac;
204  TH1F *fHistoMCNch;
229  TH1F *fNentries;
230  //AliAODpidUtil* fUtilPid;
231  AliPIDResponse *fPIDResponse;
234 
236  ClassDef(AliAnalysisTaskSELambdacTMVA,11);
237 };
239 
240 #endif
241 
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&#39;d as piKp most prob PID
void SetKeepBkgNt(Bool_t keepBkgNt=kTRUE)
double Double_t
Definition: External.C:58
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)
Definition: External.C:236
TH2F * fhProbmassLcPtSigb
!Lc from b signal invariant mass vs pt
Float_t fCutsKF[2]
multiplicity weight histogram
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&#39;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
void FillRecoNtuple(AliAODEvent *aod, AliAODRecoDecayHF3Prong *part, TClonesArray *arrayMC)
TF1 * fFuncWeightFONLL7overLHC11b2Lc
! weight function for FONLL vs p prod. Lc
TH1F * fhPtMisIdpiKpProb
! hist for pt pKpi signal mis id&#39;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&#39;d pKpi
TH2F * fhPtEtaLc[12]
! hist. for n Lc tot., pT vs eta
Bool_t fKeepLcNotFromQuark
filling ntuple type reco
TH2F * fhPtEtaLcKstarc[12]
! hist. for n Lc from c K* + p, pT vs eta
TNtuple * fNtupleLambdacReco
! output ntuple after reconstruction
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)
Int_t fFillNtupleReco
filling ntuple type
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&#39;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
int Int_t
Definition: External.C:63
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
float Float_t
Definition: External.C:68
TH2F * fhInvMassMisIdpiKp
! hist for inv mass pKpi signal mis id&#39;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&#39;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&#39;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
const char Option_t
Definition: External.C:48
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
bool Bool_t
Definition: External.C:53
TH1F * fhPtMisIdpKpi
! hist for pt pKpi signal mis id&#39;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
TH1F * fHistoMCNch
flag for using multiplicity weights
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&#39;d pKpi most prob PID
Bool_t fLcPIDCut
flag for Lc filter bit cut
AliRDHFCutsLctopKpi * fRDCutsAnalysis
lower inv mass limit for histos