]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/FORWARD/analysis2/AliForwardMultiplicityBase.h
Renames and new scripts
[u/mrichter/AliRoot.git] / PWG2 / FORWARD / analysis2 / AliForwardMultiplicityBase.h
1 // 
2 // Base class for classes that calculate the multiplicity in the
3 // forward regions event-by-event
4 // 
5 #ifndef ALIFORWARDMULTIPLICITYBASE_H
6 #define ALIFORWARDMULTIPLICITYBASE_H
7 #include <AliAnalysisTaskSE.h>
8 #include "AliForwardUtil.h"
9 class AliFMDEventInspector;
10 class AliFMDEnergyFitter;
11 class AliFMDSharingFilter;
12 class AliFMDDensityCalculator;
13 class AliFMDCorrector;
14 class AliFMDHistCollector;
15 class AliESDEvent;
16 class TH2D;
17 class TList;
18 class TTree;
19
20
21 /** 
22  * @mainpage ALICE PWG2 Forward Multiplcity Analysis 
23  */
24 /** 
25  * @defgroup pwg2_forward PWG2 Forward analysis
26  *
27  * Code to do the multiplicity analysis in the forward psuedo-rapidity
28  * regions
29  *
30  */
31 /** 
32  * @defgroup pwg2_forward_tasks Tasks
33  *
34  * Code to do the multiplicity analysis in the forward psuedo-rapidity
35  * regions
36  *
37  * @ingroup pwg2_forward 
38  */
39 /** 
40  * Base class for classes that calculate the multiplicity in the
41  * forward regions event-by-event
42  * 
43  * @par Inputs: 
44  *   - AliESDEvent 
45  *
46  * @par Outputs: 
47  *   - AliAODForwardMult 
48  * 
49  * @par Histograms 
50  *   
51  * @par Corrections used 
52  * 
53  * @ingroup pwg2_forward_tasks
54  * 
55  */
56 class AliForwardMultiplicityBase : public AliAnalysisTaskSE
57 {
58 public:
59   /** 
60    * @{ 
61    * @name Interface methods 
62    */
63   /** 
64    * Initialize the task 
65    * 
66    */
67   virtual void Init() { fFirstEvent = true; }
68   /** 
69    * Create output objects 
70    * 
71    */
72   virtual void UserCreateOutputObjects() = 0;
73   /** 
74    * Process each event 
75    *
76    * @param option Not used
77    */  
78   virtual void UserExec(Option_t* option) = 0;
79   /** 
80    * End of job
81    * 
82    * @param option Not used 
83    */
84   virtual void Terminate(Option_t* option) = 0;
85   /** 
86    * @} 
87    */
88   /** 
89    * Print information 
90    * 
91    * @param option Not used
92    */
93   virtual void Print(Option_t* option="") const;
94   /** 
95    * Whether to enable low-flux code 
96    * 
97    * @param use IF true, enable low-flux code 
98    */
99   virtual void SetEnableLowFlux(Bool_t use=true) { fEnableLowFlux = use; }
100   /** 
101    * @{ 
102    * @name Access to sub-algorithms 
103    */
104   /**
105    * Get reference to the EventInspector algorithm 
106    * 
107    * @return Reference to AliFMDEventInspector object 
108    */
109   virtual AliFMDEventInspector& GetEventInspector() = 0;
110   /**
111    * Get reference to the EnergyFitter algorithm 
112    * 
113    * @return Reference to AliFMDEnergyFitter object 
114    */
115   virtual AliFMDEnergyFitter& GetEnergyFitter() = 0;
116   /**
117    * Get reference to the SharingFilter algorithm 
118    * 
119    * @return Reference to AliFMDSharingFilter object 
120    */
121   virtual AliFMDSharingFilter& GetSharingFilter() = 0;
122   /**
123    * Get reference to the DensityCalculator algorithm 
124    * 
125    * @return Reference to AliFMDDensityCalculator object 
126    */
127   virtual AliFMDDensityCalculator& GetDensityCalculator() = 0;
128   /**
129    * Get reference to the Corrections algorithm 
130    * 
131    * @return Reference to AliFMDCorrector object 
132    */
133   virtual AliFMDCorrector& GetCorrections() = 0;
134   /**
135    * Get reference to the HistCollector algorithm 
136    * 
137    * @return Reference to AliFMDHistCollector object 
138    */
139   virtual AliFMDHistCollector& GetHistCollector() = 0;
140   /**
141    * Get reference to the EventInspector algorithm 
142    * 
143    * @return Reference to AliFMDEventInspector object 
144    */
145   virtual const AliFMDEventInspector& GetEventInspector() const = 0;
146   /**
147    * Get reference to the EnergyFitter algorithm 
148    * 
149    * @return Reference to AliFMDEnergyFitter object 
150    */
151   virtual const AliFMDEnergyFitter& GetEnergyFitter() const = 0;
152   /**
153    * Get reference to the SharingFilter algorithm 
154    * 
155    * @return Reference to AliFMDSharingFilter object 
156    */
157   virtual const AliFMDSharingFilter& GetSharingFilter() const = 0;
158   /**
159    * Get reference to the DensityCalculator algorithm 
160    * 
161    * @return Reference to AliFMDDensityCalculator object 
162    */
163   virtual const AliFMDDensityCalculator& GetDensityCalculator() const = 0;
164   /**
165    * Get reference to the Corrections algorithm 
166    * 
167    * @return Reference to AliFMDCorrector object 
168    */
169   virtual const AliFMDCorrector& GetCorrections() const = 0;
170   /**
171    * Get reference to the HistCollector algorithm 
172    * 
173    * @return Reference to AliFMDHistCollector object 
174    */
175   virtual const AliFMDHistCollector& GetHistCollector() const = 0;
176   /** 
177    * @} 
178    */
179   virtual void SetDebug(Int_t dbg) = 0;
180 protected: 
181   /** 
182    * Constructor 
183    * 
184    * @param name Name of task 
185    */
186   AliForwardMultiplicityBase(const char* name) 
187     : AliAnalysisTaskSE(name), 
188       fEnableLowFlux(true), 
189       fFirstEvent(true)
190   {}
191   /** 
192    * Constructor
193    */
194   AliForwardMultiplicityBase() : AliAnalysisTaskSE(), 
195       fEnableLowFlux(true), 
196       fFirstEvent(true)
197   {}
198   /** 
199    * Copy constructor 
200    * 
201    * @param o Object to copy from 
202    */
203   AliForwardMultiplicityBase(const AliForwardMultiplicityBase& o)
204     : AliAnalysisTaskSE(o),
205       fEnableLowFlux(o.fEnableLowFlux), 
206       fFirstEvent(o.fFirstEvent)
207   {}
208   /** 
209    * Assignment operator 
210    * 
211    * @param o Object to assign from 
212    * 
213    * @return Reference to this object 
214    */
215   AliForwardMultiplicityBase& operator=(const AliForwardMultiplicityBase& o)
216   {
217     fEnableLowFlux = o.fEnableLowFlux;
218     fFirstEvent    = o.fFirstEvent;
219     return *this;
220   }
221   /** 
222    * Check if all needed corrections are there and accounted for.  If not,
223    * do a Fatal exit 
224    * 
225    * @param what Which corrections is needed
226    * 
227    * @return true if all present, false otherwise
228    */  
229   Bool_t CheckCorrections(UInt_t what) const;
230   /**
231    * Read corrections
232    *
233    */
234   virtual Bool_t ReadCorrections(const TAxis*& pe, const TAxis*& pv);
235   /**
236    * Get the ESD event. IF this is the first event, initialise
237    */
238   virtual AliESDEvent* GetESDEvent();
239   /** 
240    * Initialise the sub objects and stuff.  Called on first event
241    *
242    */
243   virtual void InitializeSubs() = 0;
244   /**
245    * Mark this event as one to store in the AOD 
246    * 
247    */
248   virtual void MarkEventForStore() const;
249
250   Bool_t                 fEnableLowFlux;// Whether to use low-flux specific code
251   Bool_t                 fFirstEvent;   // Whether the event is the first seen 
252
253   ClassDef(AliForwardMultiplicityBase,1) // Forward multiplicity class
254 };
255
256 #endif
257 // Local Variables:
258 //  mode: C++
259 // End:
260