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 * Called before processing a single event - should not do anything
68 * but clear data, etc.
70 * @return true on success
72 virtual Bool_t PreEvent();
76 * @param esd ESD event
78 virtual Bool_t Event(AliESDEvent& esd);
83 * Process only primary MC tracks
87 void SetOnlyPrimary(Bool_t use);
90 * @name Access to sub-algorithms
93 * Get reference to the EventInspector algorithm
95 * @return Reference to AliFMDEventInspector object
97 AliFMDEventInspector& GetEventInspector() { return fEventInspector; }
99 * Get reference to the SharingFilter algorithm
101 * @return Reference to AliFMDSharingFilter object
103 AliFMDSharingFilter& GetSharingFilter() { return fSharingFilter; }
105 * Get reference to the DensityCalculator algorithm
107 * @return Reference to AliFMDDensityCalculator object
109 AliFMDDensityCalculator& GetDensityCalculator() { return fDensityCalculator; }
111 * Get reference to the Corrections algorithm
113 * @return Reference to AliFMDCorrector object
115 AliFMDCorrector& GetCorrections() { return fCorrections; }
117 * Get reference to the HistCollector algorithm
119 * @return Reference to AliFMDHistCollector object
121 AliFMDHistCollector& GetHistCollector() { return fHistCollector; }
123 * Get reference to the EventInspector algorithm
125 * @return Reference to AliFMDEventInspector object
127 const AliFMDEventInspector& GetEventInspector() const { return fEventInspector; }
129 * Get reference to the SharingFilter algorithm
131 * @return Reference to AliFMDSharingFilter object
133 const AliFMDSharingFilter& GetSharingFilter() const { return fSharingFilter; }
135 * Get reference to the DensityCalculator algorithm
137 * @return Reference to AliFMDDensityCalculator object
139 const AliFMDDensityCalculator& GetDensityCalculator() const { return fDensityCalculator; }
141 * Get reference to the Corrections algorithm
143 * @return Reference to AliFMDCorrector object
145 const AliFMDCorrector& GetCorrections() const { return fCorrections; }
147 * Get reference to the HistCollector algorithm
149 * @return Reference to AliFMDHistCollector object
151 const AliFMDHistCollector& GetHistCollector() const { return fHistCollector; }
153 * Get reference to the EventPlaneFinder algorithm
155 * @return Reference to AliFMDEventPlaneFinder object
157 AliFMDEventPlaneFinder& GetEventPlaneFinder() { return fEventPlaneFinder; }
159 * Get reference to the EventPlaneFinder algorithm
161 * @return Reference to AliFMDEventPlaneFinder object
163 const AliFMDEventPlaneFinder& GetEventPlaneFinder() const { return fEventPlaneFinder; }
171 * @param o Object to copy from
173 AliForwardMCMultiplicityTask(const AliForwardMCMultiplicityTask& o);
175 * Assignment operator
177 * @param o Object to assign from
179 * @return Reference to this object
181 AliForwardMCMultiplicityTask&
182 operator=(const AliForwardMCMultiplicityTask& o);
184 * Initialize members based on eta and vertex axis - only available
185 * after first event - called from SetupForData.
187 * @param pe @f$\eta@f$ axis
188 * @param pv Interaction point Z-coordinate axis
190 virtual void InitMembers(const TAxis& pe, const TAxis& pv);
192 * Create output branches - called from UserCreateOutputObjects
194 virtual void CreateBranches(AliAODHandler* ah);
196 * Do estimates of @f$dN/d\eta@f$ - called at Terminate
198 * @param input Input list
199 * @param output Output list
201 virtual void EstimatedNdeta(const TList* input, TList* output) const;
203 AliESDFMD fESDFMD; // Sharing corrected ESD object
204 AliESDFMD fMCESDFMD; // MC 'Sharing corrected' ESD object
205 AliForwardUtil::Histos fMCHistos; // MC Cache histograms
206 AliAODForwardMult fMCAODFMD; // MC Output object
207 AliForwardUtil::Histos fMCRingSums; // Cache histograms
208 TH2D* fPrimary; // Per event primary particles
210 AliFMDMCEventInspector fEventInspector; // Algorithm
211 AliFMDMCSharingFilter fSharingFilter; // Algorithm
212 AliFMDMCDensityCalculator fDensityCalculator; // Algorithm
213 AliFMDMCCorrector fCorrections; // Algorithm
214 AliFMDHistCollector fHistCollector; // Algorithm
215 AliFMDEventPlaneFinder fEventPlaneFinder; // Algorithm
217 ClassDef(AliForwardMCMultiplicityTask,4) // Forward multiplicity class