]>
Commit | Line | Data |
---|---|---|
1 | // | |
2 | // Base class for classes that calculate the multiplicity in the | |
3 | // forward regions event-by-event | |
4 | // | |
5 | #ifndef ALIFORWARDMULTIPLICITYBASE_H | |
6 | #define ALIFORWARDMULTIPLICITYBASE_H | |
7 | #include <AliAnalysisTaskSE.h> | |
8 | #include "AliForwardUtil.h" | |
9 | class AliFMDEventInspector; | |
10 | class AliFMDEnergyFitter; | |
11 | class AliFMDSharingFilter; | |
12 | class AliFMDDensityCalculator; | |
13 | class AliFMDCorrector; | |
14 | class AliFMDHistCollector; | |
15 | class AliForwardCorrectionManager; | |
16 | class AliESDEvent; | |
17 | class TH2D; | |
18 | class TList; | |
19 | class TTree; | |
20 | ||
21 | ||
22 | /** | |
23 | * @mainpage ALICE PWG2 Forward Multiplcity Analysis | |
24 | */ | |
25 | /** | |
26 | * @defgroup pwg2_forward PWG2 Forward analysis | |
27 | * | |
28 | * Code to do the multiplicity analysis in the forward psuedo-rapidity | |
29 | * regions | |
30 | * | |
31 | */ | |
32 | /** | |
33 | * @defgroup pwg2_forward_tasks Tasks | |
34 | * | |
35 | * Code to do the multiplicity analysis in the forward psuedo-rapidity | |
36 | * regions | |
37 | * | |
38 | * @ingroup pwg2_forward | |
39 | */ | |
40 | /** | |
41 | * Base class for classes that calculate the multiplicity in the | |
42 | * forward regions event-by-event | |
43 | * | |
44 | * @par Inputs: | |
45 | * - AliESDEvent | |
46 | * | |
47 | * @par Outputs: | |
48 | * - AliAODForwardMult | |
49 | * | |
50 | * @par Histograms | |
51 | * | |
52 | * @par Corrections used | |
53 | * | |
54 | * @ingroup pwg2_forward_tasks | |
55 | * | |
56 | */ | |
57 | class AliForwardMultiplicityBase : public AliAnalysisTaskSE | |
58 | { | |
59 | public: | |
60 | /** | |
61 | * @{ | |
62 | * @name Interface methods | |
63 | */ | |
64 | /** | |
65 | * Initialize the task | |
66 | * | |
67 | */ | |
68 | virtual void Init() { fFirstEvent = true; } | |
69 | /** | |
70 | * Create output objects | |
71 | * | |
72 | */ | |
73 | virtual void UserCreateOutputObjects() = 0; | |
74 | /** | |
75 | * Process each event | |
76 | * | |
77 | * @param option Not used | |
78 | */ | |
79 | virtual void UserExec(Option_t* option) = 0; | |
80 | /** | |
81 | * End of job | |
82 | * | |
83 | * @param option Not used | |
84 | */ | |
85 | virtual void Terminate(Option_t* option) = 0; | |
86 | /** | |
87 | * @} | |
88 | */ | |
89 | /** | |
90 | * Print information | |
91 | * | |
92 | * @param option Not used | |
93 | */ | |
94 | virtual void Print(Option_t* option="") const; | |
95 | /** | |
96 | * Whether to enable low-flux code | |
97 | * | |
98 | * @param use IF true, enable low-flux code | |
99 | */ | |
100 | virtual void SetEnableLowFlux(Bool_t use=true) { fEnableLowFlux = use; } | |
101 | /** | |
102 | * @{ | |
103 | * @name Access to sub-algorithms | |
104 | */ | |
105 | /** | |
106 | * Get reference to the EventInspector algorithm | |
107 | * | |
108 | * @return Reference to AliFMDEventInspector object | |
109 | */ | |
110 | virtual AliFMDEventInspector& GetEventInspector() = 0; | |
111 | /** | |
112 | * Get reference to the EnergyFitter algorithm | |
113 | * | |
114 | * @return Reference to AliFMDEnergyFitter object | |
115 | */ | |
116 | virtual AliFMDEnergyFitter& GetEnergyFitter() = 0; | |
117 | /** | |
118 | * Get reference to the SharingFilter algorithm | |
119 | * | |
120 | * @return Reference to AliFMDSharingFilter object | |
121 | */ | |
122 | virtual AliFMDSharingFilter& GetSharingFilter() = 0; | |
123 | /** | |
124 | * Get reference to the DensityCalculator algorithm | |
125 | * | |
126 | * @return Reference to AliFMDDensityCalculator object | |
127 | */ | |
128 | virtual AliFMDDensityCalculator& GetDensityCalculator() = 0; | |
129 | /** | |
130 | * Get reference to the Corrections algorithm | |
131 | * | |
132 | * @return Reference to AliFMDCorrector object | |
133 | */ | |
134 | virtual AliFMDCorrector& GetCorrections() = 0; | |
135 | /** | |
136 | * Get reference to the HistCollector algorithm | |
137 | * | |
138 | * @return Reference to AliFMDHistCollector object | |
139 | */ | |
140 | virtual AliFMDHistCollector& GetHistCollector() = 0; | |
141 | /** | |
142 | * Get reference to the EventInspector algorithm | |
143 | * | |
144 | * @return Reference to AliFMDEventInspector object | |
145 | */ | |
146 | virtual const AliFMDEventInspector& GetEventInspector() const = 0; | |
147 | /** | |
148 | * Get reference to the EnergyFitter algorithm | |
149 | * | |
150 | * @return Reference to AliFMDEnergyFitter object | |
151 | */ | |
152 | virtual const AliFMDEnergyFitter& GetEnergyFitter() const = 0; | |
153 | /** | |
154 | * Get reference to the SharingFilter algorithm | |
155 | * | |
156 | * @return Reference to AliFMDSharingFilter object | |
157 | */ | |
158 | virtual const AliFMDSharingFilter& GetSharingFilter() const = 0; | |
159 | /** | |
160 | * Get reference to the DensityCalculator algorithm | |
161 | * | |
162 | * @return Reference to AliFMDDensityCalculator object | |
163 | */ | |
164 | virtual const AliFMDDensityCalculator& GetDensityCalculator() const = 0; | |
165 | /** | |
166 | * Get reference to the Corrections algorithm | |
167 | * | |
168 | * @return Reference to AliFMDCorrector object | |
169 | */ | |
170 | virtual const AliFMDCorrector& GetCorrections() const = 0; | |
171 | /** | |
172 | * Get reference to the HistCollector algorithm | |
173 | * | |
174 | * @return Reference to AliFMDHistCollector object | |
175 | */ | |
176 | virtual const AliFMDHistCollector& GetHistCollector() const = 0; | |
177 | /** | |
178 | * @} | |
179 | */ | |
180 | virtual void SetDebug(Int_t dbg) = 0; | |
181 | protected: | |
182 | /** | |
183 | * Constructor | |
184 | * | |
185 | * @param name Name of task | |
186 | */ | |
187 | AliForwardMultiplicityBase(const char* name); | |
188 | /** | |
189 | * Constructor | |
190 | */ | |
191 | AliForwardMultiplicityBase() | |
192 | : AliAnalysisTaskSE(), | |
193 | fEnableLowFlux(true), | |
194 | fFirstEvent(true), | |
195 | fCorrManager(0) | |
196 | {} | |
197 | /** | |
198 | * Copy constructor | |
199 | * | |
200 | * @param o Object to copy from | |
201 | */ | |
202 | AliForwardMultiplicityBase(const AliForwardMultiplicityBase& o) | |
203 | : AliAnalysisTaskSE(o), | |
204 | fEnableLowFlux(o.fEnableLowFlux), | |
205 | fFirstEvent(o.fFirstEvent), | |
206 | fCorrManager(o.fCorrManager) | |
207 | {} | |
208 | /** | |
209 | * Assignment operator | |
210 | * | |
211 | * @param o Object to assign from | |
212 | * | |
213 | * @return Reference to this object | |
214 | */ | |
215 | AliForwardMultiplicityBase& operator=(const AliForwardMultiplicityBase& o) | |
216 | { | |
217 | fEnableLowFlux = o.fEnableLowFlux; | |
218 | fFirstEvent = o.fFirstEvent; | |
219 | fCorrManager = o.fCorrManager; | |
220 | return *this; | |
221 | } | |
222 | /** | |
223 | * Check if all needed corrections are there and accounted for. If not, | |
224 | * do a Fatal exit | |
225 | * | |
226 | * @param what Which corrections is needed | |
227 | * | |
228 | * @return true if all present, false otherwise | |
229 | */ | |
230 | Bool_t CheckCorrections(UInt_t what) const; | |
231 | /** | |
232 | * Read corrections | |
233 | * | |
234 | */ | |
235 | virtual Bool_t ReadCorrections(const TAxis*& pe, | |
236 | const TAxis*& pv, | |
237 | Bool_t mc=false); | |
238 | /** | |
239 | * Get the ESD event. IF this is the first event, initialise | |
240 | */ | |
241 | virtual AliESDEvent* GetESDEvent(); | |
242 | /** | |
243 | * Initialise the sub objects and stuff. Called on first event | |
244 | * | |
245 | */ | |
246 | virtual void InitializeSubs() = 0; | |
247 | /** | |
248 | * Mark this event as one to store in the AOD | |
249 | * | |
250 | */ | |
251 | virtual void MarkEventForStore() const; | |
252 | ||
253 | Bool_t fEnableLowFlux;// Whether to use low-flux specific code | |
254 | Bool_t fFirstEvent; // Whether the event is the first seen | |
255 | private: | |
256 | /** | |
257 | * A pointer to the corrections manager. This is here to make the | |
258 | * corrections manager persistent - that is, when we write the | |
259 | * analysis train to a file (as done in PROOF) we should also write | |
260 | * down the corrections mananger. This pointer ensures that. | |
261 | * | |
262 | */ | |
263 | AliForwardCorrectionManager* fCorrManager; // Pointer to corrections manager | |
264 | ||
265 | ClassDef(AliForwardMultiplicityBase,2) // Forward multiplicity class | |
266 | }; | |
267 | ||
268 | #endif | |
269 | // Local Variables: | |
270 | // mode: C++ | |
271 | // End: | |
272 |