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
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;
22 * @mainpage ALICE PWG2 Forward Multiplcity Analysis
25 * @defgroup pwg2_forward PWG2 Forward analysis
27 * Code to do the multiplicity analysis in the forward psuedo-rapidity
32 * @defgroup pwg2_forward_tasks Tasks
34 * Code to do the multiplicity analysis in the forward psuedo-rapidity
37 * @ingroup pwg2_forward
40 * Base class for classes that calculate the multiplicity in the
41 * forward regions event-by-event
51 * @par Corrections used
53 * @ingroup pwg2_forward_tasks
56 class AliForwardMultiplicityBase : public AliAnalysisTaskSE
61 * @name Interface methods
67 virtual void Init() { fFirstEvent = true; }
69 * Create output objects
72 virtual void UserCreateOutputObjects() = 0;
76 * @param option Not used
78 virtual void UserExec(Option_t* option) = 0;
82 * @param option Not used
84 virtual void Terminate(Option_t* option) = 0;
91 * @param option Not used
93 virtual void Print(Option_t* option="") const;
95 * Whether to enable low-flux code
97 * @param use IF true, enable low-flux code
99 virtual void SetEnableLowFlux(Bool_t use=true) { fEnableLowFlux = use; }
102 * @name Access to sub-algorithms
105 * Get reference to the EventInspector algorithm
107 * @return Reference to AliFMDEventInspector object
109 virtual AliFMDEventInspector& GetEventInspector() = 0;
111 * Get reference to the EnergyFitter algorithm
113 * @return Reference to AliFMDEnergyFitter object
115 virtual AliFMDEnergyFitter& GetEnergyFitter() = 0;
117 * Get reference to the SharingFilter algorithm
119 * @return Reference to AliFMDSharingFilter object
121 virtual AliFMDSharingFilter& GetSharingFilter() = 0;
123 * Get reference to the DensityCalculator algorithm
125 * @return Reference to AliFMDDensityCalculator object
127 virtual AliFMDDensityCalculator& GetDensityCalculator() = 0;
129 * Get reference to the Corrections algorithm
131 * @return Reference to AliFMDCorrector object
133 virtual AliFMDCorrector& GetCorrections() = 0;
135 * Get reference to the HistCollector algorithm
137 * @return Reference to AliFMDHistCollector object
139 virtual AliFMDHistCollector& GetHistCollector() = 0;
141 * Get reference to the EventInspector algorithm
143 * @return Reference to AliFMDEventInspector object
145 virtual const AliFMDEventInspector& GetEventInspector() const = 0;
147 * Get reference to the EnergyFitter algorithm
149 * @return Reference to AliFMDEnergyFitter object
151 virtual const AliFMDEnergyFitter& GetEnergyFitter() const = 0;
153 * Get reference to the SharingFilter algorithm
155 * @return Reference to AliFMDSharingFilter object
157 virtual const AliFMDSharingFilter& GetSharingFilter() const = 0;
159 * Get reference to the DensityCalculator algorithm
161 * @return Reference to AliFMDDensityCalculator object
163 virtual const AliFMDDensityCalculator& GetDensityCalculator() const = 0;
165 * Get reference to the Corrections algorithm
167 * @return Reference to AliFMDCorrector object
169 virtual const AliFMDCorrector& GetCorrections() const = 0;
171 * Get reference to the HistCollector algorithm
173 * @return Reference to AliFMDHistCollector object
175 virtual const AliFMDHistCollector& GetHistCollector() const = 0;
179 virtual void SetDebug(Int_t dbg) = 0;
184 * @param name Name of task
186 AliForwardMultiplicityBase(const char* name)
187 : AliAnalysisTaskSE(name),
188 fEnableLowFlux(true),
194 AliForwardMultiplicityBase() : AliAnalysisTaskSE(),
195 fEnableLowFlux(true),
201 * @param o Object to copy from
203 AliForwardMultiplicityBase(const AliForwardMultiplicityBase& o)
204 : AliAnalysisTaskSE(o),
205 fEnableLowFlux(o.fEnableLowFlux),
206 fFirstEvent(o.fFirstEvent)
209 * Assignment operator
211 * @param o Object to assign from
213 * @return Reference to this object
215 AliForwardMultiplicityBase& operator=(const AliForwardMultiplicityBase& o)
217 fEnableLowFlux = o.fEnableLowFlux;
218 fFirstEvent = o.fFirstEvent;
222 * Check if all needed corrections are there and accounted for. If not,
225 * @param what Which corrections is needed
227 * @return true if all present, false otherwise
229 Bool_t CheckCorrections(UInt_t what) const;
234 virtual Bool_t ReadCorrections(const TAxis*& pe, const TAxis*& pv);
236 * Get the ESD event. IF this is the first event, initialise
238 virtual AliESDEvent* GetESDEvent();
240 * Initialise the sub objects and stuff. Called on first event
243 virtual void InitializeSubs() = 0;
245 * Mark this event as one to store in the AOD
248 virtual void MarkEventForStore() const;
250 Bool_t fEnableLowFlux;// Whether to use low-flux specific code
251 Bool_t fFirstEvent; // Whether the event is the first seen
253 ClassDef(AliForwardMultiplicityBase,1) // Forward multiplicity class