]>
Commit | Line | Data |
---|---|---|
7984e5f7 | 1 | // |
2 | // Calculate the corrections in the forward regions | |
3 | // | |
72cc12cd | 4 | #ifndef ALIFORWARDMCCORRECTIONS_H |
5 | #define ALIFORWARDMCCORRECTIONS_H | |
ffca499d | 6 | /** |
7 | * @file AliForwardMCCorrectionsTask.h | |
8 | * @author Christian Holm Christensen <cholm@dalsgaard.hehi.nbi.dk> | |
9 | * @date Wed Mar 23 14:05:51 2011 | |
10 | * | |
11 | * @brief | |
12 | * | |
13 | * | |
bd6f5206 | 14 | * @ingroup pwglf_forward_aod |
ffca499d | 15 | */ |
c8b1a7db | 16 | #include "AliBaseMCCorrectionsTask.h" |
563a673f | 17 | #include <AliESDFMD.h> |
a5249a18 | 18 | #include "AliFMDMCTrackDensity.h" |
c8b1a7db | 19 | #include "AliForwardUtil.h" |
563a673f | 20 | #include <TH1I.h> |
563a673f | 21 | class AliESDEvent; |
a5249a18 | 22 | class AliFMDCorrSecondaryMap; |
563a673f | 23 | class TList; |
563a673f | 24 | |
25 | ||
26 | /** | |
671df6c9 | 27 | * Calculate the simulation-based corrections in the forward regions |
563a673f | 28 | * |
671df6c9 | 29 | * @image html alice-int-2012-040-secondary_origin.png "Fraction of secondaries" |
30 | * | |
563a673f | 31 | * @par Inputs: |
671df6c9 | 32 | * - AliESDEvent (for steering only) |
33 | * - AliTrackReference | |
34 | * - Kinematics | |
35 | * - Geometry | |
563a673f | 36 | * |
37 | * @par Outputs: | |
671df6c9 | 38 | * - AliFMDCorrSecondaryMap |
563a673f | 39 | * |
40 | * @par Histograms | |
41 | * | |
42 | * @par Corrections used | |
671df6c9 | 43 | * - None |
563a673f | 44 | * |
bd6f5206 | 45 | * @ingroup pwglf_forward_tasks |
46 | * @ingroup pwglf_forward_mc | |
47 | * @ingroup pwglf_forward_aod | |
563a673f | 48 | * |
49 | */ | |
c8b1a7db | 50 | class AliForwardMCCorrectionsTask : public AliBaseMCCorrectionsTask |
563a673f | 51 | { |
52 | public: | |
53 | /** | |
54 | * Constructor | |
55 | * | |
56 | * @param name Name of task | |
57 | */ | |
0bd4b00f | 58 | AliForwardMCCorrectionsTask(const char* name); |
563a673f | 59 | /** |
60 | * Constructor | |
61 | */ | |
0bd4b00f | 62 | AliForwardMCCorrectionsTask(); |
563a673f | 63 | /** |
64 | * @{ | |
65 | * @name Interface methods | |
66 | */ | |
67 | /** | |
c8b1a7db | 68 | * Called before the event processing |
563a673f | 69 | * |
c8b1a7db | 70 | * @return true on success |
563a673f | 71 | */ |
c8b1a7db | 72 | virtual Bool_t PreEvent(); |
563a673f | 73 | /** |
74 | * @} | |
75 | */ | |
7984e5f7 | 76 | /** |
77 | * Print this object | |
78 | * | |
79 | * @param option Not used | |
80 | */ | |
c8b1a7db | 81 | void Print(Option_t* option="") const; |
7984e5f7 | 82 | /** |
a5249a18 | 83 | * Get a reference to the track density calculator |
7984e5f7 | 84 | * |
a5249a18 | 85 | * @return Reference to the track density calculator |
7984e5f7 | 86 | */ |
c8b1a7db | 87 | AliBaseMCTrackDensity& GetTrackDensity() { return fTrackDensity; } |
7984e5f7 | 88 | /** |
a5249a18 | 89 | * Get a reference to the track density calculator |
7984e5f7 | 90 | * |
a5249a18 | 91 | * @return Reference to the track density calculator |
7984e5f7 | 92 | */ |
c8b1a7db | 93 | const AliBaseMCTrackDensity& GetTrackDensity() const { return fTrackDensity; } |
94 | protected: | |
7984e5f7 | 95 | /** |
c8b1a7db | 96 | * Copy constructor |
7984e5f7 | 97 | * |
c8b1a7db | 98 | * @param o Object to copy from |
7984e5f7 | 99 | */ |
c8b1a7db | 100 | AliForwardMCCorrectionsTask(const AliForwardMCCorrectionsTask& o); |
7984e5f7 | 101 | /** |
c8b1a7db | 102 | * Assignment operator |
a5249a18 | 103 | * |
c8b1a7db | 104 | * @param o Object to assign from |
105 | * | |
106 | * @return Reference to this object | |
a5249a18 | 107 | */ |
c8b1a7db | 108 | AliForwardMCCorrectionsTask& operator=(const AliForwardMCCorrectionsTask& o); |
a5249a18 | 109 | /** |
110 | * A vertex bin | |
7984e5f7 | 111 | * |
7984e5f7 | 112 | */ |
c8b1a7db | 113 | struct VtxBin : public AliBaseMCCorrectionsTask::VtxBin |
a5249a18 | 114 | { |
115 | /** | |
116 | * Constructor | |
117 | */ | |
118 | VtxBin(); | |
119 | /** | |
120 | * Constructor | |
121 | * | |
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 | |
125 | */ | |
126 | VtxBin(Double_t low, Double_t high, const TAxis& etaAxis); | |
127 | /** | |
128 | * Copy constructor | |
129 | * | |
130 | * @param o Object to copy from | |
131 | */ | |
132 | VtxBin(const VtxBin& o); | |
133 | /** | |
134 | * Assignment operator | |
135 | * | |
136 | * @param o Object to assign from | |
137 | * | |
138 | * @return Reference to this object | |
139 | */ | |
140 | VtxBin& operator=(const VtxBin& o); | |
a5249a18 | 141 | /** |
142 | * Declare output in passed list | |
143 | * | |
144 | * @param list List to put output in | |
145 | */ | |
c8b1a7db | 146 | TList* CreateOutputObjects(TList* list); |
a5249a18 | 147 | /** |
148 | * Calculate the background correction | |
149 | * | |
150 | * @param hits Summed hits (track-refs) | |
151 | * @param primary Summed primaries | |
152 | * | |
153 | * @return Background correction | |
154 | */ | |
155 | TH2D* MakeBg(const TH2D* hits, const TH2D* primary) const; | |
156 | /** | |
157 | * End of job process | |
158 | * | |
c6115ede | 159 | * @param o List to add output to |
160 | * @param i Input | |
161 | * @param iVz Vertex bin | |
162 | * @param map Corrections map | |
a5249a18 | 163 | */ |
5934a3e3 | 164 | void Terminate(const TList* i, |
a5249a18 | 165 | TList* o, |
166 | UShort_t iVz, | |
167 | AliFMDCorrSecondaryMap* map); | |
168 | ||
169 | AliForwardUtil::Histos fHists; // Cache of per-ring histograms | |
5934a3e3 | 170 | ClassDef(VtxBin,2); // Vertex bin |
a5249a18 | 171 | }; |
7984e5f7 | 172 | /** |
c8b1a7db | 173 | * Create a vertex bin |
174 | * | |
175 | * @param low Low cut on @f$IP_{z}@f$ | |
176 | * @param high High cut on @f$IP_{z}@f$ | |
7984e5f7 | 177 | * |
c8b1a7db | 178 | * @return Newly created vertex bin |
7984e5f7 | 179 | */ |
c8b1a7db | 180 | AliBaseMCCorrectionsTask::VtxBin* CreateVtxBin(Double_t low, Double_t high); |
181 | /** | |
182 | * Process an ESD event | |
183 | * | |
184 | * @param esd ESD event | |
185 | * @param mc MC event | |
186 | * @param bin Vertex bin | |
187 | * @param vz @f$IP_{z}@f$ | |
188 | * | |
189 | * @return true on success | |
190 | */ | |
191 | Bool_t ProcessESD(const AliESDEvent& esd, const AliMCEvent& mc, | |
192 | AliBaseMCCorrectionsTask::VtxBin& bin, | |
193 | Double_t vz); | |
194 | /** | |
195 | * Create corrections objects and store them in passed list | |
196 | * | |
197 | * @param results Output list | |
198 | */ | |
199 | virtual void CreateCorrections(TList* results); | |
200 | /** | |
201 | * Do the final processing of a vertex bin | |
202 | * | |
203 | * @param bin Vertex bin | |
204 | * @param iVz Vertex bin number | |
205 | * | |
206 | * @return true on successd | |
207 | */ | |
208 | virtual Bool_t FinalizeVtxBin(AliBaseMCCorrectionsTask::VtxBin* bin, | |
209 | UShort_t iVz); | |
563a673f | 210 | |
563a673f | 211 | |
c8b1a7db | 212 | AliFMDMCTrackDensity fTrackDensity; // Get the track density |
213 | AliESDFMD fESDFMD; // Cache object | |
214 | AliFMDCorrSecondaryMap* fSecCorr; | |
215 | ClassDef(AliForwardMCCorrectionsTask,4) // Forward corrections class | |
563a673f | 216 | }; |
217 | ||
218 | #endif | |
219 | // Local Variables: | |
220 | // mode: C++ | |
221 | // End: | |
222 |