]>
Commit | Line | Data |
---|---|---|
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 | //************************************************************************* | |
10 | // Class AliAnalysisTaskSELambdac | |
11 | // AliAnalysisTaskSE for the Lambdac candidates Invariant Mass Histogram and | |
12 | //comparison of heavy-flavour decay candidates | |
13 | // to MC truth (kinematics stored in the AOD) | |
14 | // r.romita@gsi.de | |
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" | |
32 | #include "AliNormalizationCounter.h" | |
33 | ||
34 | class AliAnalysisTaskSELambdac : public AliAnalysisTaskSE | |
35 | { | |
36 | public: | |
37 | ||
38 | AliAnalysisTaskSELambdac(); | |
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); | |
76 | // Implementation of interface methods | |
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 | ||
85 | AliAnalysisTaskSELambdac(const AliAnalysisTaskSELambdac &source); | |
86 | AliAnalysisTaskSELambdac& operator=(const AliAnalysisTaskSELambdac& source); | |
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; | |
96 | void FillAPrioriConcentrations(AliAODRecoDecayHF3Prong *part, AliRDHFCutsLctopKpi *cuts, | |
97 | AliAODEvent* aod, TClonesArray *arrMC); | |
98 | void MultiplicityStudies(AliAODRecoDecayHF3Prong *part, AliRDHFCutsLctopKpi *cuts, | |
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; //! list send on output slot 0 | |
105 | TH1F *fHistNEvents; //!hist. for No. of events | |
106 | TH1F *fhChi2; //!hist. for No. of events | |
107 | TH1F *fhMassPtGreater3; //!hist. for No. of events | |
108 | TH1F *fhMassPtGreater3TC; //!hist. for No. of events | |
109 | TH1F *fhMassPtGreater3Kp; //!hist. for No. of events | |
110 | TH1F *fhMassPtGreater3KpTC; //!hist. for No. of events | |
111 | TH1F *fhMassPtGreater3Lpi; //!hist. for No. of events | |
112 | TH1F *fhMassPtGreater3LpiTC; //!hist. for No. of events | |
113 | TH1F *fhMassPtGreater3Dk; //!hist. for No. of events | |
114 | TH1F *fhMassPtGreater3DkTC; //!hist. for No. of events | |
115 | TH1F *fhMassPtGreater33Pr; //!hist. for No. of events | |
116 | TH1F *fhMassPtGreater33PrTC; //!hist. for No. of events | |
117 | TH1F *fhMassPtGreater2; //!hist. for No. of events | |
118 | TH1F *fhMassPtGreater2TC; //!hist. for No. of events | |
119 | TH1F *fhMassPtGreater2Kp; //!hist. for No. of events | |
120 | TH1F *fhMassPtGreater2KpTC; //!hist. for No. of events | |
121 | TH1F *fhMassPtGreater2Lpi; //!hist. for No. of events | |
122 | TH1F *fhMassPtGreater2LpiTC; //!hist. for No. of events | |
123 | TH1F *fhMassPtGreater2Dk; //!hist. for No. of events | |
124 | TH1F *fhMassPtGreater2DkTC; //!hist. for No. of events | |
125 | TH1F *fhMassPtGreater23Pr; //!hist. for No. of events | |
126 | TH1F *fhMassPtGreater23PrTC; //!hist. for No. of events | |
127 | TH1F *fMassHist[6*kMaxPtBins]; //!hist. for inv mass (LC) | |
128 | TH1F *fMassHistTC[6*kMaxPtBins]; //!hist. for inv mass (TC) | |
129 | TH1F *fMassHistLpi[3*kMaxPtBins]; //!hist. for inv mass (LC) | |
130 | TH1F *fMassHistLpiTC[3*kMaxPtBins]; //!hist. for inv mass (TC) | |
131 | TH1F *fMassHistKp[3*kMaxPtBins]; //!hist. for inv mass (LC) | |
132 | TH1F *fMassHistKpTC[3*kMaxPtBins]; //!hist. for inv mass (TC) | |
133 | TH1F *fMassHistDk[3*kMaxPtBins]; //!hist. for inv mass (LC) | |
134 | TH1F *fMassHistDkTC[3*kMaxPtBins]; //!hist. for inv mass (TC) | |
135 | TH1F *fMassHist3Pr[3*kMaxPtBins]; //!hist. for inv mass (LC) | |
136 | TH1F *fMassHist3PrTC[3*kMaxPtBins]; //!hist. for inv mass (TC) | |
137 | TH2F *fhEta3Prong; //!hist. for 3-prong Eta | |
138 | TH2F *fhEta3ProngAcc; //!hist. for 3-prong Eta fiducial acc | |
139 | TH2F *fhEta3ProngProd; //!hist. for 3-prong Eta fiducial Prod Cuts | |
140 | TH2F *fhEta3ProngAn; //!hist. for 3-prong Eta fiducial An Cuts | |
141 | TH2F *fhRap3Prong; //!hist. for 3-prong y | |
142 | TH2F *fhRap3ProngAcc; //!hist. for 3-prong Eta fiducial acc | |
143 | TH2F *fhRap3ProngProd; //!hist. for 3-prong Eta fiducial Prod cuts | |
144 | TH2F *fhRap3ProngAn; //!hist. for 3-prong Eta fiducial An cuts | |
145 | TH1F *fhSelectBit; //! hist for Filter Bit | |
146 | TH2F *fhProtonPtProngLcPt; //!hist for var_LcPt | |
147 | TH2F *fhBProtonPtProngLcPt;//!hist for var_LcPt | |
148 | TH2F *fhProtond0ProngLcPt;//!hist for var_LcPt | |
149 | TH2F *fhBProtond0ProngLcPt;//!hist for var_LcPt | |
150 | TH2F *fhKaonPtProngLcPt;//!hist for var_LcPt | |
151 | TH2F *fhBKaonPtProngLcPt;//!hist for var_LcPt | |
152 | TH2F *fhKaond0ProngLcPt;//!hist for var_LcPt | |
153 | TH2F *fhBKaond0ProngLcPt;//!hist for var_LcPt | |
154 | TH2F *fhPionPtProngLcPt;//!hist for var_LcPt | |
155 | TH2F *fhBPionPtProngLcPt;//!hist for var_LcPt | |
156 | TH2F *fhPiond0ProngLcPt;//!hist for var_LcPt | |
157 | TH2F *fhBPiond0ProngLcPt;//!hist for var_LcPt | |
158 | TH2F *fhDist12PrimLcPt;//!hist for var_LcPt | |
159 | TH2F *fhBDist12PrimLcPt;//!hist for var_LcPt | |
160 | TH2F *fhSigmaVertLcPt;//!hist for var_LcPt | |
161 | TH2F *fhBSigmaVertLcPt;//!hist for var_LcPt | |
162 | TH2F *fhdcasLcPt;//!hist for var_LcPt | |
163 | TH2F *fhBdcasLcPt;//!hist for var_LcPt | |
164 | TH2F *fhCosPointingAngleLcPt;//!hist for var_LcPt | |
165 | TH2F *fhBCosPointingAngleLcPt;//!hist for var_LcPt | |
166 | TH2F *fhDecayLengthLcPt;//!hist for var_LcPt | |
167 | TH2F *fhBDecayLengthLcPt;//!hist for var_LcPt | |
168 | TH2F *fhSum2LcPt;//!hist for var_LcPt | |
169 | TH2F *fhBSum2LcPt;//!hist for var_LcPt | |
170 | TH2F *fhPtMaxLcPt;//!hist for var_LcPt | |
171 | TH2F *fhBPtMaxLcPt;//!hist for var_LcPt | |
172 | TNtuple *fNtupleLambdac; //! output ntuple | |
173 | Float_t fUpmasslimit; //upper inv mass limit for histos | |
174 | Float_t fLowmasslimit; //lower inv mass limit for histos | |
175 | Float_t fCutsKF[2]; //cuts with KF vertexer | |
176 | Int_t fNPtBins; //number of bins in Pt for histograms | |
177 | AliRDHFCutsLctopKpi *fRDCutsAnalysis; //Cuts for Analysis | |
178 | AliRDHFCutsLctopKpi *fRDCutsProduction; //Production Cuts | |
179 | TList *fListCuts; //list of cuts | |
180 | Double_t fArrayBinLimits[kMaxPtBins+1]; //limits for the Pt bins | |
181 | Bool_t fFillNtuple; // flag for filling ntuple | |
182 | Bool_t fReadMC; //flag for access to MC | |
183 | Bool_t fMCPid; //flag for access to MC | |
184 | Bool_t fRealPid; //flag for real PID | |
185 | Bool_t fResPid; //flag for PID with resonant channels | |
186 | Bool_t fUseKF; //flag to cut with KF vertexer | |
187 | Bool_t fAnalysis; //apply analysis cuts | |
188 | AliAnalysisVertexingHF *fVHF; // Vertexer heavy flavour (used to pass the cuts) | |
189 | Bool_t fFillVarHists; // flag for creation and fill of histograms with vars | |
190 | Bool_t fMultiplicityHists; // flag for activation of multiplcity histos | |
191 | Bool_t fPriorsHists; // flag for histos with priors | |
192 | Bool_t fLcCut; // flag for Lc filter bit cut | |
193 | Bool_t fLcPIDCut; // flag for Lc filter bit PID | |
194 | TH1F *fNentries; // histo with number of entries | |
195 | TList *fOutputMC; // output1 | |
196 | TList *fAPriori; // output2 | |
197 | TList *fMultiplicity; // output3 | |
198 | //AliAODpidUtil* fUtilPid; | |
199 | AliPIDResponse *fPIDResponse; //! PID response object | |
200 | AliNormalizationCounter *fCounter;//!AliNormalizationCounter on output slot 7 | |
201 | ||
202 | ClassDef(AliAnalysisTaskSELambdac,7); // AliAnalysisTaskSE for the invariant mass analysis of heavy-flavour decay candidates (Lambdac) | |
203 | }; | |
204 | ||
205 | #endif | |
206 |