2 // Base class for classes that calculate the multiplicity in the
3 // forward regions event-by-event
5 #ifndef ALIFORWARDMULTIPLICITYBASE_H
6 #define ALIFORWARDMULTIPLICITYBASE_H
8 * @file AliForwardMultiplicityBase.h
9 * @author Christian Holm Christensen <cholm@dalsgaard.hehi.nbi.dk>
10 * @date Wed Mar 23 14:06:29 2011
15 * @ingroup pwg2_forward_aod
17 #include <AliAnalysisTaskSE.h>
18 class AliFMDEventInspector;
19 class AliFMDEnergyFitter;
20 class AliFMDSharingFilter;
21 class AliFMDDensityCalculator;
22 class AliFMDCorrector;
23 class AliFMDHistCollector;
24 class AliForwardCorrectionManager;
32 * @mainpage ALICE PWG2 Forward Multiplcity Analysis
34 * This is the analysis code for analysis of the Forward data.
38 * See the <a href="modules.html">Modules</a> page
43 * Usage: Run.sh [OPTIONS]
45 * Do Pass1 and Pass2 on ESD files in current directory.
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 ()
70 * TYPE is a comma or space separated list of
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)
76 * SCHEME is a comma or space separated list of
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
86 * If NWORKERS is 0, then the analysis will be run in local mode.
90 * @defgroup pwg2_forward PWG2 Forward analysis
92 * Code to do the multiplicity analysis in the forward psuedo-rapidity
97 * @defgroup pwg2_forward_tasks Tasks
99 * Code to do the multiplicity analysis in the forward psuedo-rapidity
102 * @ingroup pwg2_forward
105 * @defgroup pwg2_forward_topical Topical
108 * @defgroup pwg2_forward_aod AOD
109 * @ingroup pwg2_forward_topical
112 * Base class for classes that calculate the multiplicity in the
113 * forward regions event-by-event
119 * - AliAODForwardMult
123 * @par Corrections used
125 * @ingroup pwg2_forward_tasks
126 * @ingroup pwg2_forward_aod
129 class AliForwardMultiplicityBase : public AliAnalysisTaskSE
134 * @name Interface methods
137 * Initialize the task
140 virtual void Init() { fFirstEvent = true; }
142 * Create output objects
145 virtual void UserCreateOutputObjects() = 0;
149 * @param option Not used
151 virtual void UserExec(Option_t* option) = 0;
155 * @param option Not used
157 virtual void Terminate(Option_t* option) = 0;
164 * @param option Not used
166 virtual void Print(Option_t* option="") const;
168 * Whether to enable low-flux code
170 * @param use IF true, enable low-flux code
172 virtual void SetEnableLowFlux(Bool_t use=true) { fEnableLowFlux = use; }
175 * @name Access to sub-algorithms
178 * Get reference to the EventInspector algorithm
180 * @return Reference to AliFMDEventInspector object
182 virtual AliFMDEventInspector& GetEventInspector() = 0;
184 * Get reference to the EnergyFitter algorithm
186 * @return Reference to AliFMDEnergyFitter object
188 virtual AliFMDEnergyFitter& GetEnergyFitter() = 0;
190 * Get reference to the SharingFilter algorithm
192 * @return Reference to AliFMDSharingFilter object
194 virtual AliFMDSharingFilter& GetSharingFilter() = 0;
196 * Get reference to the DensityCalculator algorithm
198 * @return Reference to AliFMDDensityCalculator object
200 virtual AliFMDDensityCalculator& GetDensityCalculator() = 0;
202 * Get reference to the Corrections algorithm
204 * @return Reference to AliFMDCorrector object
206 virtual AliFMDCorrector& GetCorrections() = 0;
208 * Get reference to the HistCollector algorithm
210 * @return Reference to AliFMDHistCollector object
212 virtual AliFMDHistCollector& GetHistCollector() = 0;
214 * Get reference to the EventInspector algorithm
216 * @return Reference to AliFMDEventInspector object
218 virtual const AliFMDEventInspector& GetEventInspector() const = 0;
220 * Get reference to the EnergyFitter algorithm
222 * @return Reference to AliFMDEnergyFitter object
224 virtual const AliFMDEnergyFitter& GetEnergyFitter() const = 0;
226 * Get reference to the SharingFilter algorithm
228 * @return Reference to AliFMDSharingFilter object
230 virtual const AliFMDSharingFilter& GetSharingFilter() const = 0;
232 * Get reference to the DensityCalculator algorithm
234 * @return Reference to AliFMDDensityCalculator object
236 virtual const AliFMDDensityCalculator& GetDensityCalculator() const = 0;
238 * Get reference to the Corrections algorithm
240 * @return Reference to AliFMDCorrector object
242 virtual const AliFMDCorrector& GetCorrections() const = 0;
244 * Get reference to the HistCollector algorithm
246 * @return Reference to AliFMDHistCollector object
248 virtual const AliFMDHistCollector& GetHistCollector() const = 0;
252 virtual void SetDebug(Int_t dbg) = 0;
257 * @param name Name of task
259 AliForwardMultiplicityBase(const char* name);
263 AliForwardMultiplicityBase()
264 : AliAnalysisTaskSE(),
265 fEnableLowFlux(true),
272 * @param o Object to copy from
274 AliForwardMultiplicityBase(const AliForwardMultiplicityBase& o)
275 : AliAnalysisTaskSE(o),
276 fEnableLowFlux(o.fEnableLowFlux),
277 fFirstEvent(o.fFirstEvent),
278 fCorrManager(o.fCorrManager)
281 * Assignment operator
283 * @param o Object to assign from
285 * @return Reference to this object
287 AliForwardMultiplicityBase& operator=(const AliForwardMultiplicityBase& o);
289 * Check if all needed corrections are there and accounted for. If not,
292 * @param what Which corrections is needed
294 * @return true if all present, false otherwise
296 Bool_t CheckCorrections(UInt_t what) const;
301 virtual Bool_t ReadCorrections(const TAxis*& pe,
305 * Get the ESD event. IF this is the first event, initialise
307 virtual AliESDEvent* GetESDEvent();
309 * Initialise the sub objects and stuff. Called on first event
312 virtual void InitializeSubs() = 0;
314 * Mark this event as one to store in the AOD
317 virtual void MarkEventForStore() const;
319 Bool_t fEnableLowFlux;// Whether to use low-flux specific code
320 Bool_t fFirstEvent; // Whether the event is the first seen
323 * A pointer to the corrections manager. This is here to make the
324 * corrections manager persistent - that is, when we write the
325 * analysis train to a file (as done in PROOF) we should also write
326 * down the corrections mananger. This pointer ensures that.
329 AliForwardCorrectionManager* fCorrManager; // Pointer to corrections manager
331 ClassDef(AliForwardMultiplicityBase,2) // Forward multiplicity class