]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGLF/FORWARD/analysis2/AliForwardMCMultiplicityTask.h
Modified QA script to allow creating QA results (Sans energy loss)
[u/mrichter/AliRoot.git] / PWGLF / FORWARD / analysis2 / AliForwardMCMultiplicityTask.h
1 // 
2 // Calculate the multiplicity in the forward regions event-by-event 
3 // 
4 #ifndef ALIFORWARDMCMULTIPLICITYTASK_H
5 #define ALIFORWARDMCMULTIPLICITYTASK_H
6 /**
7  * @file   AliForwardMCMultiplicityTask.h
8  * @author Christian Holm Christensen <cholm@dalsgaard.hehi.nbi.dk>
9  * @date   Wed Mar 23 14:06:13 2011
10  * 
11  * @brief  
12  * 
13  * 
14  * @ingroup pwglf_forward_aod
15  */
16 #include "AliForwardMultiplicityBase.h"
17 #include "AliFMDMCEventInspector.h"
18 #include "AliFMDESDFixer.h"
19 #include "AliFMDMCSharingFilter.h"
20 #include "AliFMDMCDensityCalculator.h"
21 #include "AliFMDMCCorrector.h"
22 #include "AliFMDHistCollector.h"
23 // #include "AliFMDEnergyFitter.h"
24 #include "AliFMDEventPlaneFinder.h"
25 #include <AliESDFMD.h>
26 class AliESDEvent;
27 class TH2D;
28 class TList;
29
30 /** 
31  * Calculate the multiplicity in the forward regions event-by-event 
32  * 
33  * @par Inputs: 
34  *   - AliESDEvent 
35  *   - Kinematics
36  *   - Track references
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_mc
47  * @ingroup pwglf_forward_aod
48  * 
49  */
50 class AliForwardMCMultiplicityTask : public AliForwardMultiplicityBase
51 {
52 public:
53   /** 
54    * Constructor 
55    * 
56    * @param name Name of task 
57    */
58   AliForwardMCMultiplicityTask(const char* name);
59   /** 
60    * Constructor
61    */
62   AliForwardMCMultiplicityTask();
63   /** 
64    * @{ 
65    * @name Interface methods 
66    */
67   /** 
68    * Book output objects. Derived class should define this to book
69    * output objects on the processing output list @c fList before the
70    * actual event processing.  This is called on the master and on
71    * each slave.
72    * 
73    * If this member function returns false, the execution is stopped
74    * with a fatal signal.
75    *
76    * @return true on success. 
77    */
78   virtual Bool_t Book();
79   /** 
80    * Called before processing a single event - should not do anything
81    * but clear data, etc.
82    * 
83    * @return true on success
84    */
85   virtual Bool_t PreEvent();
86   /** 
87    * Process each event 
88    *
89    * @param esd ESD event
90    */  
91   virtual Bool_t Event(AliESDEvent& esd);
92   /** 
93    * Called after processing a single event - should not do anything
94    * but clear data, etc.
95    * 
96    * @return true on success
97    */
98   virtual Bool_t PostEvent();
99   /* 
100    * @} 
101    */
102   /** 
103    * Process only primary MC tracks 
104    * 
105    * @param use 
106    */
107   void SetOnlyPrimary(Bool_t use);
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 ESDFixer algorithm 
120    * 
121    * @return Reference to AliFMDESDFixer object 
122    */
123   AliFMDESDFixer& GetESDFixer() { return fESDFixer; }
124   /**
125    * Get reference to the SharingFilter algorithm 
126    * 
127    * @return Reference to AliFMDSharingFilter object 
128    */
129   AliFMDSharingFilter& GetSharingFilter() { return fSharingFilter; }
130   /**
131    * Get reference to the DensityCalculator algorithm 
132    * 
133    * @return Reference to AliFMDDensityCalculator object 
134    */
135   AliFMDDensityCalculator& GetDensityCalculator() { return fDensityCalculator; }
136   /**
137    * Get reference to the Corrections algorithm 
138    * 
139    * @return Reference to AliFMDCorrector object 
140    */
141   AliFMDCorrector& GetCorrections() { return fCorrections; }
142   /**
143    * Get reference to the HistCollector algorithm 
144    * 
145    * @return Reference to AliFMDHistCollector object 
146    */
147   AliFMDHistCollector& GetHistCollector() { return fHistCollector; }
148   /**
149    * Get reference to the EventInspector algorithm 
150    * 
151    * @return Reference to AliFMDEventInspector object 
152    */
153   const AliFMDEventInspector& GetEventInspector() const { return fEventInspector; }
154   /**
155    * Get reference to the ESDFixer algorithm 
156    * 
157    * @return Reference to AliFMDESDFixer object 
158    */
159   const AliFMDESDFixer& GetESDFixer() const { return fESDFixer; }
160   /**
161    * Get reference to the SharingFilter algorithm 
162    * 
163    * @return Reference to AliFMDSharingFilter object 
164    */
165   const AliFMDSharingFilter& GetSharingFilter() const { return fSharingFilter; }
166   /**
167    * Get reference to the DensityCalculator algorithm 
168    * 
169    * @return Reference to AliFMDDensityCalculator object 
170    */
171   const AliFMDDensityCalculator& GetDensityCalculator() const { return fDensityCalculator; }
172   /**
173    * Get reference to the Corrections algorithm 
174    * 
175    * @return Reference to AliFMDCorrector object 
176    */
177   const AliFMDCorrector& GetCorrections() const { return fCorrections; }
178   /**
179    * Get reference to the HistCollector algorithm 
180    * 
181    * @return Reference to AliFMDHistCollector object 
182    */
183   const AliFMDHistCollector& GetHistCollector() const { return fHistCollector; }
184    /**
185    * Get reference to the EventPlaneFinder algorithm 
186    * 
187    * @return Reference to AliFMDEventPlaneFinder object 
188    */
189   AliFMDEventPlaneFinder& GetEventPlaneFinder() { return fEventPlaneFinder; }
190   /**
191    * Get reference to the EventPlaneFinder algorithm 
192    * 
193    * @return Reference to AliFMDEventPlaneFinder object 
194    */
195   const AliFMDEventPlaneFinder& GetEventPlaneFinder() const { return fEventPlaneFinder; }
196   /** 
197    * @} 
198    */
199 protected: 
200   /** 
201    * Copy constructor 
202    * 
203    * @param o Object to copy from 
204    */
205   AliForwardMCMultiplicityTask(const AliForwardMCMultiplicityTask& o);
206   /** 
207    * Assignment operator 
208    * 
209    * @param o Object to assign from 
210    * 
211    * @return Reference to this object 
212    */
213   AliForwardMCMultiplicityTask& 
214   operator=(const AliForwardMCMultiplicityTask& o);
215   /** 
216    * Initialize members based on eta and vertex axis - only available
217    * after first event - called from SetupForData.
218    * 
219    * @param pe @f$\eta@f$ axis
220    * @param pv Interaction point Z-coordinate axis 
221    */
222   virtual void InitMembers(const TAxis& pe, const TAxis& pv);
223   /**
224    * Create output branches - called from UserCreateOutputObjects
225    */
226   virtual void CreateBranches(AliAODHandler* ah);
227   /** 
228    * Do estimates of @f$dN/d\eta@f$ - called at Terminate
229    * 
230    * @param input  Input list
231    * @param output Output list
232    */
233   virtual void EstimatedNdeta(const TList* input, TList* output) const;
234
235   AliESDFMD              fESDFMD;       // Sharing corrected ESD object
236   AliESDFMD              fMCESDFMD;     // MC 'Sharing corrected' ESD object
237   AliForwardUtil::Histos fMCHistos;     // MC Cache histograms 
238   AliAODForwardMult      fMCAODFMD;     // MC Output object
239   AliForwardUtil::Histos fMCRingSums;   // Cache histograms 
240   TH2D*                  fPrimary;      // Per event primary particles 
241
242   AliFMDMCEventInspector    fEventInspector;    // Algorithm
243   AliFMDESDFixer            fESDFixer;          // Algorithm
244   AliFMDMCSharingFilter     fSharingFilter;     // Algorithm
245   AliFMDMCDensityCalculator fDensityCalculator; // Algorithm
246   AliFMDMCCorrector         fCorrections;       // Algorithm
247   AliFMDHistCollector       fHistCollector;     // Algorithm
248   AliFMDEventPlaneFinder    fEventPlaneFinder;  // Algorithm
249
250   ClassDef(AliForwardMCMultiplicityTask,4) // Forward multiplicity class
251 };
252
253 #endif
254 // Local Variables:
255 //  mode: C++
256 // End:
257