]>
Commit | Line | Data |
---|---|---|
5d836c02 | 1 | #ifndef ALIANALYSISTASKSELAMBDAC_H |
2 | #define ALIANALYSISTASKSELAMBDAC_H | |
7eb0cc73 | 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" | |
60eac73d | 30 | //#include "AliAODpidUtil.h" |
31 | #include "AliPIDResponse.h" | |
c1234468 | 32 | #include "AliNormalizationCounter.h" |
7eb0cc73 | 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;} | |
029ed93a | 44 | void SetRealPid(){fRealPid=kTRUE;fMCPid=kFALSE;return;} |
45 | void SetResonantPid(){fResPid=kTRUE;fRealPid=kTRUE;fMCPid=kFALSE;return;} | |
7eb0cc73 | 46 | void SetCutsKF(Float_t cutsKF[10]){for(Int_t i=0;i<10;i++){fCutsKF[i]=cutsKF[i];}return;} |
47 | void SetUseKF(Bool_t useKF=kTRUE){fUseKF=useKF;} | |
029ed93a | 48 | void SetAnalysis(Bool_t analysis=kTRUE){fAnalysis=analysis;} |
7eb0cc73 | 49 | void SetMassLimits(Float_t range); |
50 | void SetMassLimits(Float_t lowlimit, Float_t uplimit); | |
51 | void SetPtBinLimit(Int_t n, Float_t *limitarray); | |
029ed93a | 52 | void SetFillVarHists(Bool_t setter) {fFillVarHists=setter;return;} |
60eac73d | 53 | void SetMultiplicityHists(Bool_t setter) {fMultiplicityHists=setter;return;} |
54 | void SetPriorsHists(Bool_t setter) {fPriorsHists=setter;return;} | |
7eb0cc73 | 55 | |
4c7fd068 | 56 | Float_t GetUpperMassLimit() const {return fUpmasslimit;} |
57 | Float_t GetLowerMassLimit() const {return fLowmasslimit;} | |
58 | Int_t GetNBinsPt() const {return fNPtBins;} | |
59 | Double_t GetPtBinLimit(Int_t ibin) const ; | |
60 | Bool_t IspiKpMC(AliAODRecoDecayHF3Prong *d,TClonesArray *arrayMC) const ; | |
7ad4b782 | 61 | Bool_t IspKpiMC(AliAODRecoDecayHF3Prong *d,TClonesArray *arrayMC) const ; |
c1234468 | 62 | void IspiKpResonant(AliAODRecoDecayHF3Prong *d,Double_t field,Int_t *resNumber) const ; |
63 | void IspKpiResonant(AliAODRecoDecayHF3Prong *d,Double_t field,Int_t *resNumber) const ; | |
4c7fd068 | 64 | Bool_t VertexingKF(AliAODRecoDecayHF3Prong *d,Int_t *pdgs,Double_t field) const ; |
65 | Int_t MatchToMCLambdac(AliAODRecoDecayHF3Prong *d,TClonesArray *arrayMC) const ; | |
66 | Bool_t GetLambdacDaugh(AliAODMCParticle *part, TClonesArray *arrayMC) const ; | |
7eb0cc73 | 67 | |
c1234468 | 68 | void FillMassHists(AliAODEvent *aod,AliAODRecoDecayHF3Prong *part, TClonesArray *arrayMC, AliRDHFCutsLctopKpi *cuts,Int_t *nSelectedloose,Int_t *nSelectedtight); |
60eac73d | 69 | void FillVarHists(AliAODRecoDecayHF3Prong *part, TClonesArray *arrMC, AliRDHFCutsLctopKpi *cuts, /*TList *listout,*/ AliAODEvent *aod); |
70 | Bool_t Is3ProngFromPDG(AliAODRecoDecayHF3Prong *part, TClonesArray *arrMC, Int_t pdgToBeCompared=4); | |
5d836c02 | 71 | Bool_t IsTrackFromPDG(const AliAODTrack *daugh, TClonesArray *arrayMC, Int_t pdgToBeCompared); |
60eac73d | 72 | Bool_t IsThereAGeneratedLc(TClonesArray *arrayMC); |
5d836c02 | 73 | Int_t NumberPrimaries(const AliAODEvent *aods); |
7eb0cc73 | 74 | // Implementation of interface methods |
75 | virtual void UserCreateOutputObjects(); | |
76 | virtual void Init(); | |
77 | virtual void LocalInit() {Init();} | |
78 | virtual void UserExec(Option_t *option); | |
79 | virtual void Terminate(Option_t *option); | |
80 | ||
81 | private: | |
82 | ||
83 | AliAnalysisTaskSELambdac(const AliAnalysisTaskSELambdac &source); | |
84 | AliAnalysisTaskSELambdac& operator=(const AliAnalysisTaskSELambdac& source); | |
85 | Int_t GetHistoIndex(Int_t iPtBin) const { return iPtBin*3;} | |
86 | Int_t GetSignalHistoIndex(Int_t iPtBin) const { return iPtBin*3+1;} | |
87 | Int_t GetBackgroundHistoIndex(Int_t iPtBin) const { return iPtBin*3+2;} | |
88 | Int_t GetLSHistoIndex(Int_t iPtBin)const { return iPtBin*5;} | |
7ad4b782 | 89 | |
90 | Bool_t ReconstructKF(AliAODRecoDecayHF3Prong *d,Int_t *pdgs,Double_t field) const; | |
60eac73d | 91 | void FillAPrioriConcentrations(AliAODRecoDecayHF3Prong *part, AliRDHFCutsLctopKpi *cuts, |
92 | AliAODEvent* aod, TClonesArray *arrMC); | |
93 | void MultiplicityStudies(AliAODRecoDecayHF3Prong *part, AliRDHFCutsLctopKpi *cuts, | |
94 | AliAODEvent* aod, TClonesArray *arrMC, | |
95 | Bool_t &flag1,Bool_t &flag2,Bool_t &flag3, | |
96 | Bool_t &flag4, Bool_t &flag5, Bool_t &flag6); | |
7eb0cc73 | 97 | enum {kMaxPtBins=10}; |
98 | ||
99 | TList *fOutput; //! list send on output slot 0 | |
100 | TH1F *fHistNEvents; //!hist. for No. of events | |
7ad4b782 | 101 | TH1F *fhChi2; //!hist. for No. of events |
102 | TH1F *fhMassPtGreater3; //!hist. for No. of events | |
103 | TH1F *fhMassPtGreater3TC; //!hist. for No. of events | |
029ed93a | 104 | TH1F *fhMassPtGreater3Kp; //!hist. for No. of events |
105 | TH1F *fhMassPtGreater3KpTC; //!hist. for No. of events | |
106 | TH1F *fhMassPtGreater3Lpi; //!hist. for No. of events | |
107 | TH1F *fhMassPtGreater3LpiTC; //!hist. for No. of events | |
c1234468 | 108 | TH1F *fhMassPtGreater3Dk; //!hist. for No. of events |
109 | TH1F *fhMassPtGreater3DkTC; //!hist. for No. of events | |
110 | TH1F *fhMassPtGreater33Pr; //!hist. for No. of events | |
111 | TH1F *fhMassPtGreater33PrTC; //!hist. for No. of events | |
029ed93a | 112 | TH1F *fhMassPtGreater2; //!hist. for No. of events |
113 | TH1F *fhMassPtGreater2TC; //!hist. for No. of events | |
114 | TH1F *fhMassPtGreater2Kp; //!hist. for No. of events | |
115 | TH1F *fhMassPtGreater2KpTC; //!hist. for No. of events | |
116 | TH1F *fhMassPtGreater2Lpi; //!hist. for No. of events | |
117 | TH1F *fhMassPtGreater2LpiTC; //!hist. for No. of events | |
c1234468 | 118 | TH1F *fhMassPtGreater2Dk; //!hist. for No. of events |
119 | TH1F *fhMassPtGreater2DkTC; //!hist. for No. of events | |
120 | TH1F *fhMassPtGreater23Pr; //!hist. for No. of events | |
121 | TH1F *fhMassPtGreater23PrTC; //!hist. for No. of events | |
7eb0cc73 | 122 | TH1F *fMassHist[3*kMaxPtBins]; //!hist. for inv mass (LC) |
7eb0cc73 | 123 | TH1F *fMassHistTC[3*kMaxPtBins]; //!hist. for inv mass (TC) |
029ed93a | 124 | TH1F *fMassHistLpi[3*kMaxPtBins]; //!hist. for inv mass (LC) |
125 | TH1F *fMassHistLpiTC[3*kMaxPtBins]; //!hist. for inv mass (TC) | |
126 | TH1F *fMassHistKp[3*kMaxPtBins]; //!hist. for inv mass (LC) | |
127 | TH1F *fMassHistKpTC[3*kMaxPtBins]; //!hist. for inv mass (TC) | |
c1234468 | 128 | TH1F *fMassHistDk[3*kMaxPtBins]; //!hist. for inv mass (LC) |
129 | TH1F *fMassHistDkTC[3*kMaxPtBins]; //!hist. for inv mass (TC) | |
130 | TH1F *fMassHist3Pr[3*kMaxPtBins]; //!hist. for inv mass (LC) | |
131 | TH1F *fMassHist3PrTC[3*kMaxPtBins]; //!hist. for inv mass (TC) | |
7eb0cc73 | 132 | TNtuple *fNtupleLambdac; //! output ntuple |
133 | Float_t fUpmasslimit; //upper inv mass limit for histos | |
134 | Float_t fLowmasslimit; //lower inv mass limit for histos | |
c1234468 | 135 | Float_t fCutsKF[2]; //cuts with KF vertexer |
7eb0cc73 | 136 | Int_t fNPtBins; //number of bins in Pt for histograms |
137 | AliRDHFCutsLctopKpi *fRDCutsAnalysis; //Cuts for Analysis | |
138 | AliRDHFCutsLctopKpi *fRDCutsProduction; //Production Cuts | |
139 | TList *fListCuts; //list of cuts | |
140 | Double_t fArrayBinLimits[kMaxPtBins+1]; //limits for the Pt bins | |
141 | Bool_t fFillNtuple; // flag for filling ntuple | |
142 | Bool_t fReadMC; //flag for access to MC | |
143 | Bool_t fMCPid; //flag for access to MC | |
7ad4b782 | 144 | Bool_t fRealPid; //flag for real PID |
145 | Bool_t fResPid; //flag for PID with resonant channels | |
146 | Bool_t fUseKF; //flag to cut with KF vertexer | |
029ed93a | 147 | Bool_t fAnalysis; //apply analysis cuts |
7eb0cc73 | 148 | AliAnalysisVertexingHF *fVHF; // Vertexer heavy flavour (used to pass the cuts) |
5d836c02 | 149 | Bool_t fFillVarHists; // flag for creation and fill of histograms with vars |
150 | Bool_t fMultiplicityHists; // flag for activation of multiplcity histos | |
151 | Bool_t fPriorsHists; // flag for histos with priors | |
152 | TH1F *fNentries; // histo with number of entries | |
153 | TList *fOutputMC; // output1 | |
154 | TList *fAPriori; // output2 | |
155 | TList *fMultiplicity; // output3 | |
60eac73d | 156 | //AliAODpidUtil* fUtilPid; |
157 | AliPIDResponse *fPIDResponse; //! PID response object | |
c1234468 | 158 | AliNormalizationCounter *fCounter;//!AliNormalizationCounter on output slot 7 |
60eac73d | 159 | |
c1234468 | 160 | ClassDef(AliAnalysisTaskSELambdac,6); // AliAnalysisTaskSE for the invariant mass analysis of heavy-flavour decay candidates (Lambdac) |
7eb0cc73 | 161 | }; |
162 | ||
163 | #endif | |
164 |