2 // Calculate the corrections in the forward regions
4 #ifndef ALIFORWARDMCCORRECTIONS_H
5 #define ALIFORWARDMCCORRECTIONS_H
7 * @file AliForwardMCCorrectionsTask.h
8 * @author Christian Holm Christensen <cholm@dalsgaard.hehi.nbi.dk>
9 * @date Wed Mar 23 14:05:51 2011
14 * @ingroup pwglf_forward_aod
16 #include "AliBaseMCCorrectionsTask.h"
17 #include <AliESDFMD.h>
18 #include "AliFMDMCTrackDensity.h"
19 #include "AliForwardUtil.h"
22 class AliFMDCorrSecondaryMap;
27 * Calculate the simulation-based corrections in the forward regions
29 * @image html alice-int-2012-040-secondary_origin.png "Fraction of secondaries"
32 * - AliESDEvent (for steering only)
38 * - AliFMDCorrSecondaryMap
42 * @par Corrections used
45 * @ingroup pwglf_forward_tasks
46 * @ingroup pwglf_forward_mc
47 * @ingroup pwglf_forward_aod
50 class AliForwardMCCorrectionsTask : public AliBaseMCCorrectionsTask
56 * @param name Name of task
58 AliForwardMCCorrectionsTask(const char* name);
62 AliForwardMCCorrectionsTask();
65 * @name Interface methods
68 * Called before the event processing
70 * @return true on success
72 virtual Bool_t PreEvent();
79 * @param option Not used
81 void Print(Option_t* option="") const;
83 * Get a reference to the track density calculator
85 * @return Reference to the track density calculator
87 AliBaseMCTrackDensity& GetTrackDensity() { return fTrackDensity; }
89 * Get a reference to the track density calculator
91 * @return Reference to the track density calculator
93 const AliBaseMCTrackDensity& GetTrackDensity() const { return fTrackDensity; }
98 * @param o Object to copy from
100 AliForwardMCCorrectionsTask(const AliForwardMCCorrectionsTask& o);
102 * Assignment operator
104 * @param o Object to assign from
106 * @return Reference to this object
108 AliForwardMCCorrectionsTask& operator=(const AliForwardMCCorrectionsTask& o);
113 struct VtxBin : public AliBaseMCCorrectionsTask::VtxBin
122 * @param low Lower @f$v_z@f$ bound
123 * @param high Upper @f$v_z@f$ bound
124 * @param etaAxis @f$\eta@f$ axis to use
126 VtxBin(Double_t low, Double_t high, const TAxis& etaAxis);
130 * @param o Object to copy from
132 VtxBin(const VtxBin& o);
134 * Assignment operator
136 * @param o Object to assign from
138 * @return Reference to this object
140 VtxBin& operator=(const VtxBin& o);
142 * Declare output in passed list
144 * @param list List to put output in
146 TList* CreateOutputObjects(TList* list);
148 * Calculate the background correction
150 * @param hits Summed hits (track-refs)
151 * @param primary Summed primaries
153 * @return Background correction
155 TH2D* MakeBg(const TH2D* hits, const TH2D* primary) const;
159 * @param o List to add output to
161 * @param iVz Vertex bin
162 * @param map Corrections map
164 void Terminate(const TList* i,
167 AliFMDCorrSecondaryMap* map);
169 AliForwardUtil::Histos fHists; // Cache of per-ring histograms
170 ClassDef(VtxBin,2); // Vertex bin
173 * Create a vertex bin
175 * @param low Low cut on @f$IP_{z}@f$
176 * @param high High cut on @f$IP_{z}@f$
178 * @return Newly created vertex bin
180 AliBaseMCCorrectionsTask::VtxBin* CreateVtxBin(Double_t low, Double_t high);
182 * Process an ESD event
184 * @param esd ESD event
186 * @param bin Vertex bin
187 * @param vz @f$IP_{z}@f$
189 * @return true on success
191 Bool_t ProcessESD(const AliESDEvent& esd, const AliMCEvent& mc,
192 AliBaseMCCorrectionsTask::VtxBin& bin,
195 * Create corrections objects and store them in passed list
197 * @param results Output list
199 virtual void CreateCorrections(TList* results);
201 * Do the final processing of a vertex bin
203 * @param bin Vertex bin
204 * @param iVz Vertex bin number
206 * @return true on successd
208 virtual Bool_t FinalizeVtxBin(AliBaseMCCorrectionsTask::VtxBin* bin,
212 AliFMDMCTrackDensity fTrackDensity; // Get the track density
213 AliESDFMD fESDFMD; // Cache object
214 AliFMDCorrSecondaryMap* fSecCorr;
215 ClassDef(AliForwardMCCorrectionsTask,4) // Forward corrections class