]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/FORWARD/analysis2/AliForwardMultiplicityBase.h
9e1cd1494f82bd856ebbe4f4ec56696fc2b49e4c
[u/mrichter/AliRoot.git] / PWG2 / FORWARD / analysis2 / AliForwardMultiplicityBase.h
1 #ifndef ALIFORWARDMULTIPLICITYBASE_H
2 #define ALIFORWARDMULTIPLICITYBASE_H
3 #include <AliAnalysisTaskSE.h>
4 #include "AliForwardUtil.h"
5 // #include "AliFMDEventInspector.h"
6 // #include "AliFMDEnergyFitter.h"
7 // #include "AliFMDSharingFilter.h"
8 // #include "AliFMDDensityCalculator.h"
9 // #include "AliFMDCorrections.h"
10 // #include "AliFMDHistCollector.h"
11 // #include "AliAODForwardMult.h"
12 // #include "AliFMDEnergyFitter.h"
13 // #include <AliESDFMD.h>
14 // #include <TH1I.h>
15 class AliFMDEventInspector;
16 class AliFMDEnergyFitter;
17 class AliFMDSharingFilter;
18 class AliFMDDensityCalculator;
19 class AliFMDCorrections;
20 class AliFMDHistCollector;
21 class AliESDEvent;
22 class TH2D;
23 class TList;
24 class TTree;
25
26
27 /** 
28  * @mainpage ALICE PWG2 Forward Multiplcity Analysis 
29  */
30 /** 
31  * @defgroup pwg2_forward PWG2 Forward analysis
32  *
33  * Code to do the multiplicity analysis in the forward psuedo-rapidity
34  * regions
35  *
36  */
37 /** 
38  * @defgroup pwg2_forward_tasks Tasks
39  *
40  * Code to do the multiplicity analysis in the forward psuedo-rapidity
41  * regions
42  *
43  * @ingroup pwg2_forward 
44  */
45 /** 
46  * Calculate the multiplicity in the forward regions event-by-event 
47  * 
48  * @par Inputs: 
49  *   - AliESDEvent 
50  *
51  * @par Outputs: 
52  *   - AliAODForwardMult 
53  * 
54  * @par Histograms 
55  *   
56  * @par Corrections used 
57  * 
58  * @ingroup pwg2_forward_tasks
59  * 
60  */
61 class AliForwardMultiplicityBase : public AliAnalysisTaskSE
62 {
63 public:
64   /** 
65    * @{ 
66    * @name Interface methods 
67    */
68   /** 
69    * Initialize the task 
70    * 
71    */
72   virtual void Init() { fFirstEvent = true; }
73   /** 
74    * Create output objects 
75    * 
76    */
77   virtual void UserCreateOutputObjects() = 0;
78   /** 
79    * Process each event 
80    *
81    * @param option Not used
82    */  
83   virtual void UserExec(Option_t* option) = 0;
84   /** 
85    * End of job
86    * 
87    * @param option Not used 
88    */
89   virtual void Terminate(Option_t* option) = 0;
90   /** 
91    * @} 
92    */
93   /** 
94    * Print information 
95    * 
96    * @param option Not used
97    */
98   virtual void Print(Option_t* option="") const;
99   /** 
100    * Whether to enable low-flux code 
101    * 
102    * @param use IF true, enable low-flux code 
103    */
104   virtual void SetEnableLowFlux(Bool_t use=true) { fEnableLowFlux = use; }
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   virtual AliFMDEventInspector& GetEventInspector() = 0;
115   /**
116    * Get reference to the EnergyFitter algorithm 
117    * 
118    * @return Reference to AliFMDEnergyFitter object 
119    */
120   virtual AliFMDEnergyFitter& GetEnergyFitter() = 0;
121   /**
122    * Get reference to the SharingFilter algorithm 
123    * 
124    * @return Reference to AliFMDSharingFilter object 
125    */
126   virtual AliFMDSharingFilter& GetSharingFilter() = 0;
127   /**
128    * Get reference to the DensityCalculator algorithm 
129    * 
130    * @return Reference to AliFMDDensityCalculator object 
131    */
132   virtual AliFMDDensityCalculator& GetDensityCalculator() = 0;
133   /**
134    * Get reference to the Corrections algorithm 
135    * 
136    * @return Reference to AliFMDCorrections object 
137    */
138   virtual AliFMDCorrections& GetCorrections() = 0;
139   /**
140    * Get reference to the HistCollector algorithm 
141    * 
142    * @return Reference to AliFMDHistCollector object 
143    */
144   virtual AliFMDHistCollector& GetHistCollector() = 0;
145   /** 
146    * @} 
147    */
148   virtual void SetDebug(Int_t dbg) = 0;
149 protected: 
150   /** 
151    * Constructor 
152    * 
153    * @param name Name of task 
154    */
155   AliForwardMultiplicityBase(const char* name) 
156     : AliAnalysisTaskSE(name), 
157       fEnableLowFlux(true), 
158       fFirstEvent(true)
159   {}
160   /** 
161    * Constructor
162    */
163   AliForwardMultiplicityBase() : AliAnalysisTaskSE(), 
164       fEnableLowFlux(true), 
165       fFirstEvent(true)
166   {}
167   /** 
168    * Copy constructor 
169    * 
170    * @param o Object to copy from 
171    */
172   AliForwardMultiplicityBase(const AliForwardMultiplicityBase& o)
173     : AliAnalysisTaskSE(o),
174       fEnableLowFlux(o.fEnableLowFlux), 
175       fFirstEvent(o.fFirstEvent)
176   {}
177   /** 
178    * Assignment operator 
179    * 
180    * @param o Object to assign from 
181    * 
182    * @return Reference to this object 
183    */
184   AliForwardMultiplicityBase& operator=(const AliForwardMultiplicityBase& o)
185   {
186     fEnableLowFlux = o.fEnableLowFlux;
187     fFirstEvent    = o.fFirstEvent;
188     return *this;
189   }
190   /** 
191    * Mark this event as one to store in the AOD 
192    * 
193    */
194   virtual void MarkEventForStore() const;
195
196   Bool_t                 fEnableLowFlux;// Whether to use low-flux specific code
197   Bool_t                 fFirstEvent;   // Whether the event is the first seen 
198
199   ClassDef(AliForwardMultiplicityBase,1) // Forward multiplicity class
200 };
201
202 #endif
203 // Local Variables:
204 //  mode: C++
205 // End:
206