2 // Base class for classes that calculate the multiplicity in the
3 // forward regions event-by-event
5 #ifndef ALIFORWARDMULTIPLICITYBASE_H
6 #define ALIFORWARDMULTIPLICITYBASE_H
8 * @file AliForwardMultiplicityBase.h
9 * @author Christian Holm Christensen <cholm@dalsgaard.hehi.nbi.dk>
10 * @date Wed Mar 23 14:06:29 2011
15 * @ingroup pwglf_forward_aod
17 #include "AliBaseESDTask.h"
18 #include "AliForwardUtil.h"
19 #include "AliAODForwardMult.h"
20 #include "AliAODForwardEP.h"
21 // class AliFMDEnergyFitter;
22 class AliFMDSharingFilter;
23 class AliFMDDensityCalculator;
24 class AliFMDCorrector;
25 class AliFMDHistCollector;
26 class AliFMDEventPlaneFinder;
36 * @defgroup pwglf_forward PWGLF Forward analysis
38 * Code to do the multiplicity analysis in the forward psuedo-rapidity
43 * @defgroup pwglf_forward_tasks Tasks
45 * Code to do the multiplicity analysis in the forward psuedo-rapidity
48 * @ingroup pwglf_forward
51 * @defgroup pwglf_forward_topical Topical
53 * The code divided according to topic
56 * @defgroup pwglf_forward_aod AOD
58 * Code to do with AOD production
60 * @ingroup pwglf_forward_topical
63 * Base class for classes that calculate the multiplicity in the
64 * forward regions event-by-event
74 * @par Corrections used
76 * @ingroup pwglf_forward_tasks
77 * @ingroup pwglf_forward_aod
80 class AliForwardMultiplicityBase : public AliBaseESDTask
84 kTimingEventInspector = 1,
85 kTimingSharingFilter = 2,
86 kTimingDensityCalculator = 3,
87 kTimingCorrections = 4,
88 kTimingHistCollector = 5,
89 kTimingEventPlaneFinder = 6,
94 * @name Interface methods
97 * Create output objects
99 * @return true on success
101 virtual Bool_t Book();
103 * Initialise the sub objects and stuff. Called on first event
105 * @param vertex Vertex axis to use
106 * @param eta Eta axis to use
108 * @return false on errors
110 virtual Bool_t PreData(const TAxis& vertex, const TAxis& eta);
114 * @return true on success
116 virtual Bool_t Finalize();
123 * @param option Not used
125 virtual void Print(Option_t* option="") const;
127 * Set whether to make a timing histogram
131 virtual void SetDoTiming(Bool_t enable=true) { fDoTiming = enable; }
133 * Whether to enable low-flux code
135 * @param use IF true, enable low-flux code
137 virtual void SetEnableLowFlux(Bool_t use=true) { fEnableLowFlux = use; }
140 * @name Access to sub-algorithms
143 * Get reference to the SharingFilter algorithm
145 * @return Reference to AliFMDSharingFilter object
147 virtual AliFMDSharingFilter& GetSharingFilter() = 0;
149 * Get reference to the DensityCalculator algorithm
151 * @return Reference to AliFMDDensityCalculator object
153 virtual AliFMDDensityCalculator& GetDensityCalculator() = 0;
155 * Get reference to the Corrections algorithm
157 * @return Reference to AliFMDCorrector object
159 virtual AliFMDCorrector& GetCorrections() = 0;
161 * Get reference to the HistCollector algorithm
163 * @return Reference to AliFMDHistCollector object
165 virtual AliFMDHistCollector& GetHistCollector() = 0;
167 * Get reference to the SharingFilter algorithm
169 * @return Reference to AliFMDSharingFilter object
171 virtual const AliFMDSharingFilter& GetSharingFilter() const = 0;
173 * Get reference to the DensityCalculator algorithm
175 * @return Reference to AliFMDDensityCalculator object
177 virtual const AliFMDDensityCalculator& GetDensityCalculator() const = 0;
179 * Get reference to the Corrections algorithm
181 * @return Reference to AliFMDCorrector object
183 virtual const AliFMDCorrector& GetCorrections() const = 0;
185 * Get reference to the HistCollector algorithm
187 * @return Reference to AliFMDHistCollector object
189 virtual const AliFMDHistCollector& GetHistCollector() const = 0;
191 * Get reference to the EventPlaneFinder algorithm
193 * @return Reference to AliFMDEventPlaneFinder object
195 virtual AliFMDEventPlaneFinder& GetEventPlaneFinder() = 0;
197 * Get reference to the EventPlaneFinder algorithm
199 * @return Reference to AliFMDEventPlaneFinder object
201 virtual const AliFMDEventPlaneFinder& GetEventPlaneFinder() const = 0;
205 * Set the debug level
209 virtual void SetDebug(Int_t dbg);
211 * Set whether to make separate branches for each ring. If enabled
212 * there will be 5 additional branches on the AOD tree - each
213 * holding a TH2D object of the charged particle multiplicity in
214 * @f$(\eta,\varphi)@f$ bins for that event.
216 * @param use If true, make separate branches for each ring.
218 void SetStorePerRing(Bool_t use) { fStorePerRing = use; }
223 * @param name Name of task
225 AliForwardMultiplicityBase(const char* name);
229 AliForwardMultiplicityBase()
231 fEnableLowFlux(true),
232 fStorePerRing(false),
244 * @param o Object to copy from
246 AliForwardMultiplicityBase(const AliForwardMultiplicityBase& o);
248 * Assignment operator
250 * @param o Object to assign from
252 * @return Reference to this object
254 AliForwardMultiplicityBase& operator=(const AliForwardMultiplicityBase& o);
256 * Initialize members based on eta and vertex axis - only available
257 * after first event - called from SetupForData.
259 * @param pe @f$\eta@f$ axis
260 * @param pv Interaction point Z-coordinate axis
262 virtual void InitMembers(const TAxis& pe, const TAxis& pv);
264 * Create output branches - called from UserCreateOutputObjects
266 virtual void CreateBranches(AliAODHandler* ah);
268 * Do estimates of @f$dN/d\eta@f$ - called at Terminate
270 * @param input Input list
271 * @param output Output list
273 virtual void EstimatedNdeta(const TList* input, TList* output) const;
275 * Calculate a simple dN/deta from all accepted events
277 * @param input Input list
278 * @param output Output list
279 * @param nTr On return, number of triggers
280 * @param nTrVtx On return, number of trigger+vertex events
281 * @param nAcc On return, number of accepted events
283 * @return true on success
285 virtual Bool_t MakeSimpledNdeta(const TList* input,
291 * Make Ring @f$ dN/d\eta @f$ histogram and a stack
293 * @param input List with summed signals
294 * @param output Output list
295 * @param inName Input name
296 * @param outName Output name
299 virtual void MakeRingdNdeta(const TList* input,
303 Int_t style=20) const;
304 TAxis* DefaultEtaAxis() const { return new TAxis(200,-4,6); }
305 TAxis* DefaultVertexAxis() const { return new TAxis(10,-10,10); }
306 Bool_t fEnableLowFlux;// Whether to use low-flux specific code
307 Bool_t fStorePerRing; // Store each ring on separate branch
308 TH2D* fHData; // Summed 1/Nd^2N_{ch}/dphideta
309 AliForwardUtil::Histos fHistos; // Cache histograms
310 AliAODForwardMult fAODFMD; // Output object
311 AliAODForwardEP fAODEP; // Output object
312 AliForwardUtil::Histos fRingSums; // Cache histograms
313 Bool_t fDoTiming; // Whether to do timing or not
316 ClassDef(AliForwardMultiplicityBase,5) // Forward multiplicity class