AliPhysics  vAN-20150827 (3e81cbb)
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros
AliAnalysisTaskSELambdac.h
Go to the documentation of this file.
1 #ifndef AliAnalysisTaskSELambdac_H
2 #define AliAnalysisTaskSELambdac_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 //*************************************************************************
15 //*************************************************************************
16 
17 #include <TROOT.h>
18 #include <TSystem.h>
19 #include <TNtuple.h>
20 #include <TH1F.h>
21 #include <TH2F.h>
22 #include <TArrayD.h>
23 
24 #include "AliAnalysisTaskSE.h"
25 #include "AliAnalysisVertexingHF.h"
26 #include "AliAODMCParticle.h"
27 #include "AliRDHFCutsLctopKpi.h"
28 #include "AliRDHFCuts.h"
29 #include "TClonesArray.h"
30 //#include "AliAODpidUtil.h"
31 #include "AliPIDResponse.h"
33 
34 class AliAnalysisTaskSELambdac : public AliAnalysisTaskSE
35 {
36  public:
37 
39  AliAnalysisTaskSELambdac(const char *name, Bool_t fillNtuple,AliRDHFCutsLctopKpi *lccutsana, AliRDHFCutsLctopKpi *lccutsprod);
40  virtual ~AliAnalysisTaskSELambdac();
41 
42  void SetReadMC(Bool_t readMC=kTRUE){fReadMC=readMC;}
43  void SetMCPid(){fMCPid=kTRUE;fReadMC=kTRUE;fRealPid=kFALSE;fResPid=kFALSE;return;}
44  void SetRealPid(){fRealPid=kTRUE;fMCPid=kFALSE;return;}
45  void SetResonantPid(){fResPid=kTRUE;fRealPid=kTRUE;fMCPid=kFALSE;return;}
46  void SetCutsKF(Float_t cutsKF[2]){for(Int_t i=0;i<2;i++){fCutsKF[i]=cutsKF[i];}return;}
47  void SetUseKF(Bool_t useKF=kTRUE){fUseKF=useKF;}
48  void SetAnalysis(Bool_t analysis=kTRUE){fAnalysis=analysis;}
49  void SetMassLimits(Float_t range);
50  void SetMassLimits(Float_t lowlimit, Float_t uplimit);
51  void SetPtBinLimit(Int_t n, Float_t *limitarray);
52  void SetFillVarHists(Bool_t setter) {fFillVarHists=setter;return;}
53  void SetMultiplicityHists(Bool_t setter) {fMultiplicityHists=setter;return;}
54  void SetPriorsHists(Bool_t setter) {fPriorsHists=setter;return;}
55  void SetUseFilterBitCut(Bool_t setter) { fLcCut = setter; return; }
56  void SetUseFilterBitPID(Bool_t setter) { fLcPIDCut = setter; return; }
57 
58  Float_t GetUpperMassLimit() const {return fUpmasslimit;}
59  Float_t GetLowerMassLimit() const {return fLowmasslimit;}
60  Int_t GetNBinsPt() const {return fNPtBins;}
61  Double_t GetPtBinLimit(Int_t ibin) const ;
62  Bool_t IspiKpMC(AliAODRecoDecayHF3Prong *d,TClonesArray *arrayMC) const ;
63  Bool_t IspKpiMC(AliAODRecoDecayHF3Prong *d,TClonesArray *arrayMC) const ;
64  void IspiKpResonant(AliAODRecoDecayHF3Prong *d,Double_t field,Int_t *resNumber) const ;
65  void IspKpiResonant(AliAODRecoDecayHF3Prong *d,Double_t field,Int_t *resNumber) const ;
66  Bool_t VertexingKF(AliAODRecoDecayHF3Prong *d,Int_t *pdgs,Double_t field) const ;
67  Int_t MatchToMCLambdac(AliAODRecoDecayHF3Prong *d,TClonesArray *arrayMC) const ;
68  Bool_t GetLambdacDaugh(AliAODMCParticle *part, TClonesArray *arrayMC) const ;
69 
70  void FillMassHists(AliAODEvent *aod,AliAODRecoDecayHF3Prong *part, TClonesArray *arrayMC, AliRDHFCutsLctopKpi *cuts,Int_t *nSelectedloose,Int_t *nSelectedtight);
71  void FillVarHists(AliAODRecoDecayHF3Prong *part, TClonesArray *arrMC, AliRDHFCutsLctopKpi *cuts, /*TList *listout,*/ AliAODEvent *aod);
72  Bool_t Is3ProngFromPDG(AliAODRecoDecayHF3Prong *part, TClonesArray *arrMC, Int_t pdgToBeCompared=4);
73  Bool_t IsTrackFromPDG(const AliAODTrack *daugh, TClonesArray *arrayMC, Int_t pdgToBeCompared);
74  Bool_t IsThereAGeneratedLc(TClonesArray *arrayMC);
75  Int_t NumberPrimaries(const AliAODEvent *aods);
77  virtual void UserCreateOutputObjects();
78  virtual void Init();
79  virtual void LocalInit() {Init();}
80  virtual void UserExec(Option_t *option);
81  virtual void Terminate(Option_t *option);
82 
83  private:
84 
87  Int_t GetHistoIndex(Int_t iPtBin) const { return iPtBin*6;}
88  Int_t GetSignalHistoIndex(Int_t iPtBin) const { return iPtBin*6+1;}
89  Int_t GetBackgroundHistoIndex(Int_t iPtBin) const { return iPtBin*6+2;}
90  Int_t GetLbHistoIndex(Int_t iPtBin) const { return iPtBin*6+3;}
91  Int_t GetcOnlyHistoIndex(Int_t iPtBin) const { return iPtBin*6+4;}
92  Int_t GetNoQuarkHistoIndex(Int_t iPtBin) const { return iPtBin*6+5;}
93  // Int_t GetLSHistoIndex(Int_t iPtBin)const { return iPtBin*7;}
94 
95  Bool_t ReconstructKF(AliAODRecoDecayHF3Prong *d,Int_t *pdgs,Double_t field) const;
97  AliAODEvent* aod, TClonesArray *arrMC);
99  AliAODEvent* aod, TClonesArray *arrMC,
100  Bool_t &flag1,Bool_t &flag2,Bool_t &flag3,
101  Bool_t &flag4, Bool_t &flag5, Bool_t &flag6);
102  enum {kMaxPtBins=10};
103 
104  TList *fOutput;
105  TH1F *fHistNEvents;
106  TH1F *fhChi2;
137  TH2F *fhMassLcPt;
140  TH2F *fhEta3Prong;
144  TH2F *fhRap3Prong;
148  TH1F *fhSelectBit;
165  TH2F *fhdcasLcPt;
166  TH2F *fhBdcasLcPt;
171  TH2F *fhSum2LcPt;
172  TH2F *fhBSum2LcPt;
173  TH2F *fhPtMaxLcPt;
175  TNtuple *fNtupleLambdac;
176  Float_t fUpmasslimit;
177  Float_t fLowmasslimit;
178  Float_t fCutsKF[2];
179  Int_t fNPtBins;
182  TList *fListCuts;
184  Bool_t fFillNtuple;
185  Bool_t fReadMC;
186  Bool_t fMCPid;
187  Bool_t fRealPid;
188  Bool_t fResPid;
189  Bool_t fUseKF;
190  Bool_t fAnalysis;
192  Bool_t fFillVarHists;
194  Bool_t fPriorsHists;
195  Bool_t fLcCut;
196  Bool_t fLcPIDCut;
197  TH1F *fNentries;
198  TList *fOutputMC;
199  TList *fAPriori;
200  TList *fMultiplicity;
201  //AliAODpidUtil* fUtilPid;
202  AliPIDResponse *fPIDResponse;
204 
206  ClassDef(AliAnalysisTaskSELambdac,8);
207 };
209 
210 #endif
211 
TH2F * fhPiond0ProngLcPt
!hist for var_LcPt
TH1F * fMassHistTC[6 *kMaxPtBins]
!hist. for inv mass (TC)
TH1F * fhMassPtGreater33Pr
!hist. for No. of events
void SetMultiplicityHists(Bool_t setter)
TH1F * fMassHistDk[3 *kMaxPtBins]
!hist. for inv mass (LC)
TH1F * fMassHist3Pr[3 *kMaxPtBins]
!hist. for inv mass (LC)
TH1F * fhMassPtGreater2TC
!hist. for No. of events
TH1F * fhMassPtGreater3DkTC
!hist. for No. of events
AliAnalysisVertexingHF * fVHF
apply analysis cuts
TH2F * fhEta3ProngAn
!hist. for 3-prong Eta fiducial An Cuts
Double_t GetPtBinLimit(Int_t ibin) const
TH2F * fhPtMaxLcPt
!hist for var_LcPt
TH2F * fhCosPointingAngleLcPt
!hist for var_LcPt
TH2F * fhdcasLcPt
!hist for var_LcPt
TH1F * fMassHistDkTC[3 *kMaxPtBins]
!hist. for inv mass (TC)
Double_t fArrayBinLimits[kMaxPtBins+1]
list of cuts
TH1F * fhMassPtGreater2KpTC
!hist. for No. of events
TH2F * fhBdcasLcPt
!hist for var_LcPt
TH2F * fhRap3ProngAn
!hist. for 3-prong Eta fiducial An cuts
TH1F * fMassHist[6 *kMaxPtBins]
!hist. for inv mass (LC)
Bool_t Is3ProngFromPDG(AliAODRecoDecayHF3Prong *part, TClonesArray *arrMC, Int_t pdgToBeCompared=4)
TH2F * fhDecayLengthLcPt
!hist for var_LcPt
TH1F * fhMassPtGreater3Kp
!hist. for No. of events
void SetFillVarHists(Bool_t setter)
AliPIDResponse * fPIDResponse
output3
void SetReadMC(Bool_t readMC=kTRUE)
Bool_t IsThereAGeneratedLc(TClonesArray *arrayMC)
TH2F * fhBSigmaVertLcPt
!hist for var_LcPt
TH1F * fMassHistKpTC[3 *kMaxPtBins]
!hist. for inv mass (TC)
TH1F * fhMassPtGreater23PrTC
!hist. for No. of events
TH1F * fMassHistKp[3 *kMaxPtBins]
!hist. for inv mass (LC)
Int_t GetSignalHistoIndex(Int_t iPtBin) const
TH2F * fhBCosPointingAngleLcPt
!hist for var_LcPt
TH2F * fhSum2LcPt
!hist for var_LcPt
TH2F * fhBDecayLengthLcPt
!hist for var_LcPt
Int_t fNPtBins
cuts with KF vertexer
Bool_t fFillVarHists
Vertexer heavy flavour (used to pass the cuts)
TH1F * fMassHistLpi[3 *kMaxPtBins]
!hist. for inv mass (LC)
TH1F * fhMassPtGreater2LpiTC
!hist. for No. of events
void MultiplicityStudies(AliAODRecoDecayHF3Prong *part, AliRDHFCutsLctopKpi *cuts, AliAODEvent *aod, TClonesArray *arrMC, Bool_t &flag1, Bool_t &flag2, Bool_t &flag3, Bool_t &flag4, Bool_t &flag5, Bool_t &flag6)
TNtuple * fNtupleLambdac
! output ntuple
TH2F * fhBProtond0ProngLcPt
!hist for var_LcPt
TH1F * fhMassPtGreater33PrTC
!hist. for No. of events
Bool_t VertexingKF(AliAODRecoDecayHF3Prong *d, Int_t *pdgs, Double_t field) const
TH2F * fhEta3Prong
!hist. for 3-prong Eta
TList * fListCuts
Production Cuts.
TH1F * fhMassPtGreater3TC
!hist. for No. of events
TH2F * fhBSum2LcPt
!hist for var_LcPt
virtual void Terminate(Option_t *option)
void SetCutsKF(Float_t cutsKF[2])
TH1F * fhMassPtGreater2Lpi
!hist. for No. of events
void SetPriorsHists(Bool_t setter)
TH2F * fhRap3Prong
!hist. for 3-prong y
TH1F * fNentries
flag for Lc filter bit PID
void FillAPrioriConcentrations(AliAODRecoDecayHF3Prong *part, AliRDHFCutsLctopKpi *cuts, AliAODEvent *aod, TClonesArray *arrMC)
TH1F * fhMassPtGreater2DkTC
!hist. for No. of events
Bool_t fAnalysis
flag to cut with KF vertexer
TH1F * fhMassPtGreater3Dk
!hist. for No. of events
TH2F * fhBKaonPtProngLcPt
!hist for var_LcPt
TH2F * fhMassLcPt
!hist Mass x pt
Bool_t fPriorsHists
flag for activation of multiplcity histos
Int_t MatchToMCLambdac(AliAODRecoDecayHF3Prong *d, TClonesArray *arrayMC) const
TH2F * fhBDist12PrimLcPt
!hist for var_LcPt
TH2F * fhBProtonPtProngLcPt
!hist for var_LcPt
virtual void UserExec(Option_t *option)
TH2F * fhKaonPtProngLcPt
!hist for var_LcPt
TH2F * fhEta3ProngAcc
!hist. for 3-prong Eta fiducial acc
TH2F * fhProtonPtProngLcPt
!hist for var_LcPt
Int_t GetHistoIndex(Int_t iPtBin) const
TH1F * fhMassPtGreater23Pr
!hist. for No. of events
void SetUseKF(Bool_t useKF=kTRUE)
TH1F * fhMassPtGreater3KpTC
!hist. for No. of events
Bool_t fMultiplicityHists
flag for creation and fill of histograms with vars
void SetUseFilterBitPID(Bool_t setter)
Bool_t fRealPid
flag for access to MC
Bool_t fReadMC
flag for filling ntuple
Bool_t fMCPid
flag for access to MC
Int_t GetNoQuarkHistoIndex(Int_t iPtBin) const
TList * fOutputMC
histo with number of entries
TH2F * fhEta3ProngProd
!hist. for 3-prong Eta fiducial Prod Cuts
TH1F * fMassHist3PrTC[3 *kMaxPtBins]
!hist. for inv mass (TC)
Float_t fLowmasslimit
upper inv mass limit for histos
void FillMassHists(AliAODEvent *aod, AliAODRecoDecayHF3Prong *part, TClonesArray *arrayMC, AliRDHFCutsLctopKpi *cuts, Int_t *nSelectedloose, Int_t *nSelectedtight)
void FillVarHists(AliAODRecoDecayHF3Prong *part, TClonesArray *arrMC, AliRDHFCutsLctopKpi *cuts, AliAODEvent *aod)
Bool_t GetLambdacDaugh(AliAODMCParticle *part, TClonesArray *arrayMC) const
AliAnalysisTaskSELambdac & operator=(const AliAnalysisTaskSELambdac &source)
Int_t NumberPrimaries(const AliAODEvent *aods)
TH2F * fhBPtMaxLcPt
!hist for var_LcPt
TH1F * fhMassPtGreater3Lpi
!hist. for No. of events
Bool_t fLcCut
flag for histos with priors
TH2F * fhProtond0ProngLcPt
!hist for var_LcPt
virtual void UserCreateOutputObjects()
Implementation of interface methods.
void SetPtBinLimit(Int_t n, Float_t *limitarray)
Bool_t fUseKF
flag for PID with resonant channels
TH1F * fMassHistLpiTC[3 *kMaxPtBins]
!hist. for inv mass (TC)
TH2F * fhKaond0ProngLcPt
!hist for var_LcPt
AliNormalizationCounter * fCounter
!AliNormalizationCounter on output slot 7
TH1F * fhMassPtGreater3
!hist. for No. of events
TH1F * fHistNEvents
!hist. for No. of events
Int_t GetcOnlyHistoIndex(Int_t iPtBin) const
TH1F * fhMassPtGreater3LpiTC
!hist. for No. of events
TH2F * fhPionPtProngLcPt
!hist for var_LcPt
TH2F * fhBPionPtProngLcPt
!hist for var_LcPt
TH2F * fhRap3ProngProd
!hist. for 3-prong Eta fiducial Prod cuts
TH2F * fhMassLcminusPt
!hist Mass x pt Lcminu
TH1F * fhMassPtGreater2Dk
!hist. for No. of events
void SetUseFilterBitCut(Bool_t setter)
TH2F * fhMassLcplusPt
!hist Mass x pt Lcplus
TH2F * fhSigmaVertLcPt
!hist for var_LcPt
TList * fOutput
! list send on output slot 0
Bool_t IspiKpMC(AliAODRecoDecayHF3Prong *d, TClonesArray *arrayMC) const
Bool_t fFillNtuple
limits for the Pt bins
Bool_t IsTrackFromPDG(const AliAODTrack *daugh, TClonesArray *arrayMC, Int_t pdgToBeCompared)
TH1F * fhMassPtGreater2
!hist. for No. of events
void SetAnalysis(Bool_t analysis=kTRUE)
Bool_t fResPid
flag for real PID
void IspKpiResonant(AliAODRecoDecayHF3Prong *d, Double_t field, Int_t *resNumber) const
TH2F * fhRap3ProngAcc
!hist. for 3-prong Eta fiducial acc
Bool_t ReconstructKF(AliAODRecoDecayHF3Prong *d, Int_t *pdgs, Double_t field) const
AliRDHFCutsLctopKpi * fRDCutsAnalysis
number of bins in Pt for histograms
Bool_t IspKpiMC(AliAODRecoDecayHF3Prong *d, TClonesArray *arrayMC) const
TH2F * fhBKaond0ProngLcPt
!hist for var_LcPt
Float_t fCutsKF[2]
lower inv mass limit for histos
Bool_t fLcPIDCut
flag for Lc filter bit cut
void IspiKpResonant(AliAODRecoDecayHF3Prong *d, Double_t field, Int_t *resNumber) const
TH1F * fhMassPtGreater2Kp
!hist. for No. of events
Int_t GetLbHistoIndex(Int_t iPtBin) const
TH2F * fhBPiond0ProngLcPt
!hist for var_LcPt
AliRDHFCutsLctopKpi * fRDCutsProduction
Cuts for Analysis.
Int_t GetBackgroundHistoIndex(Int_t iPtBin) const
TH1F * fhChi2
!hist. for No. of events
TH1F * fhSelectBit
! hist for Filter Bit
TH2F * fhDist12PrimLcPt
!hist for var_LcPt