]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG2/FORWARD/analysis2/AliForwardMultiplicityBase.h
Code clean-up in dN/deta calculation.
[u/mrichter/AliRoot.git] / PWG2 / FORWARD / analysis2 / AliForwardMultiplicityBase.h
CommitLineData
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 *
15 * @ingroup pwg2_forward_aod
16 */
1a26066e 17#include <AliAnalysisTaskSE.h>
1a26066e 18class AliFMDEventInspector;
19class AliFMDEnergyFitter;
20class AliFMDSharingFilter;
21class AliFMDDensityCalculator;
72cc12cd 22class AliFMDCorrector;
1a26066e 23class AliFMDHistCollector;
19abe41d 24class AliForwardCorrectionManager;
1a26066e 25class AliESDEvent;
26class TH2D;
27class TList;
28class TTree;
fb3430ac 29class TAxis;
1a26066e 30
31/**
32 * @mainpage ALICE PWG2 Forward Multiplcity Analysis
ffca499d 33 *
34 * This is the analysis code for analysis of the Forward data.
35 *
36 * @par Code overview
37 *
38 * See the <a href="modules.html">Modules</a> page
39 *
40 * @par Run.sh script
41 *
42 * @verbatim
43 * Usage: Run.sh [OPTIONS]
44 *
45 * Do Pass1 and Pass2 on ESD files in current directory.
46 *
47 * Options:
48 * -h,--help This help
49 * -n,--events N Number of events (-1)
50 * -1,--pass1 Run pass 1, only AOD (0)
51 * -2,--pass2 Run pass 2, only Hists (0)
52 * -3,--pass3 Draw results (0)
53 * -v,--vz-min CM Minimum value of vz (-10)
54 * -V,--vz-max CM Maximum value of vz (10)
55 * -t,--trigger TYPE Select trigger TYPE (INEL)
56 * -b,--batch Do batch processing (0)
57 * -P,--proof NWORKERS Run in PROOF(Lite) mode (0)
58 * -M,--mc Run over MC data (0)
59 * -g,--gdb Run in GDB mode (0)
60 * -E,--eloss Run energy loss script
61 * -r,--rebin Rebin factor (1)
62 * -C,--use-centrality Run centrality task (0)
63 * -O,--show-older Show older data (0)
64 * -J,--show-published Show ALICE published data (1)
65 * -R,--show-ratios Show ratios to other data (1)
66 * -Z,--show-asymmetry Show asymmetry (1)
67 * -S,--scheme SCHEME Normalisation scheme (full)
68 * -T,--title STRING Title on plots ()
69 *
70 * TYPE is a comma or space separated list of
71 *
72 * INEL Inelastic triggers (V0A|V0C|SPD)
73 * INEL>0 As above + N_ch > 0 in -0.5<eta<+0.5
74 * NSD Non-single diffractive ((VOA&VOC)|N_ch > 5 -1.9<eta<+1.9)
75 *
76 * SCHEME is a comma or space separated list of
77 *
78 * NONE No event-level normalization except trivial one
79 * EVENTLEVEL Event-level normalization
80 * ALTEVENTLEVEL Event-level normalization (alternative version)
81 * BACKGROUND Not implemented yet
82 * SHAPE Shape correction
83 * FULL Same as EVENTLEVEL,BACKGROUND,SHAPE
84 * ALTFULL Same as ALTEVENTLEVEL,BACKGROUND,SHAPE
85 *
86 * If NWORKERS is 0, then the analysis will be run in local mode.
87 * @endverbatim
1a26066e 88 */
89/**
90 * @defgroup pwg2_forward PWG2 Forward analysis
91 *
92 * Code to do the multiplicity analysis in the forward psuedo-rapidity
93 * regions
94 *
95 */
96/**
97 * @defgroup pwg2_forward_tasks Tasks
98 *
99 * Code to do the multiplicity analysis in the forward psuedo-rapidity
100 * regions
101 *
102 * @ingroup pwg2_forward
103 */
ffca499d 104/**
105 * @defgroup pwg2_forward_topical Topical
106 */
107/**
108 * @defgroup pwg2_forward_aod AOD
109 * @ingroup pwg2_forward_topical
110 */
1a26066e 111/**
7984e5f7 112 * Base class for classes that calculate the multiplicity in the
113 * forward regions event-by-event
1a26066e 114 *
115 * @par Inputs:
116 * - AliESDEvent
117 *
118 * @par Outputs:
119 * - AliAODForwardMult
120 *
121 * @par Histograms
122 *
123 * @par Corrections used
124 *
125 * @ingroup pwg2_forward_tasks
ffca499d 126 * @ingroup pwg2_forward_aod
1a26066e 127 *
128 */
129class AliForwardMultiplicityBase : public AliAnalysisTaskSE
130{
131public:
132 /**
133 * @{
134 * @name Interface methods
135 */
136 /**
137 * Initialize the task
138 *
139 */
140 virtual void Init() { fFirstEvent = true; }
141 /**
142 * Create output objects
143 *
144 */
145 virtual void UserCreateOutputObjects() = 0;
146 /**
147 * Process each event
148 *
149 * @param option Not used
150 */
151 virtual void UserExec(Option_t* option) = 0;
152 /**
153 * End of job
154 *
155 * @param option Not used
156 */
157 virtual void Terminate(Option_t* option) = 0;
158 /**
159 * @}
160 */
161 /**
162 * Print information
163 *
164 * @param option Not used
165 */
166 virtual void Print(Option_t* option="") const;
167 /**
168 * Whether to enable low-flux code
169 *
170 * @param use IF true, enable low-flux code
171 */
172 virtual void SetEnableLowFlux(Bool_t use=true) { fEnableLowFlux = use; }
173 /**
174 * @{
175 * @name Access to sub-algorithms
176 */
177 /**
178 * Get reference to the EventInspector algorithm
179 *
180 * @return Reference to AliFMDEventInspector object
181 */
182 virtual AliFMDEventInspector& GetEventInspector() = 0;
1a26066e 183 /**
184 * Get reference to the SharingFilter algorithm
185 *
186 * @return Reference to AliFMDSharingFilter object
187 */
188 virtual AliFMDSharingFilter& GetSharingFilter() = 0;
189 /**
190 * Get reference to the DensityCalculator algorithm
191 *
192 * @return Reference to AliFMDDensityCalculator object
193 */
194 virtual AliFMDDensityCalculator& GetDensityCalculator() = 0;
195 /**
196 * Get reference to the Corrections algorithm
197 *
72cc12cd 198 * @return Reference to AliFMDCorrector object
1a26066e 199 */
72cc12cd 200 virtual AliFMDCorrector& GetCorrections() = 0;
1a26066e 201 /**
202 * Get reference to the HistCollector algorithm
203 *
204 * @return Reference to AliFMDHistCollector object
205 */
206 virtual AliFMDHistCollector& GetHistCollector() = 0;
1174780f 207 /**
208 * Get reference to the EventInspector algorithm
209 *
210 * @return Reference to AliFMDEventInspector object
211 */
212 virtual const AliFMDEventInspector& GetEventInspector() const = 0;
1174780f 213 /**
214 * Get reference to the SharingFilter algorithm
215 *
216 * @return Reference to AliFMDSharingFilter object
217 */
218 virtual const AliFMDSharingFilter& GetSharingFilter() const = 0;
219 /**
220 * Get reference to the DensityCalculator algorithm
221 *
222 * @return Reference to AliFMDDensityCalculator object
223 */
224 virtual const AliFMDDensityCalculator& GetDensityCalculator() const = 0;
225 /**
226 * Get reference to the Corrections algorithm
227 *
72cc12cd 228 * @return Reference to AliFMDCorrector object
1174780f 229 */
72cc12cd 230 virtual const AliFMDCorrector& GetCorrections() const = 0;
1174780f 231 /**
232 * Get reference to the HistCollector algorithm
233 *
234 * @return Reference to AliFMDHistCollector object
235 */
236 virtual const AliFMDHistCollector& GetHistCollector() const = 0;
1a26066e 237 /**
238 * @}
239 */
240 virtual void SetDebug(Int_t dbg) = 0;
241protected:
242 /**
243 * Constructor
244 *
245 * @param name Name of task
246 */
19abe41d 247 AliForwardMultiplicityBase(const char* name);
1a26066e 248 /**
249 * Constructor
250 */
19abe41d 251 AliForwardMultiplicityBase()
252 : AliAnalysisTaskSE(),
253 fEnableLowFlux(true),
254 fFirstEvent(true),
255 fCorrManager(0)
1a26066e 256 {}
257 /**
258 * Copy constructor
259 *
260 * @param o Object to copy from
261 */
262 AliForwardMultiplicityBase(const AliForwardMultiplicityBase& o)
263 : AliAnalysisTaskSE(o),
264 fEnableLowFlux(o.fEnableLowFlux),
19abe41d 265 fFirstEvent(o.fFirstEvent),
266 fCorrManager(o.fCorrManager)
1a26066e 267 {}
268 /**
269 * Assignment operator
270 *
271 * @param o Object to assign from
272 *
273 * @return Reference to this object
274 */
fb3430ac 275 AliForwardMultiplicityBase& operator=(const AliForwardMultiplicityBase& o);
1174780f 276 /**
277 * Check if all needed corrections are there and accounted for. If not,
278 * do a Fatal exit
279 *
280 * @param what Which corrections is needed
281 *
282 * @return true if all present, false otherwise
283 */
284 Bool_t CheckCorrections(UInt_t what) const;
7ec4d843 285 /**
286 * Read corrections
287 *
288 */
19abe41d 289 virtual Bool_t ReadCorrections(const TAxis*& pe,
290 const TAxis*& pv,
291 Bool_t mc=false);
7ec4d843 292 /**
293 * Get the ESD event. IF this is the first event, initialise
294 */
295 virtual AliESDEvent* GetESDEvent();
1a26066e 296 /**
7ec4d843 297 * Initialise the sub objects and stuff. Called on first event
298 *
299 */
300 virtual void InitializeSubs() = 0;
301 /**
1a26066e 302 * Mark this event as one to store in the AOD
303 *
304 */
305 virtual void MarkEventForStore() const;
306
307 Bool_t fEnableLowFlux;// Whether to use low-flux specific code
308 Bool_t fFirstEvent; // Whether the event is the first seen
19abe41d 309private:
310 /**
311 * A pointer to the corrections manager. This is here to make the
312 * corrections manager persistent - that is, when we write the
313 * analysis train to a file (as done in PROOF) we should also write
314 * down the corrections mananger. This pointer ensures that.
315 *
316 */
317 AliForwardCorrectionManager* fCorrManager; // Pointer to corrections manager
1a26066e 318
19abe41d 319 ClassDef(AliForwardMultiplicityBase,2) // Forward multiplicity class
1a26066e 320};
321
322#endif
323// Local Variables:
324// mode: C++
325// End:
326