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 "AliFMDSharingFilter.h"
19 #include "AliFMDDensityCalculator.h"
20 #include "AliFMDEnergyFitter.h"
21 #include <AliESDFMD.h>
27 * Calculate the QA in the forward regions
37 * @par Corrections used
39 * @ingroup pwglf_forward_tasks
42 class AliForwardQATask : public AliBaseESDTask
48 * @param name Name of task
50 AliForwardQATask(const char* name);
57 * @name Interface methods
60 * Called when initialising the train.
64 virtual Bool_t Setup();
66 * Book output objects. Derived class should define this to book
67 * output objects on the processing output list @c fList before the
68 * actual event processing. This is called on the master and on
71 * If this member function returns false, the execution is stopped
72 * with a fatal signal.
74 * @return true on success.
76 virtual Bool_t Book();
78 * Called after reading in the first event. Here we can setup stuff
79 * depending on the conditions we're running under.
81 * @return true on success. If this returns false, then we turn the
82 * task into a zombie and we do no more processing.
84 virtual Bool_t PreData(const TAxis& vertex, const TAxis& eta);
87 * Called before processing a single event - should not do anything
88 * but clear data, etc.
90 * @return true on success
92 virtual Bool_t PreEvent();
98 * @return true on success
100 virtual Bool_t Event(AliESDEvent& esd);
104 * @return true on success
106 virtual Bool_t Finalize();
115 * Set the default eta axis to use in case we didn't get one from
116 * the read-in corretions. Override this if the sub class should go
117 * on even without a valid eta axis from the corrections (e.g. QA
122 virtual TAxis* DefaultEtaAxis() const;
124 * Set the default eta axis to use in case we didn't get one from
125 * the read-in corretions. Override this if the sub class should go
126 * on even without a valid eta axis from the corrections (e.g. QA
131 virtual TAxis* DefaultVertexAxis() const;
135 * @name Access to sub-algorithms
138 * Get reference to the EventInspector algorithm
140 * @return Reference to AliFMDEventInspector object
142 AliFMDEventInspector& GetEventInspector() { return fEventInspector; }
144 * Get reference to the EnergyFitter algorithm
146 * @return Reference to AliFMDEnergyFitter object
148 AliFMDEnergyFitter& GetEnergyFitter() { return fEnergyFitter; }
150 * Get reference to the SharingFilter algorithm
152 * @return Reference to AliFMDSharingFilter object
154 AliFMDSharingFilter& GetSharingFilter() { return fSharingFilter; }
156 * Get reference to the DensityCalculator algorithm
158 * @return Reference to AliFMDDensityCalculator object
160 AliFMDDensityCalculator& GetDensityCalculator() { return fDensityCalculator; }
162 * Get reference to the EventInspector algorithm
164 * @return Reference to AliFMDEventInspector object
166 const AliFMDEventInspector& GetEventInspector() const { return fEventInspector; }
168 * Get reference to the EnergyFitter algorithm
170 * @return Reference to AliFMDEnergyFitter object
172 const AliFMDEnergyFitter& GetEnergyFitter() const { return fEnergyFitter; }
174 * Get reference to the SharingFilter algorithm
176 * @return Reference to AliFMDSharingFilter object
178 const AliFMDSharingFilter& GetSharingFilter() const { return fSharingFilter; }
180 * Get reference to the DensityCalculator algorithm
182 * @return Reference to AliFMDDensityCalculator object
184 const AliFMDDensityCalculator& GetDensityCalculator() const { return fDensityCalculator; }
191 * @param dbg Debug level
193 void SetDebug(Int_t dbg);
197 * @param option Not used
199 void Print(Option_t* option="") const;
204 * @param o Object to copy from
206 AliForwardQATask(const AliForwardQATask& o);
208 * Assignment operator
210 * @param o Object to assign from
212 * @return Reference to this object
214 AliForwardQATask& operator=(const AliForwardQATask& o);
216 Bool_t fEnableLowFlux;// Whether to use low-flux code
217 AliESDFMD fESDFMD; // Sharing corrected ESD object
218 AliForwardUtil::Histos fHistos; // Cache histograms
219 AliFMDEventInspector fEventInspector; // Algorithm
220 AliFMDEnergyFitter fEnergyFitter; // Algorithm
221 AliFMDSharingFilter fSharingFilter; // Algorithm
222 AliFMDDensityCalculator fDensityCalculator; // Algorithm
224 ClassDef(AliForwardQATask,3) // Forward QA class