]>
Commit | Line | Data |
---|---|---|
0a28d543 | 1 | #ifndef ALIEBYEPIDRATIOHELPER_H |
2 | #define ALIEBYEPIDRATIOHELPER_H | |
3 | ||
4 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
5 | * See cxx source for full Copyright notice */ | |
6 | //=========================================================================// | |
7 | // AliEbyE Analysis for Particle Ratio Fluctuation // | |
8 | // Deepika Rathee | Satyajit Jena // | |
9 | // drathee@cern.ch | sjena@cern.ch // | |
10 | // Date: Wed Jul 9 18:38:30 CEST 2014 // | |
11 | // New approch to find particle ratio to reduce memory // | |
12 | // (Test Only) // | |
13 | //=========================================================================// | |
14 | ||
15 | #include "THnBase.h" | |
16 | #include "THn.h" | |
17 | #include "TH1F.h" | |
18 | #include "TF1.h" | |
19 | #include "TProfile2D.h" | |
20 | #include "TRandom3.h" | |
21 | ||
22 | class AliESDtrack; | |
23 | class AliMCEvent; | |
24 | class AliStack; | |
25 | class AliPIDResponse; | |
26 | class AliESDtrackCuts; | |
27 | class AliInputEventHandler; | |
28 | class AliESDInputHandler; | |
29 | class AliAODInputHandler; | |
30 | class AliAODEvent; | |
31 | class AliAODTrack; | |
32 | class AliAODMCParticle; | |
33 | class AliMCParticle; | |
34 | ||
35 | class AliEbyEPidRatioHelper : public TNamed { | |
36 | ||
37 | public: | |
38 | ||
39 | AliEbyEPidRatioHelper(); | |
40 | virtual ~AliEbyEPidRatioHelper(); | |
41 | ||
42 | void SetCentralityBinMax(Int_t d) {fCentralityBinMax = d;} | |
43 | void SetVertexZMax(Float_t f) {fVertexZMax = f;} | |
44 | void SetRapidityMax(Float_t f) {fRapidityMax = f;} | |
45 | void SetMinTrackLengthMC(Float_t f) {fMinTrackLengthMC = f;} | |
46 | void SetNSigmaMaxCdd(Float_t f) {fNSigmaMaxCdd = f;} | |
47 | void SetNSigmaMaxCzz(Float_t f) {fNSigmaMaxCzz = f;} | |
48 | void SetPIDStrategy(Int_t i) {fPIDStrategy = i;} | |
49 | void SetNSigmaMaxITS(Float_t f) {fNSigmaMaxITS = f;} | |
50 | void SetNSigmaMaxTPC(Float_t f) {fNSigmaMaxTPC = f;} | |
51 | void SetNSigmaMaxTPClow(Float_t f) {fNSigmaMaxTPClow = f;} | |
52 | void SetNSigmaMaxTOF(Float_t f) {fNSigmaMaxTOF = f;} | |
53 | void SetMinPtForTOFRequired(Float_t f) {fMinPtForTOFRequired = f;} | |
54 | void SetMaxPtForTPClow(Float_t f) {fMaxPtForTPClow = f;} | |
0a28d543 | 55 | |
15bb9247 | 56 | |
1648d22e | 57 | TH1F* GetHEventStat0() {return fHEventStat0; } |
58 | TH1F* GetHEventStat1() {return fHEventStat1; } | |
59 | TH1F* GetHTriggerStat() {return fHTriggerStat; } | |
60 | TH1F* GetHCentralityStat() {return fHCentralityStat; } | |
15bb9247 | 61 | TH1F* GetHCentralityPercentile() {return fHCentralityPer; } |
62 | TH1F* GetHCentralityPercentileAll() {return fHCentralityPerAll; } | |
1648d22e | 63 | Int_t GetCentralityBin() {return fCentralityBin; } |
64 | Float_t GetMaxPtForTPClow() {return fMaxPtForTPClow; } | |
65 | Float_t GetRapidityMax() {return fRapidityMax; } | |
66 | Float_t GetPhiMin() {return fPhiMin; } | |
67 | Float_t GetPhiMax() {return fPhiMax; } | |
68 | AliESDtrackCuts* GetESDTrackCuts() {return fESDTrackCuts; } | |
69 | Bool_t GetIsMC() {return fIsMC; } | |
70 | Bool_t GetIsRatio() {return fIsRatio; } | |
71 | Bool_t GetIsPtBin() {return fIsPtBin; } | |
72 | Int_t GetAODtrackCutBit() {return fAODtrackCutBit; } | |
73 | AliMCEvent* GetMCEvent() {return fMCEvent; } | |
74 | AliInputEventHandler* GetInputEventHandler() {return fInputEventHandler;} | |
75 | void SetPhiRange(Float_t f1, Float_t f2); | |
0a28d543 | 76 | Float_t GetCentralityPercentile() {return fCentralityPercentile;} |
0a28d543 | 77 | Float_t GetMinPtForTOFRequired() {return fMinPtForTOFRequired;} |
0a28d543 | 78 | /** Initialize Helper */ |
1648d22e | 79 | Int_t Initialize(AliESDtrackCuts *cuts, Bool_t isMC, Bool_t isRatio, Bool_t isPtBin, Int_t trackCutBit, Int_t modeDistCreation); |
0a28d543 | 80 | |
81 | /** Setup Event */ | |
82 | Int_t SetupEvent(AliESDInputHandler *esdHandler, AliAODInputHandler *aodHandler, AliMCEvent *mcEvent); | |
83 | ||
84 | /** Check if event is triggred */ | |
85 | Bool_t IsEventTriggered(); | |
86 | ||
87 | /** Fill event cut statistics */ | |
88 | Bool_t IsEventRejected(); | |
89 | ||
90 | /** Check if charged MC particle is accepted for basic parameters */ | |
91 | Bool_t IsParticleAcceptedBasicCharged(AliVParticle *particle, Int_t idxMC); | |
92 | ||
93 | /** Check if neutral MC particle is accepted for basic parameters */ | |
94 | Bool_t IsParticleAcceptedBasicNeutral(AliVParticle *particle, Int_t idxMC); | |
95 | ||
96 | /** Check if MC particle is accepted for Rapidity */ | |
97 | Bool_t IsParticleAcceptedRapidity(AliVParticle *particle, Double_t &yP, Int_t gCurPid); | |
98 | ||
99 | /** Check if MC particle is accepted for Phi */ | |
100 | Bool_t IsParticleAcceptedPhi(AliVParticle *particle); | |
101 | ||
102 | /** Check if MC particle is findable tracks */ | |
103 | Bool_t IsParticleFindable(Int_t label); | |
104 | ||
105 | /** Check if track is accepted for basic parameters */ | |
106 | Bool_t IsTrackAcceptedBasicCharged(AliVTrack *track); | |
107 | ||
108 | /** Check if track is accepted for Rapidity */ | |
109 | Bool_t IsTrackAcceptedRapidity(AliVTrack *track, Double_t &yP, Int_t gCurPid); | |
110 | ||
111 | /** Check if track is accepted for DCA */ | |
112 | Bool_t IsTrackAcceptedDCA(AliVTrack *track); | |
113 | ||
114 | /** Check if track is accepted for PID */ | |
115 | Bool_t IsTrackAcceptedPID(AliVTrack *track, Double_t *pid, AliPID::EParticleType gCurPid); | |
116 | ||
117 | /** Check if trackis accepted for Phi */ | |
118 | Bool_t IsTrackAcceptedPhi(AliVTrack *track); | |
f7ea34d2 | 119 | |
120 | ||
0a28d543 | 121 | /** Method for the correct logarithmic binning of histograms |
122 | * and Update MinPtForTOFRequired, using the pT log-scale | |
123 | */ | |
124 | void BinLogAxis(const THnBase *h, Int_t axisNumber, AliESDtrackCuts* cuts = NULL); | |
125 | ||
15bb9247 | 126 | // void SetIsRatio(Bool_t b) {fIsRatio = b;} |
127 | // void SetIsPtBin(Bool_t b) {fIsPtBin = b;} | |
128 | ||
0a28d543 | 129 | static const Float_t fgkfHistBinWitdthRap; // Histogram std bin width for rapidity/eta |
130 | static const Float_t fgkfHistBinWitdthPt; // Histogram std bin width for pt | |
131 | ||
132 | static const Float_t fgkfHistRangeCent[]; // Histogram range for centrality | |
133 | static const Int_t fgkfHistNBinsCent; // Histogram N bins for centrality | |
134 | static const Float_t fgkfHistRangeEta[]; // Histogram range for eta | |
135 | static const Int_t fgkfHistNBinsEta; // Histogram N bins for eta | |
136 | static const Float_t fgkfHistRangeRap[]; // Histogram range for rapidity | |
137 | static const Int_t fgkfHistNBinsRap; // Histogram N bins for rapidity | |
138 | static const Float_t fgkfHistRangePhi[]; // Histogram range for phi | |
139 | static const Int_t fgkfHistNBinsPhi; // Histogram N bins for phi | |
140 | static const Float_t fgkfHistRangePt[]; // Histogram range for pt | |
141 | static const Int_t fgkfHistNBinsPt; // Histogram N bins for pt | |
142 | static const Float_t fgkfHistRangeSign[]; // Histogram range for sign | |
143 | static const Int_t fgkfHistNBinsSign; // Histogram N bins for sign | |
144 | ||
145 | static const Char_t* fgkEventNames[]; // Event names | |
146 | static const Char_t* fgkCentralityMaxNames[]; // Centrality names | |
147 | static const Char_t* fgkTriggerNames[]; // Trigger names | |
148 | static const Char_t* fgkCentralityNames[]; // Centrality names | |
149 | static const Char_t* fgkPidName[4]; | |
150 | static const Char_t* fgkPidLatex[4][2]; | |
151 | static const Char_t* fgkPidTitles[4][2]; | |
152 | ||
153 | private: | |
154 | ||
155 | AliEbyEPidRatioHelper(const AliEbyEPidRatioHelper&); // not implemented | |
156 | AliEbyEPidRatioHelper& operator=(const AliEbyEPidRatioHelper&); // not implemented | |
157 | ||
158 | void InitializeEventStats(); | |
159 | void InitializeTriggerStats(); | |
160 | void InitializeCentralityStats(); | |
161 | Bool_t FillEventStats(Int_t *aEventCuts); | |
162 | ||
163 | Int_t fModeDistCreation; // Dist creation mode : 1 = on | 0 = off | |
164 | AliInputEventHandler *fInputEventHandler; //! Ptr to input event handler (ESD or AOD) | |
165 | AliPIDResponse *fPIDResponse; //! Ptr to PID response Object | |
166 | AliESDEvent *fESD; //! Ptr to ESD event | |
167 | AliESDtrackCuts *fESDTrackCuts; //! Ptr to ESD cuts | |
168 | AliAODEvent *fAOD; //! Ptr to AOD event | |
169 | Int_t fAODtrackCutBit; // Track filter bit for AOD tracks | |
170 | Bool_t fIsMC; // Is MC event | |
171 | AliMCEvent *fMCEvent; //! Ptr to MC event | |
172 | AliStack *fStack; //! Ptr to stack | |
173 | Int_t fCentralityBin; // Centrality bin of current event within max centrality bin | |
174 | Float_t fCentralityPercentile; // Centrality percentile of current event | |
175 | Int_t fCentralityBinMax; // Max centrality bin to be used | |
176 | Float_t fVertexZMax; // VertexZ cut | |
177 | Float_t fRapidityMax; // Rapidity cut | |
178 | Float_t fPhiMin; // Phi min cut | |
179 | Float_t fPhiMax; // Phi max cut | |
180 | Float_t fMinTrackLengthMC; // Min track length for MC tracks | |
181 | Float_t fNSigmaMaxCdd; // N Sigma for dcar / sqrt(cdd) - turn off with 0. | |
182 | Float_t fNSigmaMaxCzz; // N Sigma for dcaz / sqrt(czz) - turn off with 0. | |
183 | ||
184 | Int_t fPIDStrategy; // PID Strategy to be used | |
185 | Float_t fNSigmaMaxITS; // N Sigma for ITS PID | |
186 | Float_t fNSigmaMaxTPC; // N Sigma for TPC PID | |
187 | Float_t fNSigmaMaxTPClow; // N Sigma for TPC PID lower part | |
188 | Float_t fNSigmaMaxTOF; // N Sigma for TOF PID | |
189 | Float_t fMinPtForTOFRequired; // Min pt from where TOF is required | |
190 | Float_t fMaxPtForTPClow; // Max pt until TPClow is used | |
191 | TH1F *fHEventStat0; // Event cut statistics | |
192 | TH1F *fHEventStat1; // Event cut statistics - incremental | |
193 | Int_t fHEventStatMax; // Max N cuts to be included in HEventStat | |
194 | TH1F *fHTriggerStat; // Trigger statistics | |
195 | Int_t fNTriggers; // N triggers used | |
196 | TH1F *fHCentralityStat; // Centrality statistics | |
15bb9247 | 197 | TH1F *fHCentralityPer; // Centrality Percentile |
198 | TH1F *fHCentralityPerAll; // Centrality Percentile | |
0a28d543 | 199 | Int_t fNCentralityBins; // N centrality bins used |
200 | TRandom3 *fRandom; // Random generator | |
1648d22e | 201 | Bool_t fIsRatio; // Is ratio |
202 | Bool_t fIsPtBin; // Is Pt Bin | |
f7ea34d2 | 203 | |
0a28d543 | 204 | |
205 | ClassDef(AliEbyEPidRatioHelper, 1); | |
206 | }; | |
207 | ||
208 | #endif |