]>
Commit | Line | Data |
---|---|---|
7984e5f7 | 1 | // This class calculates the exclusive charged particle density |
2 | // in each for the 5 FMD rings. | |
3 | // | |
72cc12cd | 4 | #ifndef ALIFMDCORRECTOR_H |
5 | #define ALIFMDCORRECTOR_H | |
ffca499d | 6 | /** |
7 | * @file AliFMDCorrector.h | |
8 | * @author Christian Holm Christensen <cholm@dalsgaard.hehi.nbi.dk> | |
9 | * @date Wed Mar 23 14:01:02 2011 | |
10 | * | |
11 | * @brief | |
12 | * | |
bd6f5206 | 13 | * @ingroup pwglf_forward_aod |
ffca499d | 14 | * |
15 | */ | |
7e4038b5 | 16 | #include <TNamed.h> |
17 | #include <TList.h> | |
18 | #include "AliForwardUtil.h" | |
7e4038b5 | 19 | class TH2D; |
5ca83fee | 20 | class TH2; |
7e4038b5 | 21 | /** |
bd6f5206 | 22 | * @defgroup pwglf_forward_algo Algorithms |
219882ab | 23 | * |
290052e7 | 24 | * Various sub-algorithms used in the analysis |
25 | * | |
bd6f5206 | 26 | * @ingroup pwglf_forward |
219882ab | 27 | */ |
28 | /** | |
29 | * This class calculates the exclusive charged particle density | |
7e4038b5 | 30 | * in each for the 5 FMD rings. |
31 | * | |
32 | * @par Input: | |
219882ab | 33 | * - 5 RingHistos objects - each with a number of vertex dependent |
34 | * 2D histograms of the inclusive charge particle density | |
7e4038b5 | 35 | * |
36 | * @par Output: | |
37 | * - 5 RingHistos objects - each with a number of vertex dependent | |
219882ab | 38 | * 2D histograms of the exclusive charge particle density |
7e4038b5 | 39 | * |
40 | * @par Corrections used: | |
219882ab | 41 | * - AliFMDCorrSecondaryMap; |
42 | * - AliFMDCorrVertexBias | |
43 | * - AliFMDCorrMergingEfficiency | |
7e4038b5 | 44 | * |
bd6f5206 | 45 | * @ingroup pwglf_forward_algo |
46 | * @ingroup pwglf_forward_aod | |
7e4038b5 | 47 | */ |
72cc12cd | 48 | class AliFMDCorrector : public TNamed |
7e4038b5 | 49 | { |
50 | public: | |
51 | /** | |
52 | * Constructor | |
53 | */ | |
72cc12cd | 54 | AliFMDCorrector(); |
7e4038b5 | 55 | /** |
56 | * Constructor | |
57 | * | |
58 | * @param name Name of object | |
59 | */ | |
72cc12cd | 60 | AliFMDCorrector(const char* name); |
7e4038b5 | 61 | /** |
62 | * Copy constructor | |
63 | * | |
64 | * @param o Object to copy from | |
65 | */ | |
72cc12cd | 66 | AliFMDCorrector(const AliFMDCorrector& o); |
7e4038b5 | 67 | /** |
68 | * Destructor | |
69 | */ | |
72cc12cd | 70 | virtual ~AliFMDCorrector(); |
7e4038b5 | 71 | /** |
72 | * Assignement operator | |
73 | * | |
74 | * @param o Object to assign from | |
75 | * | |
76 | * @return Reference to this object | |
77 | */ | |
72cc12cd | 78 | AliFMDCorrector& operator=(const AliFMDCorrector&); |
7e4038b5 | 79 | /** |
7ec4d843 | 80 | * Initialize this object |
81 | * | |
82 | * @param etaAxis Eta axis to use -- not used | |
83 | */ | |
5934a3e3 | 84 | virtual void SetupForData(const TAxis& etaAxis); |
7ec4d843 | 85 | /** |
7e4038b5 | 86 | * Do the calculations |
87 | * | |
88 | * @param hists Cache of histograms | |
89 | * @param vtxBin Vertex bin | |
90 | * | |
91 | * @return true on successs | |
92 | */ | |
0bd4b00f | 93 | virtual Bool_t Correct(AliForwardUtil::Histos& hists, UShort_t vtxBin); |
7e4038b5 | 94 | /** |
95 | * Scale the histograms to the total number of events | |
96 | * | |
c389303e | 97 | * @param dir Where the output is stored |
33438b4c | 98 | * @param output Output list |
7e4038b5 | 99 | * @param nEvents Number of events |
100 | */ | |
5934a3e3 | 101 | virtual void Terminate(const TList* dir, TList* output, Int_t nEvents); |
7e4038b5 | 102 | /** |
103 | * Output diagnostic histograms to directory | |
104 | * | |
105 | * @param dir List to write in | |
106 | */ | |
5934a3e3 | 107 | virtual void CreateOutputObjects(TList* dir); |
8dc20805 | 108 | /** |
109 | * Set the debug level. The higher the value the more output | |
110 | * | |
111 | * @param dbg Debug level | |
112 | */ | |
113 | void SetDebug(Int_t dbg=1) { fDebug = dbg; } | |
1174780f | 114 | /** |
7ec4d843 | 115 | * @{ |
116 | * @name Enable/disable parts of the corrections | |
117 | */ | |
118 | /** | |
119 | * Whether to do correction for secondaries | |
120 | * | |
121 | * @param use If true, use the secondary correction | |
122 | */ | |
123 | void SetUseSecondaryMap(Bool_t use=true) { fUseSecondaryMap = use; } | |
124 | /** | |
125 | * Check | |
126 | * | |
127 | * @return true if the correction for secondaries is done | |
128 | */ | |
129 | Bool_t IsUseSecondaryMap() const { return fUseSecondaryMap; } | |
130 | /** | |
131 | * Whether to do correction for vertex bias | |
132 | * | |
133 | * @param use If true, use the vertex bias correction | |
134 | */ | |
135 | void SetUseVertexBias(Bool_t use=true) { fUseVertexBias = use; } | |
136 | /** | |
137 | * Check | |
138 | * | |
139 | * @return true if the correction for vertex bias is done | |
140 | */ | |
141 | Bool_t IsUseVertexBias() const { return fUseVertexBias; } | |
142 | /** | |
143 | * Whether to do correction for dead-channel acceptance | |
144 | * | |
145 | * @param use If true, use the dead-channel acceptance correction | |
146 | */ | |
147 | void SetUseAcceptance(Bool_t use=true) { fUseAcceptance = use; } | |
148 | /** | |
149 | * Check | |
150 | * | |
151 | * @return true if the correction for dead-channel acceptance is done | |
152 | */ | |
153 | Bool_t IsUseAcceptance() const { return fUseAcceptance; } | |
154 | /** | |
1174780f | 155 | * Whether to use the merging efficiency correction |
7ec4d843 | 156 | * |
1174780f | 157 | * @param use If true, use the merging efficiency correction |
158 | */ | |
159 | void SetUseMergingEfficiency(Bool_t use=true) { fUseMergingEfficiency = use; } | |
7ec4d843 | 160 | /** |
161 | * Check | |
162 | * | |
1174780f | 163 | * @return true if the merging efficiency correction is used. |
164 | */ | |
165 | Bool_t IsUseMergingEfficiency() const { return fUseMergingEfficiency; } | |
7ec4d843 | 166 | /* @} */ |
167 | ||
168 | /** | |
0bd4b00f | 169 | * Print information |
170 | * | |
171 | * @param option Not used | |
172 | */ | |
5bb5d1f6 | 173 | virtual void Print(Option_t* option="") const; |
7e4038b5 | 174 | protected: |
175 | /** | |
176 | * Internal data structure to keep track of the histograms | |
177 | */ | |
9d99b0dd | 178 | struct RingHistos : public AliForwardUtil::RingHistos |
7e4038b5 | 179 | { |
180 | /** | |
181 | * Default CTOR | |
182 | */ | |
183 | RingHistos(); | |
184 | /** | |
185 | * Constructor | |
186 | * | |
187 | * @param d detector | |
188 | * @param r ring | |
189 | */ | |
190 | RingHistos(UShort_t d, Char_t r); | |
191 | /** | |
192 | * Copy constructor | |
193 | * | |
194 | * @param o Object to copy from | |
195 | */ | |
196 | RingHistos(const RingHistos& o); | |
197 | /** | |
198 | * Assignment operator | |
199 | * | |
200 | * @param o Object to assign from | |
201 | * | |
202 | * @return Reference to this | |
203 | */ | |
204 | RingHistos& operator=(const RingHistos& o); | |
205 | /** | |
206 | * Destructor | |
207 | */ | |
208 | ~RingHistos(); | |
c389303e | 209 | /** |
210 | * Make output | |
211 | * | |
212 | * @param dir Where to put it | |
213 | */ | |
5934a3e3 | 214 | void CreateOutputObjects(TList* dir); |
9d99b0dd | 215 | /** |
216 | * Scale the histograms to the total number of events | |
217 | * | |
c389303e | 218 | * @param dir where the output is stored |
9d99b0dd | 219 | * @param nEvents Number of events |
220 | */ | |
5934a3e3 | 221 | void Terminate(TList* dir, Int_t nEvents); |
7e4038b5 | 222 | TH2D* fDensity; // Distribution primary Nch |
5934a3e3 | 223 | ClassDef(RingHistos,2); |
7e4038b5 | 224 | }; |
225 | /** | |
226 | * Get the ring histogram container | |
227 | * | |
228 | * @param d Detector | |
229 | * @param r Ring | |
230 | * | |
231 | * @return Ring histogram container | |
232 | */ | |
233 | RingHistos* GetRingHistos(UShort_t d, Char_t r) const; | |
5ca83fee | 234 | /** |
235 | * Divide a map with another map. This is a reimplementation of | |
236 | * TH1::Divide, but we assume compatible histograms, and the under- | |
237 | * and overflow bins are only divided if the third argument is true. | |
238 | * | |
239 | * @param num Numerator. On return contains the result | |
240 | * @param denom Denominator | |
241 | * @param alsoUnderOver If true, also divide under/overflow bins | |
242 | */ | |
243 | void DivideMap(TH2* num, const TH2* denom, Bool_t alsoUnderOver=false) const; | |
81eda625 | 244 | TList fRingHistos; // List of histogram containers |
7ec4d843 | 245 | Bool_t fUseSecondaryMap; // Whether to do correction for secondaries |
246 | Bool_t fUseVertexBias; // Whether to do correction for vertex bias | |
247 | Bool_t fUseAcceptance; // Whether to do correction for dead ch's. | |
81eda625 | 248 | Bool_t fUseMergingEfficiency; // Whether to use the merging efficiency |
249 | Int_t fDebug; // Debug level | |
7e4038b5 | 250 | |
5934a3e3 | 251 | ClassDef(AliFMDCorrector,4); // Correct the inclusive d2N/detadphi |
7e4038b5 | 252 | }; |
253 | ||
254 | #endif | |
255 | // Local Variables: | |
256 | // mode: C++ | |
257 | // End: | |
258 |