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;
25 class AliFMDEventPlaneFinder;
33 * @defgroup pwglf_forward PWGLF Forward analysis
35 * Code to do the multiplicity analysis in the forward psuedo-rapidity
40 * @defgroup pwglf_forward_tasks Tasks
42 * Code to do the multiplicity analysis in the forward psuedo-rapidity
45 * @ingroup pwglf_forward
48 * @defgroup pwglf_forward_topical Topical
50 * The code divided according to topic
53 * @defgroup pwglf_forward_aod AOD
55 * Code to do with AOD production
57 * @ingroup pwglf_forward_topical
60 * Base class for classes that calculate the multiplicity in the
61 * forward regions event-by-event
71 * @par Corrections used
73 * @ingroup pwglf_forward_tasks
74 * @ingroup pwglf_forward_aod
77 class AliForwardMultiplicityBase : public AliAnalysisTaskSE
82 * @name Interface methods
88 virtual void Init() { fFirstEvent = true; }
90 * Create output objects
93 virtual void UserCreateOutputObjects() = 0;
97 * @param option Not used
99 virtual void UserExec(Option_t* option) = 0;
103 * @param option Not used
105 virtual void Terminate(Option_t* option) = 0;
110 * Configure this task via a macro
112 * @param macro Macro to configure va
114 * @return true on success, false otherwise
116 virtual Bool_t Configure(const char* macro="ForwardAODConfig.C");
120 * @param option Not used
122 virtual void Print(Option_t* option="") const;
124 * Whether to enable low-flux code
126 * @param use IF true, enable low-flux code
128 virtual void SetEnableLowFlux(Bool_t use=true) { fEnableLowFlux = use; }
131 * @name Access to sub-algorithms
134 * Get reference to the EventInspector algorithm
136 * @return Reference to AliFMDEventInspector object
138 virtual AliFMDEventInspector& GetEventInspector() = 0;
140 * Get reference to the SharingFilter algorithm
142 * @return Reference to AliFMDSharingFilter object
144 virtual AliFMDSharingFilter& GetSharingFilter() = 0;
146 * Get reference to the DensityCalculator algorithm
148 * @return Reference to AliFMDDensityCalculator object
150 virtual AliFMDDensityCalculator& GetDensityCalculator() = 0;
152 * Get reference to the Corrections algorithm
154 * @return Reference to AliFMDCorrector object
156 virtual AliFMDCorrector& GetCorrections() = 0;
158 * Get reference to the HistCollector algorithm
160 * @return Reference to AliFMDHistCollector object
162 virtual AliFMDHistCollector& GetHistCollector() = 0;
164 * Get reference to the EventInspector algorithm
166 * @return Reference to AliFMDEventInspector object
168 virtual const AliFMDEventInspector& GetEventInspector() const = 0;
170 * Get reference to the SharingFilter algorithm
172 * @return Reference to AliFMDSharingFilter object
174 virtual const AliFMDSharingFilter& GetSharingFilter() const = 0;
176 * Get reference to the DensityCalculator algorithm
178 * @return Reference to AliFMDDensityCalculator object
180 virtual const AliFMDDensityCalculator& GetDensityCalculator() const = 0;
182 * Get reference to the Corrections algorithm
184 * @return Reference to AliFMDCorrector object
186 virtual const AliFMDCorrector& GetCorrections() const = 0;
188 * Get reference to the HistCollector algorithm
190 * @return Reference to AliFMDHistCollector object
192 virtual const AliFMDHistCollector& GetHistCollector() const = 0;
194 * Get reference to the EventPlaneFinder algorithm
196 * @return Reference to AliFMDEventPlaneFinder object
198 virtual AliFMDEventPlaneFinder& GetEventPlaneFinder() = 0;
200 * Get reference to the EventPlaneFinder algorithm
202 * @return Reference to AliFMDEventPlaneFinder object
204 virtual const AliFMDEventPlaneFinder& GetEventPlaneFinder() const = 0;
208 * Set the debug level
212 virtual void SetDebug(Int_t dbg) = 0;
214 * Overload super class method for setting debug level to call our
215 * SetDebug member function.
217 * @param dbg Debug level (0: no output, 1: essentials, 3: a whole lot)
219 virtual void SetDebugLevel(Int_t dbg)
221 AliAnalysisTaskSE::SetDebugLevel(dbg);
228 * @param name Name of task
230 AliForwardMultiplicityBase(const char* name);
234 AliForwardMultiplicityBase()
235 : AliAnalysisTaskSE(),
236 fEnableLowFlux(true),
243 * @param o Object to copy from
245 AliForwardMultiplicityBase(const AliForwardMultiplicityBase& o)
246 : AliAnalysisTaskSE(o),
247 fEnableLowFlux(o.fEnableLowFlux),
248 fFirstEvent(o.fFirstEvent),
249 fCorrManager(o.fCorrManager)
252 * Assignment operator
254 * @param o Object to assign from
256 * @return Reference to this object
258 AliForwardMultiplicityBase& operator=(const AliForwardMultiplicityBase& o);
260 * Check if all needed corrections are there and accounted for. If not,
263 * @param what Which corrections is needed
265 * @return true if all present, false otherwise
267 Bool_t CheckCorrections(UInt_t what) const;
272 * @param pe On return, the eta axis
273 * @param pv On return ,the vertex axis
274 * @param mc True assume MC input
276 * @return true ons succcss
278 virtual Bool_t ReadCorrections(const TAxis*& pe,
282 * Get the ESD event. IF this is the first event, initialise
284 * @return Pointer to ESD event structore
286 virtual AliESDEvent* GetESDEvent();
288 * Initialise the sub objects and stuff. Called on first event
290 * @return false on errors
292 virtual Bool_t InitializeSubs() = 0;
294 * Mark this event as one to store in the AOD
297 virtual void MarkEventForStore() const;
299 * Make Ring @f$ dN/d\eta @f$ histogram and a stack
301 * @param input List with summed signals
302 * @param output Output list
303 * @param inName Input name
304 * @param outName Output name
307 virtual void MakeRingdNdeta(const TList* input,
311 Int_t style=20) const;
312 Bool_t fEnableLowFlux;// Whether to use low-flux specific code
313 Bool_t fFirstEvent; // Whether the event is the first seen
316 * A pointer to the corrections manager. This is here to make the
317 * corrections manager persistent - that is, when we write the
318 * analysis train to a file (as done in PROOF) we should also write
319 * down the corrections mananger. This pointer ensures that.
322 AliForwardCorrectionManager* fCorrManager; // Pointer to corrections manager
324 ClassDef(AliForwardMultiplicityBase,2) // Forward multiplicity class