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