]>
Commit | Line | Data |
---|---|---|
1 | #ifndef ALIANALYSISTASKSEDPLUSCORRELATIONS_H | |
2 | #define ALIANALYSISTASKSEDPLUSCORRELATIONS_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 AliAnalysisTaskSEDplusCorrelations | |
11 | ||
12 | // Authors: | |
13 | // Sadhana Dash (correlation) | |
14 | //************************************************************************* | |
15 | ||
16 | #include <TROOT.h> | |
17 | #include <TSystem.h> | |
18 | #include <TNtuple.h> | |
19 | #include <TH1F.h> | |
20 | #include <TH2F.h> | |
21 | #include <TH3D.h> | |
22 | #include <THnSparse.h> | |
23 | #include <TArrayD.h> | |
24 | ||
25 | #include "AliRDHFCutsDplustoKpipi.h" | |
26 | #include "AliHFAssociatedTrackCuts.h" | |
27 | #include "AliAnalysisTaskSE.h" | |
28 | #include "AliAnalysisVertexingHF.h" | |
29 | #include "AliEventPoolManager.h" | |
30 | #include "AliNormalizationCounter.h" | |
31 | #include "AliAODMCHeader.h" | |
32 | #include "AliAODMCParticle.h" | |
33 | #include "AliHFCorrelator.h" | |
34 | ||
35 | class TParticle ; | |
36 | class TClonesArray ; | |
37 | class AliAODMCParticle; | |
38 | class AliAODEvent; | |
39 | class AliVParticle; | |
40 | class TObjArray; | |
41 | class AliEventPoolManager; | |
42 | class AliESDEvent; | |
43 | ||
44 | ||
45 | ||
46 | class AliAnalysisTaskSEDplusCorrelations : public AliAnalysisTaskSE | |
47 | { | |
48 | public: | |
49 | ||
50 | AliAnalysisTaskSEDplusCorrelations(); | |
51 | AliAnalysisTaskSEDplusCorrelations(const char *name, AliRDHFCutsDplustoKpipi* analysiscuts, AliHFAssociatedTrackCuts* assotrcuts); | |
52 | virtual ~AliAnalysisTaskSEDplusCorrelations(); | |
53 | ||
54 | void SetReadMC(Bool_t readMC=kTRUE){fReadMC=readMC;} | |
55 | void SetEventMix(Bool_t mixing){fMixing=mixing;} | |
56 | ||
57 | void CreateCorrelationObjs(); | |
58 | ||
59 | // standard way used in Dplus task | |
60 | void SetMassLimits(Float_t range); | |
61 | void SetMassLimits(Float_t lowlimit, Float_t uplimit); | |
62 | void SetBinWidth(Float_t w); | |
63 | ||
64 | void SetUseBit(Bool_t dols=kTRUE){fUseBit=dols;} | |
65 | ||
66 | void SetCorrelator(Int_t l) {fSelect = l;} // select 1 for hadrons, 2 for Kaons, 3 for Kzeros | |
67 | void SetUseDisplacement(Int_t m) {fDisplacement=m;} // select 0 for no displ, 1 for abs displ, 2 for d0/sigma_d0 | |
68 | void SetSystem(Bool_t system){fSystem=system;} // select between pp (kFALSE) or PbPb (kTRUE) | |
69 | ||
70 | void SetUseReconstruction(Bool_t reco){fReco = reco;} | |
71 | ||
72 | void SetTrigEfficiency(Bool_t trigeff = kTRUE) {fTrig = trigeff;} | |
73 | ||
74 | void FillCorrelations(Double_t ptTrack,Double_t mass, Double_t deltaPhi, Double_t deltaEta, Int_t ind, Int_t sel, Double_t eweight) const; | |
75 | ||
76 | void FillMCTruthCorrelations(Double_t ptTrack, Double_t deltaPhi, Double_t deltaEta, Int_t ind, Int_t mcSource, Int_t origDplus, Int_t sel) const; | |
77 | ||
78 | void FillMCRCorrelations(Double_t ptTrack,Double_t mass, Double_t deltaPhi, Double_t deltaEta, Int_t ind, Int_t mcSource, Int_t origDplus,Double_t eweight) const; | |
79 | Bool_t IsDDaughter(AliAODMCParticle* d, AliAODMCParticle* track, TClonesArray* mcArray) const; | |
80 | ||
81 | Int_t CheckTrackOrigin(TClonesArray* arrayMC, AliAODMCParticle* mcPartCandidate) const ; | |
82 | ||
83 | Int_t CheckOrigin(TClonesArray* arrayMC, AliAODMCParticle* mcPartCandidate) const ; | |
84 | ||
85 | ||
86 | ||
87 | ||
88 | ||
89 | ||
90 | Float_t GetUpperMassLimit(){return fUpmasslimit;} | |
91 | Float_t GetLowerMassLimit(){return fLowmasslimit;} | |
92 | Int_t GetNBinsPt(){return fNPtBins;} | |
93 | Float_t GetBinWidth(){return fBinWidth;} | |
94 | Int_t GetNBinsHistos(); | |
95 | ||
96 | // Implementation of interface methods | |
97 | ||
98 | virtual void UserCreateOutputObjects(); | |
99 | virtual void Init(); | |
100 | virtual void LocalInit() {Init();} | |
101 | virtual void UserExec(Option_t *option); | |
102 | virtual void Terminate(Option_t *option); | |
103 | ||
104 | ||
105 | private: | |
106 | AliAnalysisTaskSEDplusCorrelations(const AliAnalysisTaskSEDplusCorrelations &source); | |
107 | AliAnalysisTaskSEDplusCorrelations& operator=(const AliAnalysisTaskSEDplusCorrelations& source); | |
108 | ||
109 | ||
110 | ||
111 | Int_t GetHistoIndex(Int_t iPtBin) const { return iPtBin*3;} | |
112 | ||
113 | Int_t GetSignalHistoIndex(Int_t iPtBin) const { return iPtBin*3+1;} | |
114 | ||
115 | ||
116 | enum {kMaxPtBins=20}; | |
117 | ||
118 | //For dplus efficiency | |
119 | ||
120 | ||
121 | TList *fOutput; //! list send on output slot 0 | |
122 | ||
123 | AliHFCorrelator* fCorrelator; // object for correlations | |
124 | ||
125 | Int_t fSelect; // select what to correlate with a Dplus 1-chargedtracks,2-chargedkaons,3-k0s | |
126 | Int_t fDisplacement; // set 0 for no displacement cut, 1 for absolute d0, 2 for d0/sigma_d0 | |
127 | TH1F *fHistNEvents; //!hist. for No. of events | |
128 | ||
129 | Bool_t fTrig; // flag for using trig eff | |
130 | ||
131 | TH2D *fEventMix; //!hist. for event mixing | |
132 | ||
133 | TH1F *fMassHistK0S[3*kMaxPtBins]; //!hist. for inv mass (LC) | |
134 | ||
135 | TH1F *fLeadPt[3*kMaxPtBins]; //!hist. for D- inv mass (TC) | |
136 | ||
137 | TH1F *fPtSig[3*kMaxPtBins]; //!hist. for D- inv mass (TC) | |
138 | ||
139 | TH1F *fMassHist[3*kMaxPtBins]; //!hist. for inv mass (LC) | |
140 | TH1F *fMassHistTC[3*kMaxPtBins]; //!hist. for inv mass (TC) | |
141 | TH1F *fMassHistOrigC[3*kMaxPtBins]; //!hist. for inv mass (TC) | |
142 | TH1F *fMassHistOrigB[3*kMaxPtBins]; //!hist. for inv mass (TC) | |
143 | TH1F *fMassHistMC[3*kMaxPtBins]; //!hist. for inv mass (TC) | |
144 | ||
145 | ||
146 | ||
147 | Float_t fUpmasslimit; //upper inv mass limit for histos | |
148 | Float_t fLowmasslimit; //lower inv mass limit for histos | |
149 | ||
150 | Int_t fNPtBins; //Number of Pt Bins | |
151 | ||
152 | Float_t fBinWidth;//width of one bin in output histos | |
153 | ||
154 | TList *fListCuts; //list of cuts | |
155 | ||
156 | //TList *fListCutsAsso; //list of cuts | |
157 | ||
158 | AliRDHFCutsDplustoKpipi *fRDCutsAnalysis; //Cuts for Analysis | |
159 | ||
160 | AliHFAssociatedTrackCuts *fCuts; | |
161 | ||
162 | AliNormalizationCounter *fCounter;//!Counter for normalization | |
163 | ||
164 | Double_t fArrayBinLimits[kMaxPtBins+1]; //limits for the Pt bins | |
165 | ||
166 | Bool_t fReadMC; //flag for access to MC | |
167 | // Bool_t fUseStrangeness;//flag to enhance strangeness in MC to fit to data | |
168 | Bool_t fUseBit; // flag to use bitmask | |
169 | Bool_t fMixing; // flag to use bitmask | |
170 | ||
171 | Bool_t fSystem; // | |
172 | Bool_t fReco; // use reconstruction or MC truth | |
173 | ClassDef(AliAnalysisTaskSEDplusCorrelations,3); // AliAnalysisTaskSE for the MC association of heavy-flavour decay candidates | |
174 | }; | |
175 | ||
176 | #endif |