]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGLF/FORWARD/analysis2/AliForwardMultiplicityTask.h
Renamed some member functions for more logical names
[u/mrichter/AliRoot.git] / PWGLF / FORWARD / analysis2 / AliForwardMultiplicityTask.h
1 // 
2 // Calculate the multiplicity in the forward regions event-by-event 
3 // 
4 #ifndef ALIFORWARDMULTIPLICITYTASK_H
5 #define ALIFORWARDMULTIPLICITYTASK_H
6 /**
7  * @file   AliForwardMultiplicityTask.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 "AliForwardMultiplicityBase.h"
17 #include "AliForwardUtil.h"
18 #include "AliFMDEventInspector.h"
19 #include "AliFMDSharingFilter.h"
20 #include "AliFMDDensityCalculator.h"
21 #include "AliFMDCorrector.h"
22 #include "AliFMDHistCollector.h"
23 #include "AliAODForwardMult.h"
24 #include "AliAODForwardEP.h"
25 #include "AliFMDEnergyFitter.h"
26 #include "AliFMDEventPlaneFinder.h"
27 #include <AliESDFMD.h>
28 class AliESDEvent;
29 class TH2D;
30 class TList;
31
32 /** 
33  * Calculate the multiplicity in the forward regions event-by-event 
34  * 
35  * @par Inputs: 
36  *   - AliESDEvent 
37  *
38  * @par Outputs: 
39  *   - AliAODForwardMult 
40  * 
41  * @par Histograms 
42  *   
43  * @par Corrections used 
44  * 
45  * @ingroup pwglf_forward_tasks
46  * @ingroup pwglf_forward_aod
47  * 
48  */
49 class AliForwardMultiplicityTask : public AliForwardMultiplicityBase
50 {
51 public:
52   /** 
53    * Constructor 
54    * 
55    * @param name Name of task 
56    */
57   AliForwardMultiplicityTask(const char* name);
58   /** 
59    * Constructor
60    */
61   AliForwardMultiplicityTask();
62   /** 
63    * Copy constructor 
64    * 
65    * @param o Object to copy from 
66    */
67   AliForwardMultiplicityTask(const AliForwardMultiplicityTask& o);
68   /** 
69    * Assignment operator 
70    * 
71    * @param o Object to assign from 
72    * 
73    * @return Reference to this object 
74    */
75   AliForwardMultiplicityTask& operator=(const AliForwardMultiplicityTask& o);
76   /** 
77    * @{ 
78    * @name Interface methods 
79    */
80   /** 
81    * Create output objects 
82    * 
83    */
84   virtual void UserCreateOutputObjects();
85   /** 
86    * Process each event 
87    *
88    * @param option Not used
89    */  
90   virtual void UserExec(Option_t* option);
91   /** 
92    * Called on the slaves when the job has finished. 
93    * 
94    */
95   virtual void FinishTaskOutput();
96   /** 
97    * End of job
98    * 
99    * @param option Not used 
100    */
101   virtual void Terminate(Option_t* option);
102   /** 
103    * @} 
104    */
105   /** 
106    * @{ 
107    * @name Access to sub-algorithms 
108    */
109   /**
110    * Get reference to the EventInspector algorithm 
111    * 
112    * @return Reference to AliFMDEventInspector object 
113    */
114   AliFMDEventInspector& GetEventInspector() { return fEventInspector; }
115   /**
116    * Get reference to the SharingFilter algorithm 
117    * 
118    * @return Reference to AliFMDSharingFilter object 
119    */
120   AliFMDSharingFilter& GetSharingFilter() { return fSharingFilter; }
121   /**
122    * Get reference to the DensityCalculator algorithm 
123    * 
124    * @return Reference to AliFMDDensityCalculator object 
125    */
126   AliFMDDensityCalculator& GetDensityCalculator() { return fDensityCalculator; }
127   /**
128    * Get reference to the Corrections algorithm 
129    * 
130    * @return Reference to AliFMDCorrector object 
131    */
132   AliFMDCorrector& GetCorrections() { return fCorrections; }
133   /**
134    * Get reference to the HistCollector algorithm 
135    * 
136    * @return Reference to AliFMDHistCollector object 
137    */
138   AliFMDHistCollector& GetHistCollector() { return fHistCollector; }
139   /**
140    * Get reference to the EventInspector algorithm 
141    * 
142    * @return Reference to AliFMDEventInspector object 
143    */
144   const AliFMDEventInspector& GetEventInspector() const { return fEventInspector; }
145   /**
146    * Get reference to the SharingFilter algorithm 
147    * 
148    * @return Reference to AliFMDSharingFilter object 
149    */
150   const AliFMDSharingFilter& GetSharingFilter() const { return fSharingFilter; }
151   /**
152    * Get reference to the DensityCalculator algorithm 
153    * 
154    * @return Reference to AliFMDDensityCalculator object 
155    */
156   const AliFMDDensityCalculator& GetDensityCalculator() const { return fDensityCalculator; }
157   /**
158    * Get reference to the Corrections algorithm 
159    * 
160    * @return Reference to AliFMDCorrector object 
161    */
162   const AliFMDCorrector& GetCorrections() const { return fCorrections; }
163   /**
164    * Get reference to the HistCollector algorithm 
165    * 
166    * @return Reference to AliFMDHistCollector object 
167    */
168   const AliFMDHistCollector& GetHistCollector() const { return fHistCollector; }
169  /**
170    * Get reference to the EventPlaneFinder algorithm 
171    * 
172    * @return Reference to AliFMDEventPlaneFinder object 
173    */
174   AliFMDEventPlaneFinder& GetEventPlaneFinder() { return fEventPlaneFinder; }
175   /**
176    * Get reference to the EventPlaneFinder algorithm 
177    * 
178    * @return Reference to AliFMDEventPlaneFinder object 
179    */
180   const AliFMDEventPlaneFinder& GetEventPlaneFinder() const { return fEventPlaneFinder; }
181   /** 
182    * @} 
183    */
184
185   /** 
186    * Set debug level 
187    * 
188    * @param dbg Debug level
189    */
190   void SetDebug(Int_t dbg);
191 protected: 
192   /** 
193    * Initialise the sub objects and stuff.  Called on first event 
194    * 
195    * @return false on errors 
196    */
197   virtual Bool_t SetupForData();
198
199   TH2D*                  fHData;        // Summed 1/Nd^2N_{ch}/dphideta
200   AliESDFMD              fESDFMD;       // Sharing corrected ESD object
201   AliForwardUtil::Histos fHistos;       // Cache histograms 
202   AliAODForwardMult      fAODFMD;       // Output object
203   AliAODForwardEP        fAODEP;        // Output object
204   AliForwardUtil::Histos fRingSums;     // Cache histograms 
205
206   AliFMDEventInspector    fEventInspector;    // Algorithm
207   AliFMDSharingFilter     fSharingFilter;     // Algorithm
208   AliFMDDensityCalculator fDensityCalculator; // Algorithm
209   AliFMDCorrector         fCorrections;       // Algorithm
210   AliFMDHistCollector     fHistCollector;     // Algorithm
211   AliFMDEventPlaneFinder  fEventPlaneFinder;  // Algorithm
212
213   TList* fList; // Output list 
214
215   ClassDef(AliForwardMultiplicityTask,2) // Forward multiplicity class
216 };
217
218 #endif
219 // Local Variables:
220 //  mode: C++
221 // End:
222