]>
Commit | Line | Data |
---|---|---|
7eb0cc73 | 1 | #ifndef ALIANALYSISTASKLAMBDAC_H |
2 | #define ALIANALYSISTASKLAMBDAC_H | |
3 | ||
4 | /* Copyright(c) 1998-2008, ALICE Experiment at CERN, All rights reserved. * | |
5 | * See cxx source for full Copyright notice */ | |
6 | ||
27de2dfb | 7 | /* $Id$ */ |
8 | ||
7eb0cc73 | 9 | //************************************************************************* |
10 | // Class AliAnalysisTaskSELambdac | |
4c7fd068 | 11 | // AliAnalysisTaskSE for the Lambdac candidates Invariant Mass Histogram and |
7eb0cc73 | 12 | //comparison of heavy-flavour decay candidates |
13 | // to MC truth (kinematics stored in the AOD) | |
4c7fd068 | 14 | // r.romita@gsi.de |
7eb0cc73 | 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" | |
029ed93a | 30 | #include "AliAODpidUtil.h" |
7eb0cc73 | 31 | |
32 | class AliAnalysisTaskSELambdac : public AliAnalysisTaskSE | |
33 | { | |
34 | public: | |
35 | ||
36 | AliAnalysisTaskSELambdac(); | |
37 | AliAnalysisTaskSELambdac(const char *name, Bool_t fillNtuple,AliRDHFCutsLctopKpi *lccutsana, AliRDHFCutsLctopKpi *lccutsprod); | |
38 | virtual ~AliAnalysisTaskSELambdac(); | |
39 | ||
40 | void SetReadMC(Bool_t readMC=kTRUE){fReadMC=readMC;} | |
41 | void SetMCPid(){fMCPid=kTRUE;fReadMC=kTRUE;fRealPid=kFALSE;fResPid=kFALSE;return;} | |
029ed93a | 42 | void SetRealPid(){fRealPid=kTRUE;fMCPid=kFALSE;return;} |
43 | void SetResonantPid(){fResPid=kTRUE;fRealPid=kTRUE;fMCPid=kFALSE;return;} | |
7eb0cc73 | 44 | void SetCutsKF(Float_t cutsKF[10]){for(Int_t i=0;i<10;i++){fCutsKF[i]=cutsKF[i];}return;} |
45 | void SetUseKF(Bool_t useKF=kTRUE){fUseKF=useKF;} | |
029ed93a | 46 | void SetAnalysis(Bool_t analysis=kTRUE){fAnalysis=analysis;} |
7eb0cc73 | 47 | void SetMassLimits(Float_t range); |
48 | void SetMassLimits(Float_t lowlimit, Float_t uplimit); | |
49 | void SetPtBinLimit(Int_t n, Float_t *limitarray); | |
029ed93a | 50 | void SetFillVarHists(Bool_t setter) {fFillVarHists=setter;return;} |
7eb0cc73 | 51 | |
4c7fd068 | 52 | Float_t GetUpperMassLimit() const {return fUpmasslimit;} |
53 | Float_t GetLowerMassLimit() const {return fLowmasslimit;} | |
54 | Int_t GetNBinsPt() const {return fNPtBins;} | |
55 | Double_t GetPtBinLimit(Int_t ibin) const ; | |
56 | Bool_t IspiKpMC(AliAODRecoDecayHF3Prong *d,TClonesArray *arrayMC) const ; | |
7ad4b782 | 57 | Bool_t IspKpiMC(AliAODRecoDecayHF3Prong *d,TClonesArray *arrayMC) const ; |
029ed93a | 58 | Int_t IspiKpResonant(AliAODRecoDecayHF3Prong *d,Double_t field) const ; |
59 | Int_t IspKpiResonant(AliAODRecoDecayHF3Prong *d,Double_t field) const ; | |
4c7fd068 | 60 | Bool_t VertexingKF(AliAODRecoDecayHF3Prong *d,Int_t *pdgs,Double_t field) const ; |
61 | Int_t MatchToMCLambdac(AliAODRecoDecayHF3Prong *d,TClonesArray *arrayMC) const ; | |
62 | Bool_t GetLambdacDaugh(AliAODMCParticle *part, TClonesArray *arrayMC) const ; | |
7eb0cc73 | 63 | |
029ed93a | 64 | void FillMassHists(AliAODEvent *aod,AliAODRecoDecayHF3Prong *part, TClonesArray *arrayMC, AliRDHFCutsLctopKpi *cuts); |
65 | void FillVarHists(AliAODRecoDecayHF3Prong *part, TClonesArray *arrMC, AliRDHFCutsLctopKpi *cuts, TList *listout,AliAODEvent *aod); | |
7eb0cc73 | 66 | // Implementation of interface methods |
67 | virtual void UserCreateOutputObjects(); | |
68 | virtual void Init(); | |
69 | virtual void LocalInit() {Init();} | |
70 | virtual void UserExec(Option_t *option); | |
71 | virtual void Terminate(Option_t *option); | |
72 | ||
73 | private: | |
74 | ||
75 | AliAnalysisTaskSELambdac(const AliAnalysisTaskSELambdac &source); | |
76 | AliAnalysisTaskSELambdac& operator=(const AliAnalysisTaskSELambdac& source); | |
77 | Int_t GetHistoIndex(Int_t iPtBin) const { return iPtBin*3;} | |
78 | Int_t GetSignalHistoIndex(Int_t iPtBin) const { return iPtBin*3+1;} | |
79 | Int_t GetBackgroundHistoIndex(Int_t iPtBin) const { return iPtBin*3+2;} | |
80 | Int_t GetLSHistoIndex(Int_t iPtBin)const { return iPtBin*5;} | |
7ad4b782 | 81 | |
82 | Bool_t ReconstructKF(AliAODRecoDecayHF3Prong *d,Int_t *pdgs,Double_t field) const; | |
7eb0cc73 | 83 | |
84 | enum {kMaxPtBins=10}; | |
85 | ||
86 | TList *fOutput; //! list send on output slot 0 | |
87 | TH1F *fHistNEvents; //!hist. for No. of events | |
7ad4b782 | 88 | TH1F *fhChi2; //!hist. for No. of events |
89 | TH1F *fhMassPtGreater3; //!hist. for No. of events | |
90 | TH1F *fhMassPtGreater3TC; //!hist. for No. of events | |
029ed93a | 91 | TH1F *fhMassPtGreater3Kp; //!hist. for No. of events |
92 | TH1F *fhMassPtGreater3KpTC; //!hist. for No. of events | |
93 | TH1F *fhMassPtGreater3Lpi; //!hist. for No. of events | |
94 | TH1F *fhMassPtGreater3LpiTC; //!hist. for No. of events | |
95 | TH1F *fhMassPtGreater2; //!hist. for No. of events | |
96 | TH1F *fhMassPtGreater2TC; //!hist. for No. of events | |
97 | TH1F *fhMassPtGreater2Kp; //!hist. for No. of events | |
98 | TH1F *fhMassPtGreater2KpTC; //!hist. for No. of events | |
99 | TH1F *fhMassPtGreater2Lpi; //!hist. for No. of events | |
100 | TH1F *fhMassPtGreater2LpiTC; //!hist. for No. of events | |
7eb0cc73 | 101 | TH1F *fMassHist[3*kMaxPtBins]; //!hist. for inv mass (LC) |
7eb0cc73 | 102 | TH1F *fMassHistTC[3*kMaxPtBins]; //!hist. for inv mass (TC) |
029ed93a | 103 | TH1F *fMassHistLpi[3*kMaxPtBins]; //!hist. for inv mass (LC) |
104 | TH1F *fMassHistLpiTC[3*kMaxPtBins]; //!hist. for inv mass (TC) | |
105 | TH1F *fMassHistKp[3*kMaxPtBins]; //!hist. for inv mass (LC) | |
106 | TH1F *fMassHistKpTC[3*kMaxPtBins]; //!hist. for inv mass (TC) | |
7eb0cc73 | 107 | TNtuple *fNtupleLambdac; //! output ntuple |
108 | Float_t fUpmasslimit; //upper inv mass limit for histos | |
109 | Float_t fLowmasslimit; //lower inv mass limit for histos | |
7ad4b782 | 110 | Float_t fCutsKF[10]; //cuts with KF vertexer |
7eb0cc73 | 111 | Int_t fNPtBins; //number of bins in Pt for histograms |
112 | AliRDHFCutsLctopKpi *fRDCutsAnalysis; //Cuts for Analysis | |
113 | AliRDHFCutsLctopKpi *fRDCutsProduction; //Production Cuts | |
114 | TList *fListCuts; //list of cuts | |
115 | Double_t fArrayBinLimits[kMaxPtBins+1]; //limits for the Pt bins | |
116 | Bool_t fFillNtuple; // flag for filling ntuple | |
117 | Bool_t fReadMC; //flag for access to MC | |
118 | Bool_t fMCPid; //flag for access to MC | |
7ad4b782 | 119 | Bool_t fRealPid; //flag for real PID |
120 | Bool_t fResPid; //flag for PID with resonant channels | |
121 | Bool_t fUseKF; //flag to cut with KF vertexer | |
029ed93a | 122 | Bool_t fAnalysis; //apply analysis cuts |
7eb0cc73 | 123 | AliAnalysisVertexingHF *fVHF; // Vertexer heavy flavour (used to pass the cuts) |
029ed93a | 124 | Bool_t fFillVarHists; |
125 | TH1F *fNentries; | |
126 | TList *fOutputMC; | |
127 | AliAODpidUtil* fUtilPid; | |
7eb0cc73 | 128 | |
029ed93a | 129 | ClassDef(AliAnalysisTaskSELambdac,4); // AliAnalysisTaskSE for the invariant mass analysis of heavy-flavour decay candidates (Lambdac) |
7eb0cc73 | 130 | }; |
131 | ||
132 | #endif | |
133 |