]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGLF/FORWARD/analysis2/AliForwardMCMultiplicityTask.h
Mega commit of many changes to PWGLFforward
[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 "AliFMDMCSharingFilter.h"
19 #include "AliFMDMCDensityCalculator.h"
20 #include "AliFMDMCCorrector.h"
21 #include "AliFMDHistCollector.h"
22 #include "AliFMDEnergyFitter.h"
23 #include "AliFMDEventPlaneFinder.h"
24 #include <AliESDFMD.h>
25 class AliESDEvent;
26 class TH2D;
27 class TList;
28
29 /** 
30  * Calculate the multiplicity in the forward regions event-by-event 
31  * 
32  * @par Inputs: 
33  *   - AliESDEvent 
34  *   - Kinematics
35  *   - Track references
36  *
37  * @par Outputs: 
38  *   - AliAODForwardMult 
39  * 
40  * @par Histograms 
41  *   
42  * @par Corrections used 
43  * 
44  * @ingroup pwglf_forward_tasks
45  * @ingroup pwglf_forward_mc
46  * @ingroup pwglf_forward_aod
47  * 
48  */
49 class AliForwardMCMultiplicityTask : public AliForwardMultiplicityBase
50 {
51 public:
52   /** 
53    * Constructor 
54    * 
55    * @param name Name of task 
56    */
57   AliForwardMCMultiplicityTask(const char* name);
58   /** 
59    * Constructor
60    */
61   AliForwardMCMultiplicityTask();
62   /** 
63    * Copy constructor 
64    * 
65    * @param o Object to copy from 
66    */
67   AliForwardMCMultiplicityTask(const AliForwardMCMultiplicityTask& o);
68   /** 
69    * Assignment operator 
70    * 
71    * @param o Object to assign from 
72    * 
73    * @return Reference to this object 
74    */
75   AliForwardMCMultiplicityTask& 
76   operator=(const AliForwardMCMultiplicityTask& o);
77   /** 
78    * @{ 
79    * @name Interface methods 
80    */
81   /** 
82    * Process each event 
83    *
84    * @param option Not used
85    */  
86   virtual void UserExec(Option_t* option);
87   /** 
88    * @} 
89    */
90   /** 
91    * Process only primary MC tracks 
92    * 
93    * @param use 
94    */
95   void SetOnlyPrimary(Bool_t use);
96   /** 
97    * @{ 
98    * @name Access to sub-algorithms 
99    */
100   /**
101    * Get reference to the EventInspector algorithm 
102    * 
103    * @return Reference to AliFMDEventInspector object 
104    */
105   AliFMDEventInspector& GetEventInspector() { return fEventInspector; }
106   /**
107    * Get reference to the SharingFilter algorithm 
108    * 
109    * @return Reference to AliFMDSharingFilter object 
110    */
111   AliFMDSharingFilter& GetSharingFilter() { return fSharingFilter; }
112   /**
113    * Get reference to the DensityCalculator algorithm 
114    * 
115    * @return Reference to AliFMDDensityCalculator object 
116    */
117   AliFMDDensityCalculator& GetDensityCalculator() { return fDensityCalculator; }
118   /**
119    * Get reference to the Corrections algorithm 
120    * 
121    * @return Reference to AliFMDCorrector object 
122    */
123   AliFMDCorrector& GetCorrections() { return fCorrections; }
124   /**
125    * Get reference to the HistCollector algorithm 
126    * 
127    * @return Reference to AliFMDHistCollector object 
128    */
129   AliFMDHistCollector& GetHistCollector() { return fHistCollector; }
130   /**
131    * Get reference to the EventInspector algorithm 
132    * 
133    * @return Reference to AliFMDEventInspector object 
134    */
135   const AliFMDEventInspector& GetEventInspector() const { return fEventInspector; }
136   /**
137    * Get reference to the SharingFilter algorithm 
138    * 
139    * @return Reference to AliFMDSharingFilter object 
140    */
141   const AliFMDSharingFilter& GetSharingFilter() const { return fSharingFilter; }
142   /**
143    * Get reference to the DensityCalculator algorithm 
144    * 
145    * @return Reference to AliFMDDensityCalculator object 
146    */
147   const AliFMDDensityCalculator& GetDensityCalculator() const { return fDensityCalculator; }
148   /**
149    * Get reference to the Corrections algorithm 
150    * 
151    * @return Reference to AliFMDCorrector object 
152    */
153   const AliFMDCorrector& GetCorrections() const { return fCorrections; }
154   /**
155    * Get reference to the HistCollector algorithm 
156    * 
157    * @return Reference to AliFMDHistCollector object 
158    */
159   const AliFMDHistCollector& GetHistCollector() const { return fHistCollector; }
160    /**
161    * Get reference to the EventPlaneFinder algorithm 
162    * 
163    * @return Reference to AliFMDEventPlaneFinder object 
164    */
165   AliFMDEventPlaneFinder& GetEventPlaneFinder() { return fEventPlaneFinder; }
166   /**
167    * Get reference to the EventPlaneFinder algorithm 
168    * 
169    * @return Reference to AliFMDEventPlaneFinder object 
170    */
171   const AliFMDEventPlaneFinder& GetEventPlaneFinder() const { return fEventPlaneFinder; }
172   /** 
173    * @} 
174    */
175 protected: 
176   /** 
177    * Initialize members based on eta and vertex axis - only available
178    * after first event - called from SetupForData.
179    * 
180    * @param pe @f$\eta@f$ axis
181    * @param pv Interaction point Z-coordinate axis 
182    */
183   virtual void InitMembers(const TAxis* pe, const TAxis* pv);
184   /**
185    * Create output branches - called from UserCreateOutputObjects
186    */
187   virtual void CreateBranches(AliAODHandler* ah);
188   /** 
189    * Do estimates of @f$dN/d\eta@f$ - called at Terminate
190    * 
191    * @param input  Input list
192    * @param output Output list
193    */
194   virtual void EstimatedNdeta(const TList* input, TList* output) const;
195
196   AliESDFMD              fESDFMD;       // Sharing corrected ESD object
197   AliESDFMD              fMCESDFMD;     // MC 'Sharing corrected' ESD object
198   AliForwardUtil::Histos fMCHistos;     // MC Cache histograms 
199   AliAODForwardMult      fMCAODFMD;     // MC Output object
200   AliForwardUtil::Histos fMCRingSums;   // Cache histograms 
201   TH2D*                  fPrimary;      // Per event primary particles 
202
203   AliFMDMCEventInspector    fEventInspector;    // Algorithm
204   AliFMDMCSharingFilter     fSharingFilter;     // Algorithm
205   AliFMDMCDensityCalculator fDensityCalculator; // Algorithm
206   AliFMDMCCorrector         fCorrections;       // Algorithm
207   AliFMDHistCollector       fHistCollector;     // Algorithm
208   AliFMDEventPlaneFinder    fEventPlaneFinder;  // Algorithm
209
210   ClassDef(AliForwardMCMultiplicityTask,4) // Forward multiplicity class
211 };
212
213 #endif
214 // Local Variables:
215 //  mode: C++
216 // End:
217