]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGLF/FORWARD/analysis2/AliFMDEnergyFitterTask.h
Fixes, AOD merge now uses AODConfig
[u/mrichter/AliRoot.git] / PWGLF / FORWARD / analysis2 / AliFMDEnergyFitterTask.h
1 // Histogram and fit the energy loss distributions for the FMD
2 // 
3 // Wraps AliFMDEnergyFitter 
4 #ifndef ALIFMDENERGYFITTERTASK_H
5 #define ALIFMDENERGYFITTERTASK_H
6 /**
7  * @file   AliFMDEnergyFitterTask.h
8  * @author Christian Holm Christensen <cholm@dalsgaard.hehi.nbi.dk>
9  * @date   Wed Mar 23 14:02:39 2011
10  * 
11  * @brief  
12  * 
13  * @ingroup pwglf_forward_eloss
14  * 
15  */
16 #include "AliBaseESDTask.h"
17 #include "AliFMDEventInspector.h"
18 #include "AliFMDEnergyFitter.h"
19 #include "AliFMDESDFixer.h"
20 class AliESDEvent;
21 class TH2D;
22 class TList;
23 class TTree;
24
25
26 /** 
27  * Histogram and fit the energy loss distributions for the FMD
28  * 
29  * @par Inputs: 
30  *   - AliESDEvent 
31  *
32  * @par Outputs: 
33  *   - None
34  * 
35  * @par Histograms 
36  *   
37  * @par Corrections used 
38  *   - None
39  * 
40  * @ingroup pwglf_forward_tasks
41  * @ingroup pwglf_forward_eloss
42  * 
43  */
44 class AliFMDEnergyFitterTask : public AliBaseESDTask
45 {
46 public:
47   /** 
48    * Constructor 
49    * 
50    * @param name Name of task 
51    */
52   AliFMDEnergyFitterTask(const char* name);
53   /** 
54    * Constructor
55    */
56   AliFMDEnergyFitterTask();
57   /** 
58    * @{ 
59    * @name Interface methods 
60    */
61   /** 
62    * Called on master when setting up the train. 
63    * 
64    * @return Always true 
65    */
66   virtual Bool_t Setup();
67   /** 
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
71    * each slave.
72    * 
73    * If this member function returns false, the execution is stopped
74    * with a fatal signal.
75    *
76    * @return true on success. 
77    */
78   virtual Bool_t Book();
79   /** 
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.
83    * 
84    * @param esd Event 
85    */
86   virtual void PreCorrections(const AliESDEvent* esd);
87   /** 
88    * Called after reading in the first event. Here we can setup stuff
89    * depending on the conditions we're running under.
90    * 
91    * @return true on success.  If this returns false, then we turn the
92    * task into a zombie and we do no more processing.
93    */
94   virtual Bool_t PreData(const TAxis& vertex, const TAxis& eta);
95   /** 
96    * Process each event 
97    *
98    * @param esd Event to analyse
99    * @return true on success
100    */  
101   virtual Bool_t Event(AliESDEvent& esd);
102   /** 
103    * End of job
104    * 
105    * @return true on success
106    */
107   virtual Bool_t Finalize();
108   /** 
109    * @} 
110    */
111   /** 
112    * Print information 
113    * 
114    * @param option Not used
115    */
116   void Print(Option_t* option="") const;
117   /** 
118    * @{ 
119    * @name Access to sub-algorithms 
120    */
121   /**
122    * Get reference to the EventInspector algorithm 
123    * 
124    * @return Reference to AliFMDEventInspector object 
125    */
126   AliFMDEventInspector& GetEventInspector() { return fEventInspector; }
127   /**
128    * Get reference to the EventInspector algorithm 
129    * 
130    * @return Reference to AliFMDEventInspector object 
131    */
132   const AliFMDEventInspector& GetEventInspector() const{return fEventInspector;}
133   /**
134    * Get reference to the ESDFixer algorithm 
135    * 
136    * @return Reference to AliFMDESDFixer object 
137    */
138   AliFMDESDFixer& GetESDFixer() { return fESDFixer; }
139   /**
140    * Get reference to the EnergyFitter algorithm 
141    * 
142    * @return Reference to AliFMDEnergyFitter object 
143    */
144   AliFMDEnergyFitter& GetEnergyFitter() { return fEnergyFitter; }
145   /** 
146    * @} 
147    */
148   /** 
149    * @{ 
150    * @name Settings 
151    */
152   /** 
153    * Set the debug level 
154    * 
155    * @param dbg Debug level
156    */
157   void SetDebug(Int_t dbg);
158   /** 
159    * Set whether to only look at MB (INEL) data, so as to avoid 
160    * bias from different trigger scalars. 
161    * 
162    * @param onlyMB if true, only analyse MB events
163    */
164   void SetOnlyMB(Bool_t onlyMB) { fOnlyMB = onlyMB; }
165   /* @} */
166   /** 
167    * @{ 
168    * @name Default axes 
169    */
170   /** 
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
174    * task)
175    * 
176    * @return null
177    */
178   virtual TAxis* DefaultEtaAxis() const;
179   /** 
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
183    * task)
184    * 
185    * @return null
186    */
187   virtual TAxis* DefaultVertexAxis() const;
188   /* @} */
189 protected: 
190   /** 
191    * Copy constructor 
192    * 
193    * @param o Object to copy from 
194    */
195   AliFMDEnergyFitterTask(const AliFMDEnergyFitterTask& o);
196   /** 
197    * Assignment operator 
198    * 
199    * @param o Object to assign from 
200    * 
201    * @return Reference to this object 
202    */
203   AliFMDEnergyFitterTask& operator=(const AliFMDEnergyFitterTask& o);
204
205   virtual const char* DefaultConfig() const { return "elossFitConfig.C"; }
206
207   AliFMDEventInspector fEventInspector; // Algorithm
208   AliFMDESDFixer       fESDFixer;       // Algorithm
209   AliFMDEnergyFitter   fEnergyFitter;   // Algorithm
210   Bool_t               fOnlyMB;         // Only MB flag
211
212   ClassDef(AliFMDEnergyFitterTask,4) // Forward multiplicity class
213 };
214
215 #endif
216 // Local Variables:
217 //  mode: C++
218 // End:
219