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