1 // Histogram and fit the energy loss distributions for the FMD
3 // Wraps AliFMDEnergyFitter
4 #ifndef ALIFMDENERGYFITTERTASK_H
5 #define ALIFMDENERGYFITTERTASK_H
7 * @file AliFMDEnergyFitterTask.h
8 * @author Christian Holm Christensen <cholm@dalsgaard.hehi.nbi.dk>
9 * @date Wed Mar 23 14:02:39 2011
13 * @ingroup pwglf_forward_eloss
16 #include "AliBaseESDTask.h"
17 #include "AliFMDEventInspector.h"
18 #include "AliFMDEnergyFitter.h"
19 #include "AliFMDESDFixer.h"
27 * Histogram and fit the energy loss distributions for the FMD
37 * @par Corrections used
40 * @ingroup pwglf_forward_tasks
41 * @ingroup pwglf_forward_eloss
44 class AliFMDEnergyFitterTask : public AliBaseESDTask
50 * @param name Name of task
52 AliFMDEnergyFitterTask(const char* name);
56 AliFMDEnergyFitterTask();
59 * @name Interface methods
62 * Called on master when setting up the train.
66 virtual Bool_t Setup();
68 * Book output objects. Derived class should define this to book
69 * output objects on the processing output list @c fList before the
70 * actual event processing. This is called on the master and on
73 * If this member function returns false, the execution is stopped
74 * with a fatal signal.
76 * @return true on success.
78 virtual Bool_t Book();
80 * Called on first event _before_ reading corrections. Here, the
81 * user class can do additional checking to see if the some (more or
82 * less) corrections are needed.
86 virtual void PreCorrections(const AliESDEvent* esd);
88 * Called after reading in the first event. Here we can setup stuff
89 * depending on the conditions we're running under.
91 * @return true on success. If this returns false, then we turn the
92 * task into a zombie and we do no more processing.
94 virtual Bool_t PreData(const TAxis& vertex, const TAxis& eta);
98 * @param esd Event to analyse
99 * @return true on success
101 virtual Bool_t Event(AliESDEvent& esd);
105 * @return true on success
107 virtual Bool_t Finalize();
114 * @param option Not used
116 void Print(Option_t* option="") const;
119 * @name Access to sub-algorithms
122 * Get reference to the EventInspector algorithm
124 * @return Reference to AliFMDEventInspector object
126 AliFMDEventInspector& GetEventInspector() { return fEventInspector; }
128 * Get reference to the EventInspector algorithm
130 * @return Reference to AliFMDEventInspector object
132 const AliFMDEventInspector& GetEventInspector() const{return fEventInspector;}
134 * Get reference to the ESDFixer algorithm
136 * @return Reference to AliFMDESDFixer object
138 AliFMDESDFixer& GetESDFixer() { return fESDFixer; }
140 * Get reference to the EnergyFitter algorithm
142 * @return Reference to AliFMDEnergyFitter object
144 AliFMDEnergyFitter& GetEnergyFitter() { return fEnergyFitter; }
153 * Set the debug level
155 * @param dbg Debug level
157 void SetDebug(Int_t dbg);
159 * Set whether to only look at MB (INEL) data, so as to avoid
160 * bias from different trigger scalars.
162 * @param onlyMB if true, only analyse MB events
164 void SetOnlyMB(Bool_t onlyMB) { fOnlyMB = onlyMB; }
171 * Set the default eta axis to use in case we didn't get one from
172 * the read-in corretions. Override this if the sub class should go
173 * on even without a valid eta axis from the corrections (e.g. QA
178 virtual TAxis* DefaultEtaAxis() const;
180 * Set the default eta axis to use in case we didn't get one from
181 * the read-in corretions. Override this if the sub class should go
182 * on even without a valid eta axis from the corrections (e.g. QA
187 virtual TAxis* DefaultVertexAxis() const;
193 * @param o Object to copy from
195 AliFMDEnergyFitterTask(const AliFMDEnergyFitterTask& o);
197 * Assignment operator
199 * @param o Object to assign from
201 * @return Reference to this object
203 AliFMDEnergyFitterTask& operator=(const AliFMDEnergyFitterTask& o);
205 virtual const char* DefaultConfig() const { return "elossFitConfig.C"; }
207 AliFMDEventInspector fEventInspector; // Algorithm
208 AliFMDESDFixer fESDFixer; // Algorithm
209 AliFMDEnergyFitter fEnergyFitter; // Algorithm
210 Bool_t fOnlyMB; // Only MB flag
212 ClassDef(AliFMDEnergyFitterTask,4) // Forward multiplicity class