]>
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 |
7e4038b5 | 98 | * @param nEvents Number of events |
99 | */ | |
5934a3e3 | 100 | virtual void Terminate(const TList* dir, TList* output, Int_t nEvents); |
7e4038b5 | 101 | /** |
102 | * Output diagnostic histograms to directory | |
103 | * | |
104 | * @param dir List to write in | |
105 | */ | |
5934a3e3 | 106 | virtual void CreateOutputObjects(TList* dir); |
8dc20805 | 107 | /** |
108 | * Set the debug level. The higher the value the more output | |
109 | * | |
110 | * @param dbg Debug level | |
111 | */ | |
112 | void SetDebug(Int_t dbg=1) { fDebug = dbg; } | |
1174780f | 113 | /** |
7ec4d843 | 114 | * @{ |
115 | * @name Enable/disable parts of the corrections | |
116 | */ | |
117 | /** | |
118 | * Whether to do correction for secondaries | |
119 | * | |
120 | * @param use If true, use the secondary correction | |
121 | */ | |
122 | void SetUseSecondaryMap(Bool_t use=true) { fUseSecondaryMap = use; } | |
123 | /** | |
124 | * Check | |
125 | * | |
126 | * @return true if the correction for secondaries is done | |
127 | */ | |
128 | Bool_t IsUseSecondaryMap() const { return fUseSecondaryMap; } | |
129 | /** | |
130 | * Whether to do correction for vertex bias | |
131 | * | |
132 | * @param use If true, use the vertex bias correction | |
133 | */ | |
134 | void SetUseVertexBias(Bool_t use=true) { fUseVertexBias = use; } | |
135 | /** | |
136 | * Check | |
137 | * | |
138 | * @return true if the correction for vertex bias is done | |
139 | */ | |
140 | Bool_t IsUseVertexBias() const { return fUseVertexBias; } | |
141 | /** | |
142 | * Whether to do correction for dead-channel acceptance | |
143 | * | |
144 | * @param use If true, use the dead-channel acceptance correction | |
145 | */ | |
146 | void SetUseAcceptance(Bool_t use=true) { fUseAcceptance = use; } | |
147 | /** | |
148 | * Check | |
149 | * | |
150 | * @return true if the correction for dead-channel acceptance is done | |
151 | */ | |
152 | Bool_t IsUseAcceptance() const { return fUseAcceptance; } | |
153 | /** | |
1174780f | 154 | * Whether to use the merging efficiency correction |
7ec4d843 | 155 | * |
1174780f | 156 | * @param use If true, use the merging efficiency correction |
157 | */ | |
158 | void SetUseMergingEfficiency(Bool_t use=true) { fUseMergingEfficiency = use; } | |
7ec4d843 | 159 | /** |
160 | * Check | |
161 | * | |
1174780f | 162 | * @return true if the merging efficiency correction is used. |
163 | */ | |
164 | Bool_t IsUseMergingEfficiency() const { return fUseMergingEfficiency; } | |
7ec4d843 | 165 | /* @} */ |
166 | ||
167 | /** | |
0bd4b00f | 168 | * Print information |
169 | * | |
170 | * @param option Not used | |
171 | */ | |
5bb5d1f6 | 172 | virtual void Print(Option_t* option="") const; |
7e4038b5 | 173 | protected: |
174 | /** | |
175 | * Internal data structure to keep track of the histograms | |
176 | */ | |
9d99b0dd | 177 | struct RingHistos : public AliForwardUtil::RingHistos |
7e4038b5 | 178 | { |
179 | /** | |
180 | * Default CTOR | |
181 | */ | |
182 | RingHistos(); | |
183 | /** | |
184 | * Constructor | |
185 | * | |
186 | * @param d detector | |
187 | * @param r ring | |
188 | */ | |
189 | RingHistos(UShort_t d, Char_t r); | |
190 | /** | |
191 | * Copy constructor | |
192 | * | |
193 | * @param o Object to copy from | |
194 | */ | |
195 | RingHistos(const RingHistos& o); | |
196 | /** | |
197 | * Assignment operator | |
198 | * | |
199 | * @param o Object to assign from | |
200 | * | |
201 | * @return Reference to this | |
202 | */ | |
203 | RingHistos& operator=(const RingHistos& o); | |
204 | /** | |
205 | * Destructor | |
206 | */ | |
207 | ~RingHistos(); | |
c389303e | 208 | /** |
209 | * Make output | |
210 | * | |
211 | * @param dir Where to put it | |
212 | */ | |
5934a3e3 | 213 | void CreateOutputObjects(TList* dir); |
9d99b0dd | 214 | /** |
215 | * Scale the histograms to the total number of events | |
216 | * | |
c389303e | 217 | * @param dir where the output is stored |
9d99b0dd | 218 | * @param nEvents Number of events |
219 | */ | |
5934a3e3 | 220 | void Terminate(TList* dir, Int_t nEvents); |
7e4038b5 | 221 | TH2D* fDensity; // Distribution primary Nch |
5934a3e3 | 222 | ClassDef(RingHistos,2); |
7e4038b5 | 223 | }; |
224 | /** | |
225 | * Get the ring histogram container | |
226 | * | |
227 | * @param d Detector | |
228 | * @param r Ring | |
229 | * | |
230 | * @return Ring histogram container | |
231 | */ | |
232 | RingHistos* GetRingHistos(UShort_t d, Char_t r) const; | |
5ca83fee | 233 | /** |
234 | * Divide a map with another map. This is a reimplementation of | |
235 | * TH1::Divide, but we assume compatible histograms, and the under- | |
236 | * and overflow bins are only divided if the third argument is true. | |
237 | * | |
238 | * @param num Numerator. On return contains the result | |
239 | * @param denom Denominator | |
240 | * @param alsoUnderOver If true, also divide under/overflow bins | |
241 | */ | |
242 | void DivideMap(TH2* num, const TH2* denom, Bool_t alsoUnderOver=false) const; | |
81eda625 | 243 | TList fRingHistos; // List of histogram containers |
7ec4d843 | 244 | Bool_t fUseSecondaryMap; // Whether to do correction for secondaries |
245 | Bool_t fUseVertexBias; // Whether to do correction for vertex bias | |
246 | Bool_t fUseAcceptance; // Whether to do correction for dead ch's. | |
81eda625 | 247 | Bool_t fUseMergingEfficiency; // Whether to use the merging efficiency |
248 | Int_t fDebug; // Debug level | |
7e4038b5 | 249 | |
5934a3e3 | 250 | ClassDef(AliFMDCorrector,4); // Correct the inclusive d2N/detadphi |
7e4038b5 | 251 | }; |
252 | ||
253 | #endif | |
254 | // Local Variables: | |
255 | // mode: C++ | |
256 | // End: | |
257 |