2 // Calculate the qa in the forward regions event-by-event
4 #ifndef ALIFORWARDQATASK_H
5 #define ALIFORWARDQATASK_H
7 * @file AliForwardQATask.h
8 * @author Christian Holm Christensen <cholm@dalsgaard.hehi.nbi.dk>
9 * @date Wed Mar 23 14:06:42 2011
14 * @ingroup pwglf_forward_aod
16 #include "AliBaseESDTask.h"
17 #include "AliFMDEventInspector.h"
18 #include "AliFMDESDFixer.h"
19 #include "AliFMDSharingFilter.h"
20 #include "AliFMDDensityCalculator.h"
21 #include "AliFMDEnergyFitter.h"
22 #include <AliESDFMD.h>
28 * Calculate the QA in the forward regions
38 * @par Corrections used
40 * @ingroup pwglf_forward_tasks
43 class AliForwardQATask : public AliBaseESDTask
49 * @param name Name of task
51 AliForwardQATask(const char* name);
58 * @name Interface methods
61 * Called when initialising the train.
65 virtual Bool_t Setup();
67 * Book output objects. Derived class should define this to book
68 * output objects on the processing output list @c fList before the
69 * actual event processing. This is called on the master and on
72 * If this member function returns false, the execution is stopped
73 * with a fatal signal.
75 * @return true on success.
77 virtual Bool_t Book();
79 * Called after reading in the first event. Here we can setup stuff
80 * depending on the conditions we're running under.
82 * @return true on success. If this returns false, then we turn the
83 * task into a zombie and we do no more processing.
85 virtual Bool_t PreData(const TAxis& vertex, const TAxis& eta);
88 * Called before processing a single event - should not do anything
89 * but clear data, etc.
91 * @return true on success
93 virtual Bool_t PreEvent();
99 * @return true on success
101 virtual Bool_t Event(AliESDEvent& esd);
105 * @return true on success
107 virtual Bool_t Finalize();
116 * Set the default eta axis to use in case we didn't get one from
117 * the read-in corretions. Override this if the sub class should go
118 * on even without a valid eta axis from the corrections (e.g. QA
123 virtual TAxis* DefaultEtaAxis() const;
125 * Set the default eta axis to use in case we didn't get one from
126 * the read-in corretions. Override this if the sub class should go
127 * on even without a valid eta axis from the corrections (e.g. QA
132 virtual TAxis* DefaultVertexAxis() const;
136 * @name Access to sub-algorithms
139 * Get reference to the EventInspector algorithm
141 * @return Reference to AliFMDEventInspector object
143 AliFMDEventInspector& GetEventInspector() { return fEventInspector; }
145 * Get reference to the ESDFixer algorithm
147 * @return Reference to AliFMDESDFixer object
149 AliFMDESDFixer& GetESDFixer() { return fESDFixer; }
151 * Get reference to the EnergyFitter algorithm
153 * @return Reference to AliFMDEnergyFitter object
155 AliFMDEnergyFitter& GetEnergyFitter() { return fEnergyFitter; }
157 * Get reference to the SharingFilter algorithm
159 * @return Reference to AliFMDSharingFilter object
161 AliFMDSharingFilter& GetSharingFilter() { return fSharingFilter; }
163 * Get reference to the DensityCalculator algorithm
165 * @return Reference to AliFMDDensityCalculator object
167 AliFMDDensityCalculator& GetDensityCalculator() { return fDensityCalculator; }
169 * Get reference to the EventInspector algorithm
171 * @return Reference to AliFMDEventInspector object
173 const AliFMDEventInspector& GetEventInspector() const { return fEventInspector; }
175 * Get reference to the ESDFixer algorithm
177 * @return Reference to AliFMDESDFixer object
179 const AliFMDESDFixer& GetESDFixer() const { return fESDFixer; }
181 * Get reference to the EnergyFitter algorithm
183 * @return Reference to AliFMDEnergyFitter object
185 const AliFMDEnergyFitter& GetEnergyFitter() const { return fEnergyFitter; }
187 * Get reference to the SharingFilter algorithm
189 * @return Reference to AliFMDSharingFilter object
191 const AliFMDSharingFilter& GetSharingFilter() const { return fSharingFilter; }
193 * Get reference to the DensityCalculator algorithm
195 * @return Reference to AliFMDDensityCalculator object
197 const AliFMDDensityCalculator& GetDensityCalculator() const { return fDensityCalculator; }
204 * @param dbg Debug level
206 void SetDebug(Int_t dbg);
210 * @param option Not used
212 void Print(Option_t* option="") const;
217 * @param o Object to copy from
219 AliForwardQATask(const AliForwardQATask& o);
221 * Assignment operator
223 * @param o Object to assign from
225 * @return Reference to this object
227 AliForwardQATask& operator=(const AliForwardQATask& o);
229 Bool_t fEnableLowFlux;// Whether to use low-flux code
230 AliESDFMD fESDFMD; // Sharing corrected ESD object
231 AliForwardUtil::Histos fHistos; // Cache histograms
232 AliFMDEventInspector fEventInspector; // Algorithm
233 AliFMDESDFixer fESDFixer; // Algorithm
234 AliFMDEnergyFitter fEnergyFitter; // Algorithm
235 AliFMDSharingFilter fSharingFilter; // Algorithm
236 AliFMDDensityCalculator fDensityCalculator; // Algorithm
238 ClassDef(AliForwardQATask,4) // Forward QA class