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;
23 class AliFMDSharingFilter;
24 class AliFMDDensityCalculator;
25 class AliFMDCorrector;
26 class AliFMDHistCollector;
27 class AliFMDEventPlaneFinder;
37 * @defgroup pwglf_forward PWGLF Forward analysis
39 * Code to do the multiplicity analysis in the forward psuedo-rapidity
44 * @defgroup pwglf_forward_tasks Tasks
46 * Code to do the multiplicity analysis in the forward psuedo-rapidity
49 * @ingroup pwglf_forward
52 * @defgroup pwglf_forward_topical Topical
54 * The code divided according to topic
57 * @defgroup pwglf_forward_aod AOD
59 * Code to do with AOD production
61 * @ingroup pwglf_forward_topical
64 * Base class for classes that calculate the multiplicity in the
65 * forward regions event-by-event
75 * @par Corrections used
77 * @ingroup pwglf_forward_tasks
78 * @ingroup pwglf_forward_aod
81 class AliForwardMultiplicityBase : public AliBaseESDTask
85 kTimingEventInspector = 1,
86 kTimingSharingFilter = 2,
87 kTimingDensityCalculator = 3,
88 kTimingCorrections = 4,
89 kTimingHistCollector = 5,
90 kTimingEventPlaneFinder = 6,
95 * @name Interface methods
98 * Create output objects
100 * @return true on success
102 virtual Bool_t Book();
104 * Initialise the sub objects and stuff. Called on first event
106 * @param vertex Vertex axis to use
107 * @param eta Eta axis to use
109 * @return false on errors
111 virtual Bool_t PreData(const TAxis& vertex, const TAxis& eta);
113 * Called after processing a single event - should not do anything
114 * but clear data, etc.
116 * @return true on success
118 virtual Bool_t PostEvent();
122 * @return true on success
124 virtual Bool_t Finalize();
131 * @param option Not used
133 virtual void Print(Option_t* option="") const;
135 * Set whether to make a timing histogram
139 virtual void SetDoTiming(Bool_t enable=true) { fDoTiming = enable; }
141 * Whether to enable low-flux code
143 * @param use IF true, enable low-flux code
145 virtual void SetEnableLowFlux(Bool_t use=true) { fEnableLowFlux = use; }
148 * @name Access to sub-algorithms
151 * Get reference to the ESDFixer algorithm
153 * @return Reference to AliFMDESDFixer object
155 virtual AliFMDESDFixer& GetESDFixer() = 0;
157 * Get reference to the SharingFilter algorithm
159 * @return Reference to AliFMDSharingFilter object
161 virtual AliFMDSharingFilter& GetSharingFilter() = 0;
163 * Get reference to the DensityCalculator algorithm
165 * @return Reference to AliFMDDensityCalculator object
167 virtual AliFMDDensityCalculator& GetDensityCalculator() = 0;
169 * Get reference to the Corrections algorithm
171 * @return Reference to AliFMDCorrector object
173 virtual AliFMDCorrector& GetCorrections() = 0;
175 * Get reference to the HistCollector algorithm
177 * @return Reference to AliFMDHistCollector object
179 virtual AliFMDHistCollector& GetHistCollector() = 0;
181 * Get reference to the ESDFixer algorithm
183 * @return Reference to AliFMDESDFixer object
185 virtual const AliFMDESDFixer& GetESDFixer() const = 0;
187 * Get reference to the SharingFilter algorithm
189 * @return Reference to AliFMDSharingFilter object
191 virtual const AliFMDSharingFilter& GetSharingFilter() const = 0;
193 * Get reference to the DensityCalculator algorithm
195 * @return Reference to AliFMDDensityCalculator object
197 virtual const AliFMDDensityCalculator& GetDensityCalculator() const = 0;
199 * Get reference to the Corrections algorithm
201 * @return Reference to AliFMDCorrector object
203 virtual const AliFMDCorrector& GetCorrections() const = 0;
205 * Get reference to the HistCollector algorithm
207 * @return Reference to AliFMDHistCollector object
209 virtual const AliFMDHistCollector& GetHistCollector() const = 0;
211 * Get reference to the EventPlaneFinder algorithm
213 * @return Reference to AliFMDEventPlaneFinder object
215 virtual AliFMDEventPlaneFinder& GetEventPlaneFinder() = 0;
217 * Get reference to the EventPlaneFinder algorithm
219 * @return Reference to AliFMDEventPlaneFinder object
221 virtual const AliFMDEventPlaneFinder& GetEventPlaneFinder() const = 0;
225 * Set the debug level
229 virtual void SetDebug(Int_t dbg);
231 * Set whether to make separate branches for each ring. If enabled
232 * there will be 5 additional branches on the AOD tree - each
233 * holding a TH2D object of the charged particle multiplicity in
234 * @f$(\eta,\varphi)@f$ bins for that event.
236 * @param use If true, make separate branches for each ring.
238 void SetStorePerRing(Bool_t use) { fStorePerRing = use; }
240 * For which triggers to add internally
242 * @param mask Trigger mask as defined in AliAODForwardMult
244 void SetAddMask(UInt_t mask) { fAddMask = mask; }
249 * @param name Name of task
251 AliForwardMultiplicityBase(const char* name);
255 AliForwardMultiplicityBase()
257 fEnableLowFlux(true),
258 fStorePerRing(false),
267 fAddMask(AliAODForwardMult::kInel)
272 * @param o Object to copy from
274 AliForwardMultiplicityBase(const AliForwardMultiplicityBase& o);
276 * Assignment operator
278 * @param o Object to assign from
280 * @return Reference to this object
282 AliForwardMultiplicityBase& operator=(const AliForwardMultiplicityBase& o);
284 * Initialize members based on eta and vertex axis - only available
285 * after first event - called from SetupForData.
287 * @param pe @f$\eta@f$ axis
288 * @param pv Interaction point Z-coordinate axis
290 virtual void InitMembers(const TAxis& pe, const TAxis& pv);
292 * Create output branches - called from UserCreateOutputObjects
294 virtual void CreateBranches(AliAODHandler* ah);
296 * Do estimates of @f$dN/d\eta@f$ - called at Terminate
298 * @param input Input list
299 * @param output Output list
301 virtual void EstimatedNdeta(const TList* input, TList* output) const;
303 * Calculate a simple dN/deta from all accepted events
305 * @param input Input list
306 * @param output Output list
307 * @param nTr On return, number of triggers
308 * @param nTrVtx On return, number of trigger+vertex events
309 * @param nAcc On return, number of accepted events
311 * @return true on success
313 virtual Bool_t MakeSimpledNdeta(const TList* input,
319 * Make Ring @f$ dN/d\eta @f$ histogram and a stack
321 * @param input List with summed signals
322 * @param output Output list
323 * @param inName Input name
324 * @param outName Output name
327 virtual void MakeRingdNdeta(const TList* input,
331 Int_t style=20) const;
332 TAxis* DefaultEtaAxis() const { return new TAxis(200,-4,6); }
333 TAxis* DefaultVertexAxis() const { return new TAxis(10,-10,10); }
334 Bool_t fEnableLowFlux;// Whether to use low-flux specific code
335 Bool_t fStorePerRing; // Store each ring on separate branch
336 TH2D* fHData; // Summed 1/Nd^2N_{ch}/dphideta
337 AliForwardUtil::Histos fHistos; // Cache histograms
338 AliAODForwardMult fAODFMD; // Output object
339 AliAODForwardEP fAODEP; // Output object
340 AliForwardUtil::Histos fRingSums; // Cache histograms
341 Bool_t fDoTiming; // Whether to do timing or not
342 TProfile* fHTiming; // Timing histogram
343 TH1* fHStatus; // Status histogram
344 UInt_t fAddMask; // For which triggers to add internally
345 ClassDef(AliForwardMultiplicityBase,6) // Forward multiplicity class