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;
15 class AliForwardCorrectionManager;
23 * @mainpage ALICE PWG2 Forward Multiplcity Analysis
26 * @defgroup pwg2_forward PWG2 Forward analysis
28 * Code to do the multiplicity analysis in the forward psuedo-rapidity
33 * @defgroup pwg2_forward_tasks Tasks
35 * Code to do the multiplicity analysis in the forward psuedo-rapidity
38 * @ingroup pwg2_forward
41 * Base class for classes that calculate the multiplicity in the
42 * forward regions event-by-event
52 * @par Corrections used
54 * @ingroup pwg2_forward_tasks
57 class AliForwardMultiplicityBase : public AliAnalysisTaskSE
62 * @name Interface methods
68 virtual void Init() { fFirstEvent = true; }
70 * Create output objects
73 virtual void UserCreateOutputObjects() = 0;
77 * @param option Not used
79 virtual void UserExec(Option_t* option) = 0;
83 * @param option Not used
85 virtual void Terminate(Option_t* option) = 0;
92 * @param option Not used
94 virtual void Print(Option_t* option="") const;
96 * Whether to enable low-flux code
98 * @param use IF true, enable low-flux code
100 virtual void SetEnableLowFlux(Bool_t use=true) { fEnableLowFlux = use; }
103 * @name Access to sub-algorithms
106 * Get reference to the EventInspector algorithm
108 * @return Reference to AliFMDEventInspector object
110 virtual AliFMDEventInspector& GetEventInspector() = 0;
112 * Get reference to the EnergyFitter algorithm
114 * @return Reference to AliFMDEnergyFitter object
116 virtual AliFMDEnergyFitter& GetEnergyFitter() = 0;
118 * Get reference to the SharingFilter algorithm
120 * @return Reference to AliFMDSharingFilter object
122 virtual AliFMDSharingFilter& GetSharingFilter() = 0;
124 * Get reference to the DensityCalculator algorithm
126 * @return Reference to AliFMDDensityCalculator object
128 virtual AliFMDDensityCalculator& GetDensityCalculator() = 0;
130 * Get reference to the Corrections algorithm
132 * @return Reference to AliFMDCorrector object
134 virtual AliFMDCorrector& GetCorrections() = 0;
136 * Get reference to the HistCollector algorithm
138 * @return Reference to AliFMDHistCollector object
140 virtual AliFMDHistCollector& GetHistCollector() = 0;
142 * Get reference to the EventInspector algorithm
144 * @return Reference to AliFMDEventInspector object
146 virtual const AliFMDEventInspector& GetEventInspector() const = 0;
148 * Get reference to the EnergyFitter algorithm
150 * @return Reference to AliFMDEnergyFitter object
152 virtual const AliFMDEnergyFitter& GetEnergyFitter() const = 0;
154 * Get reference to the SharingFilter algorithm
156 * @return Reference to AliFMDSharingFilter object
158 virtual const AliFMDSharingFilter& GetSharingFilter() const = 0;
160 * Get reference to the DensityCalculator algorithm
162 * @return Reference to AliFMDDensityCalculator object
164 virtual const AliFMDDensityCalculator& GetDensityCalculator() const = 0;
166 * Get reference to the Corrections algorithm
168 * @return Reference to AliFMDCorrector object
170 virtual const AliFMDCorrector& GetCorrections() const = 0;
172 * Get reference to the HistCollector algorithm
174 * @return Reference to AliFMDHistCollector object
176 virtual const AliFMDHistCollector& GetHistCollector() const = 0;
180 virtual void SetDebug(Int_t dbg) = 0;
185 * @param name Name of task
187 AliForwardMultiplicityBase(const char* name);
191 AliForwardMultiplicityBase()
192 : AliAnalysisTaskSE(),
193 fEnableLowFlux(true),
200 * @param o Object to copy from
202 AliForwardMultiplicityBase(const AliForwardMultiplicityBase& o)
203 : AliAnalysisTaskSE(o),
204 fEnableLowFlux(o.fEnableLowFlux),
205 fFirstEvent(o.fFirstEvent),
206 fCorrManager(o.fCorrManager)
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;
219 fCorrManager = o.fCorrManager;
223 * Check if all needed corrections are there and accounted for. If not,
226 * @param what Which corrections is needed
228 * @return true if all present, false otherwise
230 Bool_t CheckCorrections(UInt_t what) const;
235 virtual Bool_t ReadCorrections(const TAxis*& pe,
239 * Get the ESD event. IF this is the first event, initialise
241 virtual AliESDEvent* GetESDEvent();
243 * Initialise the sub objects and stuff. Called on first event
246 virtual void InitializeSubs() = 0;
248 * Mark this event as one to store in the AOD
251 virtual void MarkEventForStore() const;
253 Bool_t fEnableLowFlux;// Whether to use low-flux specific code
254 Bool_t fFirstEvent; // Whether the event is the first seen
257 * A pointer to the corrections manager. This is here to make the
258 * corrections manager persistent - that is, when we write the
259 * analysis train to a file (as done in PROOF) we should also write
260 * down the corrections mananger. This pointer ensures that.
263 AliForwardCorrectionManager* fCorrManager; // Pointer to corrections manager
265 ClassDef(AliForwardMultiplicityBase,2) // Forward multiplicity class