]>
Commit | Line | Data |
---|---|---|
7984e5f7 | 1 | // |
2 | // Base class for classes that calculate the multiplicity in the | |
3 | // forward regions event-by-event | |
4 | // | |
1a26066e | 5 | #ifndef ALIFORWARDMULTIPLICITYBASE_H |
6 | #define ALIFORWARDMULTIPLICITYBASE_H | |
ffca499d | 7 | /** |
8 | * @file AliForwardMultiplicityBase.h | |
9 | * @author Christian Holm Christensen <cholm@dalsgaard.hehi.nbi.dk> | |
10 | * @date Wed Mar 23 14:06:29 2011 | |
11 | * | |
12 | * @brief | |
13 | * | |
14 | * | |
bd6f5206 | 15 | * @ingroup pwglf_forward_aod |
ffca499d | 16 | */ |
c8b1a7db | 17 | #include "AliBaseESDTask.h" |
8449e3e0 | 18 | #include "AliForwardUtil.h" |
19 | #include "AliAODForwardMult.h" | |
20 | #include "AliAODForwardEP.h" | |
0b7de667 | 21 | // class AliFMDEnergyFitter; |
1a26066e | 22 | class AliFMDSharingFilter; |
23 | class AliFMDDensityCalculator; | |
72cc12cd | 24 | class AliFMDCorrector; |
1a26066e | 25 | class AliFMDHistCollector; |
2b556440 | 26 | class AliFMDEventPlaneFinder; |
c8b1a7db | 27 | class AliAODHandler; |
1a26066e | 28 | class AliESDEvent; |
29 | class TH2D; | |
30 | class TList; | |
31 | class TTree; | |
fb3430ac | 32 | class TAxis; |
1f7aa5c7 | 33 | class TProfile; |
1a26066e | 34 | |
1a26066e | 35 | /** |
bd6f5206 | 36 | * @defgroup pwglf_forward PWGLF Forward analysis |
1a26066e | 37 | * |
38 | * Code to do the multiplicity analysis in the forward psuedo-rapidity | |
39 | * regions | |
40 | * | |
41 | */ | |
42 | /** | |
bd6f5206 | 43 | * @defgroup pwglf_forward_tasks Tasks |
1a26066e | 44 | * |
45 | * Code to do the multiplicity analysis in the forward psuedo-rapidity | |
46 | * regions | |
47 | * | |
bd6f5206 | 48 | * @ingroup pwglf_forward |
1a26066e | 49 | */ |
ffca499d | 50 | /** |
bd6f5206 | 51 | * @defgroup pwglf_forward_topical Topical |
290052e7 | 52 | * |
53 | * The code divided according to topic | |
ffca499d | 54 | */ |
55 | /** | |
bd6f5206 | 56 | * @defgroup pwglf_forward_aod AOD |
290052e7 | 57 | * |
58 | * Code to do with AOD production | |
59 | * | |
bd6f5206 | 60 | * @ingroup pwglf_forward_topical |
ffca499d | 61 | */ |
1a26066e | 62 | /** |
7984e5f7 | 63 | * Base class for classes that calculate the multiplicity in the |
64 | * forward regions event-by-event | |
1a26066e | 65 | * |
66 | * @par Inputs: | |
67 | * - AliESDEvent | |
68 | * | |
69 | * @par Outputs: | |
70 | * - AliAODForwardMult | |
71 | * | |
72 | * @par Histograms | |
73 | * | |
74 | * @par Corrections used | |
75 | * | |
bd6f5206 | 76 | * @ingroup pwglf_forward_tasks |
77 | * @ingroup pwglf_forward_aod | |
1a26066e | 78 | * |
79 | */ | |
c8b1a7db | 80 | class AliForwardMultiplicityBase : public AliBaseESDTask |
1a26066e | 81 | { |
82 | public: | |
1f7aa5c7 | 83 | enum { |
84 | kTimingEventInspector = 1, | |
85 | kTimingSharingFilter = 2, | |
86 | kTimingDensityCalculator = 3, | |
87 | kTimingCorrections = 4, | |
88 | kTimingHistCollector = 5, | |
89 | kTimingEventPlaneFinder = 6, | |
90 | kTimingTotal = 7 | |
91 | }; | |
1a26066e | 92 | /** |
93 | * @{ | |
94 | * @name Interface methods | |
95 | */ | |
1a26066e | 96 | /** |
97 | * Create output objects | |
c8b1a7db | 98 | * |
99 | * @return true on success | |
1a26066e | 100 | */ |
c8b1a7db | 101 | virtual Bool_t Book(); |
1a26066e | 102 | /** |
c8b1a7db | 103 | * Initialise the sub objects and stuff. Called on first event |
1a26066e | 104 | * |
c8b1a7db | 105 | * @param vertex Vertex axis to use |
106 | * @param eta Eta axis to use | |
107 | * | |
108 | * @return false on errors | |
109 | */ | |
110 | virtual Bool_t PreData(const TAxis& vertex, const TAxis& eta); | |
1a26066e | 111 | /** |
112 | * End of job | |
113 | * | |
c8b1a7db | 114 | * @return true on success |
1a26066e | 115 | */ |
c8b1a7db | 116 | virtual Bool_t Finalize(); |
1a26066e | 117 | /** |
118 | * @} | |
119 | */ | |
120 | /** | |
121 | * Print information | |
122 | * | |
123 | * @param option Not used | |
124 | */ | |
125 | virtual void Print(Option_t* option="") const; | |
1f7aa5c7 | 126 | /** |
127 | * Set whether to make a timing histogram | |
128 | * | |
129 | * @param enable | |
130 | */ | |
131 | virtual void SetDoTiming(Bool_t enable=true) { fDoTiming = enable; } | |
1a26066e | 132 | /** |
133 | * Whether to enable low-flux code | |
134 | * | |
135 | * @param use IF true, enable low-flux code | |
136 | */ | |
137 | virtual void SetEnableLowFlux(Bool_t use=true) { fEnableLowFlux = use; } | |
138 | /** | |
139 | * @{ | |
140 | * @name Access to sub-algorithms | |
141 | */ | |
1a26066e | 142 | /** |
143 | * Get reference to the SharingFilter algorithm | |
144 | * | |
145 | * @return Reference to AliFMDSharingFilter object | |
146 | */ | |
147 | virtual AliFMDSharingFilter& GetSharingFilter() = 0; | |
148 | /** | |
149 | * Get reference to the DensityCalculator algorithm | |
150 | * | |
151 | * @return Reference to AliFMDDensityCalculator object | |
152 | */ | |
153 | virtual AliFMDDensityCalculator& GetDensityCalculator() = 0; | |
154 | /** | |
155 | * Get reference to the Corrections algorithm | |
156 | * | |
72cc12cd | 157 | * @return Reference to AliFMDCorrector object |
1a26066e | 158 | */ |
72cc12cd | 159 | virtual AliFMDCorrector& GetCorrections() = 0; |
1a26066e | 160 | /** |
161 | * Get reference to the HistCollector algorithm | |
162 | * | |
163 | * @return Reference to AliFMDHistCollector object | |
164 | */ | |
165 | virtual AliFMDHistCollector& GetHistCollector() = 0; | |
1174780f | 166 | /** |
167 | * Get reference to the SharingFilter algorithm | |
168 | * | |
169 | * @return Reference to AliFMDSharingFilter object | |
170 | */ | |
171 | virtual const AliFMDSharingFilter& GetSharingFilter() const = 0; | |
172 | /** | |
173 | * Get reference to the DensityCalculator algorithm | |
174 | * | |
175 | * @return Reference to AliFMDDensityCalculator object | |
176 | */ | |
177 | virtual const AliFMDDensityCalculator& GetDensityCalculator() const = 0; | |
178 | /** | |
179 | * Get reference to the Corrections algorithm | |
180 | * | |
72cc12cd | 181 | * @return Reference to AliFMDCorrector object |
1174780f | 182 | */ |
72cc12cd | 183 | virtual const AliFMDCorrector& GetCorrections() const = 0; |
1174780f | 184 | /** |
185 | * Get reference to the HistCollector algorithm | |
186 | * | |
187 | * @return Reference to AliFMDHistCollector object | |
188 | */ | |
189 | virtual const AliFMDHistCollector& GetHistCollector() const = 0; | |
2b556440 | 190 | /** |
191 | * Get reference to the EventPlaneFinder algorithm | |
192 | * | |
193 | * @return Reference to AliFMDEventPlaneFinder object | |
194 | */ | |
195 | virtual AliFMDEventPlaneFinder& GetEventPlaneFinder() = 0; | |
196 | /** | |
197 | * Get reference to the EventPlaneFinder algorithm | |
198 | * | |
199 | * @return Reference to AliFMDEventPlaneFinder object | |
200 | */ | |
201 | virtual const AliFMDEventPlaneFinder& GetEventPlaneFinder() const = 0; | |
290052e7 | 202 | /* @} */ |
2b556440 | 203 | |
1a26066e | 204 | /** |
290052e7 | 205 | * Set the debug level |
206 | * | |
207 | * @param dbg | |
1a26066e | 208 | */ |
8449e3e0 | 209 | virtual void SetDebug(Int_t dbg); |
8449e3e0 | 210 | /** |
211 | * Set whether to make separate branches for each ring. If enabled | |
212 | * there will be 5 additional branches on the AOD tree - each | |
213 | * holding a TH2D object of the charged particle multiplicity in | |
214 | * @f$(\eta,\varphi)@f$ bins for that event. | |
215 | * | |
216 | * @param use If true, make separate branches for each ring. | |
217 | */ | |
218 | void SetStorePerRing(Bool_t use) { fStorePerRing = use; } | |
1a26066e | 219 | protected: |
220 | /** | |
221 | * Constructor | |
222 | * | |
223 | * @param name Name of task | |
224 | */ | |
19abe41d | 225 | AliForwardMultiplicityBase(const char* name); |
1a26066e | 226 | /** |
227 | * Constructor | |
228 | */ | |
19abe41d | 229 | AliForwardMultiplicityBase() |
c8b1a7db | 230 | : AliBaseESDTask(), |
231 | fEnableLowFlux(true), | |
232 | fStorePerRing(false), | |
233 | fHData(0), | |
234 | fHistos(), | |
235 | fAODFMD(), | |
236 | fAODEP(), | |
237 | fRingSums(), | |
238 | fDoTiming(false), | |
239 | fHTiming(0) | |
1a26066e | 240 | {} |
241 | /** | |
242 | * Copy constructor | |
243 | * | |
244 | * @param o Object to copy from | |
245 | */ | |
c8b1a7db | 246 | AliForwardMultiplicityBase(const AliForwardMultiplicityBase& o); |
1a26066e | 247 | /** |
248 | * Assignment operator | |
249 | * | |
250 | * @param o Object to assign from | |
251 | * | |
252 | * @return Reference to this object | |
253 | */ | |
fb3430ac | 254 | AliForwardMultiplicityBase& operator=(const AliForwardMultiplicityBase& o); |
8449e3e0 | 255 | /** |
256 | * Initialize members based on eta and vertex axis - only available | |
257 | * after first event - called from SetupForData. | |
258 | * | |
259 | * @param pe @f$\eta@f$ axis | |
260 | * @param pv Interaction point Z-coordinate axis | |
261 | */ | |
c8b1a7db | 262 | virtual void InitMembers(const TAxis& pe, const TAxis& pv); |
8449e3e0 | 263 | /** |
264 | * Create output branches - called from UserCreateOutputObjects | |
265 | */ | |
266 | virtual void CreateBranches(AliAODHandler* ah); | |
8449e3e0 | 267 | /** |
268 | * Do estimates of @f$dN/d\eta@f$ - called at Terminate | |
269 | * | |
270 | * @param input Input list | |
271 | * @param output Output list | |
272 | */ | |
273 | virtual void EstimatedNdeta(const TList* input, TList* output) const; | |
5ca83fee | 274 | /** |
275 | * Calculate a simple dN/deta from all accepted events | |
276 | * | |
277 | * @param input Input list | |
278 | * @param output Output list | |
279 | * @param nTr On return, number of triggers | |
280 | * @param nTrVtx On return, number of trigger+vertex events | |
281 | * @param nAcc On return, number of accepted events | |
282 | * | |
283 | * @return true on success | |
284 | */ | |
285 | virtual Bool_t MakeSimpledNdeta(const TList* input, | |
286 | TList* output, | |
287 | Double_t& nTr, | |
288 | Double_t& nTrVtx, | |
289 | Double_t& nAcc); | |
5bb5d1f6 | 290 | /** |
291 | * Make Ring @f$ dN/d\eta @f$ histogram and a stack | |
292 | * | |
293 | * @param input List with summed signals | |
294 | * @param output Output list | |
c6115ede | 295 | * @param inName Input name |
296 | * @param outName Output name | |
297 | * @param style Style | |
5bb5d1f6 | 298 | */ |
299 | virtual void MakeRingdNdeta(const TList* input, | |
300 | const char* inName, | |
301 | TList* output, | |
302 | const char* outName, | |
303 | Int_t style=20) const; | |
c8b1a7db | 304 | TAxis* DefaultEtaAxis() const { return new TAxis(200,-4,6); } |
305 | TAxis* DefaultVertexAxis() const { return new TAxis(10,-10,10); } | |
8449e3e0 | 306 | Bool_t fEnableLowFlux;// Whether to use low-flux specific code |
8449e3e0 | 307 | Bool_t fStorePerRing; // Store each ring on separate branch |
8449e3e0 | 308 | TH2D* fHData; // Summed 1/Nd^2N_{ch}/dphideta |
309 | AliForwardUtil::Histos fHistos; // Cache histograms | |
310 | AliAODForwardMult fAODFMD; // Output object | |
311 | AliAODForwardEP fAODEP; // Output object | |
312 | AliForwardUtil::Histos fRingSums; // Cache histograms | |
1f7aa5c7 | 313 | Bool_t fDoTiming; // Whether to do timing or not |
314 | TProfile* fHTiming; | |
1a26066e | 315 | |
c8b1a7db | 316 | ClassDef(AliForwardMultiplicityBase,5) // Forward multiplicity class |
1a26066e | 317 | }; |
318 | ||
319 | #endif | |
290052e7 | 320 | |
1a26066e | 321 | // Local Variables: |
322 | // mode: C++ | |
323 | // End: | |
324 |