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 pwglf_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 PWGLF 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 pwglf_forward PWGLF Forward analysis
92 * Code to do the multiplicity analysis in the forward psuedo-rapidity
97 * @defgroup pwglf_forward_tasks Tasks
99 * Code to do the multiplicity analysis in the forward psuedo-rapidity
102 * @ingroup pwglf_forward
105 * @defgroup pwglf_forward_topical Topical
108 * @defgroup pwglf_forward_aod AOD
109 * @ingroup pwglf_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 pwglf_forward_tasks
126 * @ingroup pwglf_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 SharingFilter algorithm
186 * @return Reference to AliFMDSharingFilter object
188 virtual AliFMDSharingFilter& GetSharingFilter() = 0;
190 * Get reference to the DensityCalculator algorithm
192 * @return Reference to AliFMDDensityCalculator object
194 virtual AliFMDDensityCalculator& GetDensityCalculator() = 0;
196 * Get reference to the Corrections algorithm
198 * @return Reference to AliFMDCorrector object
200 virtual AliFMDCorrector& GetCorrections() = 0;
202 * Get reference to the HistCollector algorithm
204 * @return Reference to AliFMDHistCollector object
206 virtual AliFMDHistCollector& GetHistCollector() = 0;
208 * Get reference to the EventInspector algorithm
210 * @return Reference to AliFMDEventInspector object
212 virtual const AliFMDEventInspector& GetEventInspector() const = 0;
214 * Get reference to the SharingFilter algorithm
216 * @return Reference to AliFMDSharingFilter object
218 virtual const AliFMDSharingFilter& GetSharingFilter() const = 0;
220 * Get reference to the DensityCalculator algorithm
222 * @return Reference to AliFMDDensityCalculator object
224 virtual const AliFMDDensityCalculator& GetDensityCalculator() const = 0;
226 * Get reference to the Corrections algorithm
228 * @return Reference to AliFMDCorrector object
230 virtual const AliFMDCorrector& GetCorrections() const = 0;
232 * Get reference to the HistCollector algorithm
234 * @return Reference to AliFMDHistCollector object
236 virtual const AliFMDHistCollector& GetHistCollector() const = 0;
240 virtual void SetDebug(Int_t dbg) = 0;
245 * @param name Name of task
247 AliForwardMultiplicityBase(const char* name);
251 AliForwardMultiplicityBase()
252 : AliAnalysisTaskSE(),
253 fEnableLowFlux(true),
260 * @param o Object to copy from
262 AliForwardMultiplicityBase(const AliForwardMultiplicityBase& o)
263 : AliAnalysisTaskSE(o),
264 fEnableLowFlux(o.fEnableLowFlux),
265 fFirstEvent(o.fFirstEvent),
266 fCorrManager(o.fCorrManager)
269 * Assignment operator
271 * @param o Object to assign from
273 * @return Reference to this object
275 AliForwardMultiplicityBase& operator=(const AliForwardMultiplicityBase& o);
277 * Check if all needed corrections are there and accounted for. If not,
280 * @param what Which corrections is needed
282 * @return true if all present, false otherwise
284 Bool_t CheckCorrections(UInt_t what) const;
289 virtual Bool_t ReadCorrections(const TAxis*& pe,
293 * Get the ESD event. IF this is the first event, initialise
295 virtual AliESDEvent* GetESDEvent();
297 * Initialise the sub objects and stuff. Called on first event
300 virtual void InitializeSubs() = 0;
302 * Mark this event as one to store in the AOD
305 virtual void MarkEventForStore() const;
307 * Make Ring @f$ dN/d\eta @f$ histogram and a stack
309 * @param input List with summed signals
310 * @param output Output list
311 * @param inName Input name
312 * @param outName Output name
315 virtual void MakeRingdNdeta(const TList* input,
319 Int_t style=20) const;
320 Bool_t fEnableLowFlux;// Whether to use low-flux specific code
321 Bool_t fFirstEvent; // Whether the event is the first seen
324 * A pointer to the corrections manager. This is here to make the
325 * corrections manager persistent - that is, when we write the
326 * analysis train to a file (as done in PROOF) we should also write
327 * down the corrections mananger. This pointer ensures that.
330 AliForwardCorrectionManager* fCorrManager; // Pointer to corrections manager
332 ClassDef(AliForwardMultiplicityBase,2) // Forward multiplicity class