]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGLF/FORWARD/analysis2/AliForwardQATask.h
Merge branch 'master' into TPCdev
[u/mrichter/AliRoot.git] / PWGLF / FORWARD / analysis2 / AliForwardQATask.h
1 // 
2 // Calculate the qa in the forward regions event-by-event 
3 // 
4 #ifndef ALIFORWARDQATASK_H
5 #define ALIFORWARDQATASK_H
6 /**
7  * @file   AliForwardQATask.h
8  * @author Christian Holm Christensen <cholm@dalsgaard.hehi.nbi.dk>
9  * @date   Wed Mar 23 14:06:42 2011
10  * 
11  * @brief  
12  * 
13  * 
14  * @ingroup pwglf_forward_aod
15  */
16 #include "AliBaseESDTask.h"
17 #include "AliFMDEventInspector.h"
18 #include "AliFMDSharingFilter.h"
19 #include "AliFMDDensityCalculator.h"
20 #include "AliFMDEnergyFitter.h"
21 #include <AliESDFMD.h>
22 class AliESDEvent;
23 class TH2D;
24 class TAxis;
25
26 /** 
27  * Calculate the QA in the forward regions
28  * 
29  * @par Inputs: 
30  *   - AliESDEvent 
31  *
32  * @par Outputs: 
33  *   - Histograms 
34  * 
35  * @par Histograms 
36  *   
37  * @par Corrections used 
38  * 
39  * @ingroup pwglf_forward_tasks
40  * 
41  */
42 class AliForwardQATask : public AliBaseESDTask
43 {
44 public:
45   /** 
46    * Constructor 
47    * 
48    * @param name Name of task 
49    */
50   AliForwardQATask(const char* name);
51   /** 
52    * Constructor
53    */
54   AliForwardQATask();
55   /** 
56    * @{ 
57    * @name Interface methods 
58    */
59   /** 
60    * Called when initialising the train. 
61    * 
62    * @return Always true
63    */
64   virtual Bool_t Setup();
65   /** 
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
69    * each slave.
70    * 
71    * If this member function returns false, the execution is stopped
72    * with a fatal signal.
73    *
74    * @return true on success. 
75    */
76   virtual Bool_t Book();
77   /** 
78    * Called after reading in the first event. Here we can setup stuff
79    * depending on the conditions we're running under.
80    * 
81    * @return true on success.  If this returns false, then we turn the
82    * task into a zombie and we do no more processing.
83    */
84   virtual Bool_t PreData(const TAxis& vertex, const TAxis& eta);
85   
86   /** 
87    * Called before processing a single event - should not do anything
88    * but clear data, etc.
89    * 
90    * @return true on success
91    */
92   virtual Bool_t PreEvent();
93   /** 
94    * Process each event 
95    *
96    * @param esd Event
97    * 
98    * @return true on success
99    */  
100   virtual Bool_t Event(AliESDEvent& esd);
101   /** 
102    * End of job
103    * 
104    * @return true on success
105    */
106   virtual Bool_t Finalize();
107   /** 
108    * @} 
109    */
110   /** 
111    * @{ 
112    * @name Default axes 
113    */
114   /** 
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
118    * task)
119    * 
120    * @return null
121    */
122   virtual TAxis* DefaultEtaAxis() const;
123   /** 
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
127    * task)
128    * 
129    * @return null
130    */
131   virtual TAxis* DefaultVertexAxis() const;
132   /* @} */
133   /** 
134    * @{ 
135    * @name Access to sub-algorithms 
136    */
137   /**
138    * Get reference to the EventInspector algorithm 
139    * 
140    * @return Reference to AliFMDEventInspector object 
141    */
142   AliFMDEventInspector& GetEventInspector() { return fEventInspector; }
143   /**
144    * Get reference to the EnergyFitter algorithm 
145    * 
146    * @return Reference to AliFMDEnergyFitter object 
147    */
148   AliFMDEnergyFitter& GetEnergyFitter() { return fEnergyFitter; }
149   /**
150    * Get reference to the SharingFilter algorithm 
151    * 
152    * @return Reference to AliFMDSharingFilter object 
153    */
154   AliFMDSharingFilter& GetSharingFilter() { return fSharingFilter; }
155   /**
156    * Get reference to the DensityCalculator algorithm 
157    * 
158    * @return Reference to AliFMDDensityCalculator object 
159    */
160   AliFMDDensityCalculator& GetDensityCalculator() { return fDensityCalculator; }
161   /**
162    * Get reference to the EventInspector algorithm 
163    * 
164    * @return Reference to AliFMDEventInspector object 
165    */
166   const AliFMDEventInspector& GetEventInspector() const { return fEventInspector; }
167   /**
168    * Get reference to the EnergyFitter algorithm 
169    * 
170    * @return Reference to AliFMDEnergyFitter object 
171    */
172   const AliFMDEnergyFitter& GetEnergyFitter() const { return fEnergyFitter; }
173   /**
174    * Get reference to the SharingFilter algorithm 
175    * 
176    * @return Reference to AliFMDSharingFilter object 
177    */
178   const AliFMDSharingFilter& GetSharingFilter() const { return fSharingFilter; }
179   /**
180    * Get reference to the DensityCalculator algorithm 
181    * 
182    * @return Reference to AliFMDDensityCalculator object 
183    */
184   const AliFMDDensityCalculator& GetDensityCalculator() const { return fDensityCalculator; }
185   /** 
186    * @} 
187    */
188   /** 
189    * Set debug level 
190    * 
191    * @param dbg Debug level
192    */
193   void SetDebug(Int_t dbg);
194   /** 
195    * Print information 
196    * 
197    * @param option Not used
198    */
199   void Print(Option_t* option="") const;
200 protected: 
201   /** 
202    * Copy constructor 
203    * 
204    * @param o Object to copy from 
205    */
206   AliForwardQATask(const AliForwardQATask& o);
207   /** 
208    * Assignment operator 
209    * 
210    * @param o Object to assign from 
211    * 
212    * @return Reference to this object 
213    */
214   AliForwardQATask& operator=(const AliForwardQATask& o);
215
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
223
224   ClassDef(AliForwardQATask,3) // Forward QA class
225 };
226
227 #endif
228 // Local Variables:
229 //  mode: C++
230 // End:
231