2 // Calculate the multiplicity in the forward regions event-by-event
4 #ifndef ALIFORWARDMCMULTIPLICITYTASK_H
5 #define ALIFORWARDMCMULTIPLICITYTASK_H
7 * @file AliForwardMCMultiplicityTask.h
8 * @author Christian Holm Christensen <cholm@dalsgaard.hehi.nbi.dk>
9 * @date Wed Mar 23 14:06:13 2011
14 * @ingroup pwglf_forward_aod
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>
30 * Calculate the multiplicity in the forward regions event-by-event
42 * @par Corrections used
44 * @ingroup pwglf_forward_tasks
45 * @ingroup pwglf_forward_mc
46 * @ingroup pwglf_forward_aod
49 class AliForwardMCMultiplicityTask : public AliForwardMultiplicityBase
55 * @param name Name of task
57 AliForwardMCMultiplicityTask(const char* name);
61 AliForwardMCMultiplicityTask();
64 * @name Interface methods
67 * Book output objects. Derived class should define this to book
68 * output objects on the processing output list @c fList before the
69 * actual event processing. This is called on the master and on
72 * If this member function returns false, the execution is stopped
73 * with a fatal signal.
75 * @return true on success.
77 virtual Bool_t Book();
79 * Called before processing a single event - should not do anything
80 * but clear data, etc.
82 * @return true on success
84 virtual Bool_t PreEvent();
88 * @param esd ESD event
90 virtual Bool_t Event(AliESDEvent& esd);
92 * Called after processing a single event - should not do anything
93 * but clear data, etc.
95 * @return true on success
97 virtual Bool_t PostEvent();
102 * Process only primary MC tracks
106 void SetOnlyPrimary(Bool_t use);
109 * @name Access to sub-algorithms
112 * Get reference to the EventInspector algorithm
114 * @return Reference to AliFMDEventInspector object
116 AliFMDEventInspector& GetEventInspector() { return fEventInspector; }
118 * Get reference to the SharingFilter algorithm
120 * @return Reference to AliFMDSharingFilter object
122 AliFMDSharingFilter& GetSharingFilter() { return fSharingFilter; }
124 * Get reference to the DensityCalculator algorithm
126 * @return Reference to AliFMDDensityCalculator object
128 AliFMDDensityCalculator& GetDensityCalculator() { return fDensityCalculator; }
130 * Get reference to the Corrections algorithm
132 * @return Reference to AliFMDCorrector object
134 AliFMDCorrector& GetCorrections() { return fCorrections; }
136 * Get reference to the HistCollector algorithm
138 * @return Reference to AliFMDHistCollector object
140 AliFMDHistCollector& GetHistCollector() { return fHistCollector; }
142 * Get reference to the EventInspector algorithm
144 * @return Reference to AliFMDEventInspector object
146 const AliFMDEventInspector& GetEventInspector() const { return fEventInspector; }
148 * Get reference to the SharingFilter algorithm
150 * @return Reference to AliFMDSharingFilter object
152 const AliFMDSharingFilter& GetSharingFilter() const { return fSharingFilter; }
154 * Get reference to the DensityCalculator algorithm
156 * @return Reference to AliFMDDensityCalculator object
158 const AliFMDDensityCalculator& GetDensityCalculator() const { return fDensityCalculator; }
160 * Get reference to the Corrections algorithm
162 * @return Reference to AliFMDCorrector object
164 const AliFMDCorrector& GetCorrections() const { return fCorrections; }
166 * Get reference to the HistCollector algorithm
168 * @return Reference to AliFMDHistCollector object
170 const AliFMDHistCollector& GetHistCollector() const { return fHistCollector; }
172 * Get reference to the EventPlaneFinder algorithm
174 * @return Reference to AliFMDEventPlaneFinder object
176 AliFMDEventPlaneFinder& GetEventPlaneFinder() { return fEventPlaneFinder; }
178 * Get reference to the EventPlaneFinder algorithm
180 * @return Reference to AliFMDEventPlaneFinder object
182 const AliFMDEventPlaneFinder& GetEventPlaneFinder() const { return fEventPlaneFinder; }
190 * @param o Object to copy from
192 AliForwardMCMultiplicityTask(const AliForwardMCMultiplicityTask& o);
194 * Assignment operator
196 * @param o Object to assign from
198 * @return Reference to this object
200 AliForwardMCMultiplicityTask&
201 operator=(const AliForwardMCMultiplicityTask& o);
203 * Initialize members based on eta and vertex axis - only available
204 * after first event - called from SetupForData.
206 * @param pe @f$\eta@f$ axis
207 * @param pv Interaction point Z-coordinate axis
209 virtual void InitMembers(const TAxis& pe, const TAxis& pv);
211 * Create output branches - called from UserCreateOutputObjects
213 virtual void CreateBranches(AliAODHandler* ah);
215 * Do estimates of @f$dN/d\eta@f$ - called at Terminate
217 * @param input Input list
218 * @param output Output list
220 virtual void EstimatedNdeta(const TList* input, TList* output) const;
222 AliESDFMD fESDFMD; // Sharing corrected ESD object
223 AliESDFMD fMCESDFMD; // MC 'Sharing corrected' ESD object
224 AliForwardUtil::Histos fMCHistos; // MC Cache histograms
225 AliAODForwardMult fMCAODFMD; // MC Output object
226 AliForwardUtil::Histos fMCRingSums; // Cache histograms
227 TH2D* fPrimary; // Per event primary particles
229 AliFMDMCEventInspector fEventInspector; // Algorithm
230 AliFMDMCSharingFilter fSharingFilter; // Algorithm
231 AliFMDMCDensityCalculator fDensityCalculator; // Algorithm
232 AliFMDMCCorrector fCorrections; // Algorithm
233 AliFMDHistCollector fHistCollector; // Algorithm
234 AliFMDEventPlaneFinder fEventPlaneFinder; // Algorithm
236 ClassDef(AliForwardMCMultiplicityTask,4) // Forward multiplicity class