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"
26 * Histogram and fit the energy loss distributions for the FMD
36 * @par Corrections used
39 * @ingroup pwglf_forward_tasks
40 * @ingroup pwglf_forward_eloss
43 class AliFMDEnergyFitterTask : public AliBaseESDTask
49 * @param name Name of task
51 AliFMDEnergyFitterTask(const char* name);
55 AliFMDEnergyFitterTask();
58 * @name Interface methods
61 * Called on master when setting up 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);
89 * @param esd Event to analyse
90 * @return true on success
92 virtual Bool_t Event(AliESDEvent& esd);
96 * @return true on success
98 virtual Bool_t Finalize();
105 * @param option Not used
107 void Print(Option_t* option="") const;
110 * @name Access to sub-algorithms
113 * Get reference to the EventInspector algorithm
115 * @return Reference to AliFMDEventInspector object
117 AliFMDEventInspector& GetEventInspector() { return fEventInspector; }
119 * Get reference to the EventInspector algorithm
121 * @return Reference to AliFMDEventInspector object
123 const AliFMDEventInspector& GetEventInspector() const{return fEventInspector;}
125 * Get reference to the EnergyFitter algorithm
127 * @return Reference to AliFMDEnergyFitter object
129 AliFMDEnergyFitter& GetEnergyFitter() { return fEnergyFitter; }
138 * Set the debug level
140 * @param dbg Debug level
142 void SetDebug(Int_t dbg);
144 * Set whether to only look at MB (INEL) data, so as to avoid
145 * bias from different trigger scalars.
147 * @param onlyMB if true, only analyse MB events
149 void SetOnlyMB(Bool_t onlyMB) { fOnlyMB = onlyMB; }
156 * Set the default eta axis to use in case we didn't get one from
157 * the read-in corretions. Override this if the sub class should go
158 * on even without a valid eta axis from the corrections (e.g. QA
163 virtual TAxis* DefaultEtaAxis() const;
165 * Set the default eta axis to use in case we didn't get one from
166 * the read-in corretions. Override this if the sub class should go
167 * on even without a valid eta axis from the corrections (e.g. QA
172 virtual TAxis* DefaultVertexAxis() const;
178 * @param o Object to copy from
180 AliFMDEnergyFitterTask(const AliFMDEnergyFitterTask& o);
182 * Assignment operator
184 * @param o Object to assign from
186 * @return Reference to this object
188 AliFMDEnergyFitterTask& operator=(const AliFMDEnergyFitterTask& o);
190 AliFMDEventInspector fEventInspector; // Algorithm
191 AliFMDEnergyFitter fEnergyFitter; // Algorithm
192 Bool_t fOnlyMB; // Only MB flag
194 ClassDef(AliFMDEnergyFitterTask,4) // Forward multiplicity class