]>
Commit | Line | Data |
---|---|---|
ac07a8f5 | 1 | #ifndef ALIESDFMD_H |
2 | #define ALIESDFMD_H | |
9da38871 | 3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights |
4 | * reserved. | |
5 | * | |
6 | * See cxx source for full Copyright notice | |
7 | */ | |
8 | //___________________________________________________________________ | |
9 | // | |
10 | // AliESDFMD is the Event Summary Data entry for the FMD. It contains | |
11 | // a rough estimate of the charged particle multiplicity in each strip | |
12 | // of the FMD. It also contains the psuedo-rapidity of each strip. | |
13 | // This is important, as it varies from event to event, due to a | |
14 | // finite interaction point probability distribution. | |
15 | // | |
16 | #ifndef ROOT_TObject | |
17 | # include <TObject.h> | |
18 | #endif | |
19 | #ifndef ALIFMDFLOATMAP_H | |
d65adc48 | 20 | # include "AliFMDFloatMap.h" |
9da38871 | 21 | #endif |
22 | ||
23 | //___________________________________________________________________ | |
c05d076f | 24 | /** @class AliESDFMD |
25 | @brief Event Summary Data for the Forward Multiplicity Detector. | |
26 | @ingroup FMD_data | |
27 | This stores the psuedo-multiplicity and -rapidiy for each strip of | |
28 | the FMD. | |
29 | */ | |
9da38871 | 30 | class AliESDFMD : public TObject |
31 | { | |
32 | public: | |
021f1396 | 33 | /** |
34 | * Base class of looping over the FMD ESD object | |
35 | * | |
36 | * A simple example could be | |
37 | * | |
38 | * @code | |
39 | * struct ESDFMDPrinter : AliESDFMD::ForOne | |
40 | * { | |
41 | * Bool_t operator()(UShort_t d, Char_t r, UShort_t s, UShort_t t, | |
42 | * Float_t m, Float_t e) | |
43 | * { | |
44 | * Printf("FMD%d%c[%2d,%3d]=%7.4f @ %7.4f", d, r, s, t, m, e); | |
45 | * return kTRUE; | |
46 | * } | |
47 | * }; | |
48 | * @endcode | |
49 | */ | |
50 | class ForOne | |
51 | { | |
52 | public: | |
53 | /** | |
54 | * Destructor | |
55 | */ | |
56 | virtual ~ForOne() {} | |
57 | /** | |
58 | * Functional operator called for each entry | |
59 | * | |
60 | * @param d Detector number | |
61 | * @param r Ring identifier | |
62 | * @param s Sector number | |
63 | * @param t Strip number | |
64 | * @param m 'Bare' multiplicity of this strip | |
65 | * @param e Pseudo-rapidity of this strip | |
66 | * | |
67 | * @return @c kTRUE in case of success, @c kFALSE in case of failure. | |
68 | * If the method returns @c kFALSE, the loop stops. | |
69 | */ | |
70 | virtual bool operator()(UShort_t d, Char_t r, UShort_t s, UShort_t t, | |
71 | Float_t m, Float_t e) = 0; | |
72 | }; | |
ab08bcd7 | 73 | enum { |
74 | kNeedNoiseFix = (1 << 14) | |
75 | }; | |
021f1396 | 76 | /** |
77 | * Default constructor | |
78 | */ | |
9da38871 | 79 | AliESDFMD(); |
021f1396 | 80 | /** |
81 | * Copy constructor | |
82 | * | |
83 | * @param other Object to construct from | |
84 | */ | |
9da38871 | 85 | AliESDFMD(const AliESDFMD& other); |
021f1396 | 86 | /** |
87 | * Assignment operator | |
88 | * | |
89 | * @param other Object to assign from | |
90 | * | |
91 | * @return reference to this object | |
92 | */ | |
9da38871 | 93 | AliESDFMD& operator=(const AliESDFMD& other); |
021f1396 | 94 | /** |
95 | * Destructor - does nothing | |
96 | */ | |
9da38871 | 97 | virtual ~AliESDFMD() {} |
021f1396 | 98 | /** |
99 | * Copy the content of this object to @a obj which must have been | |
100 | * preallocated | |
101 | * | |
102 | * @param obj Object to copy to | |
103 | */ | |
732a24fe | 104 | virtual void Copy(TObject &obj) const; |
105 | ||
021f1396 | 106 | /** |
107 | * Reset the object | |
108 | */ | |
9da38871 | 109 | void Clear(Option_t *option=""); |
021f1396 | 110 | /** |
111 | * Get the pseudo-multiplicity of | |
112 | * @f$ \text{FMD}\langle detector\rangle\lange ring\rangle_{\langle | |
113 | * sector\rangle\langle strip\rangle}@f$ | |
114 | * | |
115 | * @param detector Detector number (1-3) | |
116 | * @param ring Ring identifier ('I' or 'O') | |
117 | * @param sector Sector number (0-511, or 0-255) | |
118 | * @param strip Strip number (0-19, or 0-39) | |
119 | * | |
120 | * @return Psuedo multiplicity | |
121 | */ | |
9da38871 | 122 | Float_t Multiplicity(UShort_t detector, Char_t ring, |
123 | UShort_t sector, UShort_t strip) const; | |
021f1396 | 124 | /** |
125 | * Get the pseudo-rapidity of | |
126 | * @f$ \text{FMD}\langle detector\rangle\lange ring\rangle_{\langle | |
127 | * sector\rangle\langle strip\rangle}@f$ | |
128 | * | |
129 | * @param detector Detector number (1-3) | |
130 | * @param ring Ring identifier ('I' or 'O') | |
131 | * @param sector Sector number (0-511, or 0-255) | |
132 | * @param strip Strip number (0-19, or 0-39) | |
133 | * | |
134 | * @return Psuedo rapidity | |
135 | */ | |
9da38871 | 136 | Float_t Eta(UShort_t detector, Char_t ring, |
137 | UShort_t sector, UShort_t strip) const; | |
021f1396 | 138 | /** |
139 | * Get the azimuthal angle of | |
140 | * @f$ \text{FMD}\langle detector\rangle\lange ring\rangle_{\langle | |
141 | * sector\rangle\langle strip\rangle}@f$ | |
142 | * | |
143 | * @param detector Detector number (1-3) | |
144 | * @param ring Ring identifier ('I' or 'O') | |
145 | * @param sector Sector number (0-511, or 0-255) | |
146 | * @param strip Strip number (0-19, or 0-39) | |
147 | * | |
148 | * @return Azimuthal angle | |
149 | */ | |
150 | Float_t Phi(UShort_t detector, Char_t ring, | |
151 | UShort_t sector, UShort_t strip) const; | |
152 | /** | |
153 | * Get the polar angle (in degrees) from beam line of | |
154 | * @f$ \text{FMD}\langle detector\rangle\lange ring\rangle_{\langle | |
155 | * sector\rangle\langle strip\rangle}@f$ | |
156 | * | |
157 | * @param detector Detector number (1-3) | |
158 | * @param ring Ring identifier ('I' or 'O') | |
159 | * @param sector Sector number (0-511, or 0-255) | |
160 | * @param strip Strip number (0-19, or 0-39) | |
161 | * | |
162 | * @return Polar angle | |
163 | */ | |
164 | Float_t Theta(UShort_t detector, Char_t ring, | |
165 | UShort_t sector, UShort_t strip) const; | |
166 | /** | |
167 | * Get the radial distance (in cm) from beam line of | |
168 | * @f$ \text{FMD}\langle detector\rangle\lange ring\rangle_{\langle | |
169 | * sector\rangle\langle strip\rangle}@f$ | |
170 | * | |
171 | * @param detector Detector number (1-3) | |
172 | * @param ring Ring identifier ('I' or 'O') | |
173 | * @param sector Sector number (0-511, or 0-255) | |
174 | * @param strip Strip number (0-19, or 0-39) | |
175 | * | |
176 | * @return Radial distance | |
177 | */ | |
178 | Float_t R(UShort_t detector, Char_t ring, | |
179 | UShort_t sector, UShort_t strip) const; | |
180 | /** | |
181 | * Set the pseudo-multiplicity of | |
182 | * @f$ \text{FMD}\langle detector\rangle\lange ring\rangle_{\langle | |
183 | * sector\rangle\langle strip\rangle}@f$ | |
184 | * | |
185 | * @param detector Detector number (1-3) | |
186 | * @param ring Ring identifier ('I' or 'O') | |
187 | * @param sector Sector number (0-511, or 0-255) | |
188 | * @param strip Strip number (0-19, or 0-39) | |
189 | * @param mult Psuedo multiplicity | |
190 | */ | |
9da38871 | 191 | void SetMultiplicity(UShort_t detector, Char_t ring, |
192 | UShort_t sector, UShort_t strip, | |
193 | Float_t mult); | |
021f1396 | 194 | /** |
195 | * Set the pseudo-rapidity of | |
196 | * @f$ \text{FMD}\langle detector\rangle\lange ring\rangle_{\langle | |
197 | * sector\rangle\langle strip\rangle}@f$ | |
198 | * | |
199 | * @param detector Detector number (1-3) | |
200 | * @param ring Ring identifier ('I' or 'O') | |
201 | * @param sector Sector number (0-511, or 0-255) | |
202 | * @param strip Strip number (0-19, or 0-39) | |
203 | * @param eta Psuedo rapidity | |
204 | */ | |
9da38871 | 205 | void SetEta(UShort_t detector, Char_t ring, |
206 | UShort_t sector, UShort_t strip, | |
c05d076f | 207 | Float_t eta); |
021f1396 | 208 | /** |
209 | * @param f the factor for noise suppression | |
210 | */ | |
c05d076f | 211 | void SetNoiseFactor(Float_t f) { fNoiseFactor = f; } |
021f1396 | 212 | /** |
213 | * @param done Whether we've done angle correction or not | |
214 | */ | |
c05d076f | 215 | void SetAngleCorrected(Bool_t done) { fAngleCorrected = done; } |
021f1396 | 216 | /** |
217 | * @return Whether we've done angle correction or not | |
218 | */ | |
e03121ec | 219 | Bool_t IsAngleCorrected() const { return fAngleCorrected; } |
021f1396 | 220 | /** |
221 | * @return the factor for noise suppression | |
222 | */ | |
c05d076f | 223 | Float_t GetNoiseFactor() const { return fNoiseFactor; } |
021f1396 | 224 | /** |
225 | * @return maximum number of detectors | |
226 | */ | |
9eeb02aa | 227 | UShort_t MaxDetectors() const { return fMultiplicity.MaxDetectors(); } |
021f1396 | 228 | /** |
229 | * @return maximum number of rings | |
230 | */ | |
9eeb02aa | 231 | UShort_t MaxRings() const { return fMultiplicity.MaxRings(); } |
021f1396 | 232 | /** |
233 | * @return maximum number of sectors | |
234 | */ | |
9eeb02aa | 235 | UShort_t MaxSectors() const { return fMultiplicity.MaxSectors(); } |
021f1396 | 236 | /** |
237 | * @return Maximum number of strips | |
238 | */ | |
9eeb02aa | 239 | UShort_t MaxStrips() const { return fMultiplicity.MaxStrips(); } |
021f1396 | 240 | /** |
241 | * Print this object to standard out. | |
242 | * | |
243 | * @param option Options | |
244 | */ | |
9da38871 | 245 | void Print(Option_t* option="") const; |
021f1396 | 246 | /** |
247 | * Check if we need the @c UShort_t fix | |
248 | * | |
249 | * @param file File this object was read from | |
250 | */ | |
c05d076f | 251 | void CheckNeedUShort(TFile* file); |
ab08bcd7 | 252 | /** |
253 | * Check if we need the noise fix | |
254 | * | |
255 | * @return true if class version of read object is 3 or smaller | |
256 | */ | |
257 | Bool_t NeedNoiseFix() const { return TestBit(kNeedNoiseFix); } | |
021f1396 | 258 | /** |
259 | * Call the function operator of the passed object @a algo for each | |
260 | * entry in this object | |
261 | * | |
262 | * @param algo Algorithm | |
263 | * | |
264 | * @return @c kTRUE on success, @c kFALSE if the passed object | |
265 | * failed at any entry. It will return immediately on error. | |
266 | */ | |
267 | Bool_t ForEach(ForOne& algo) const; | |
9da38871 | 268 | enum { |
c05d076f | 269 | /** Value used for undefined multiplicity */ |
ae7aeb9f | 270 | kInvalidMult = 1024 |
9da38871 | 271 | }; |
272 | enum { | |
c05d076f | 273 | /** Value used for undefined pseudo rapidity */ |
ae7aeb9f | 274 | kInvalidEta = 1024 |
9da38871 | 275 | }; |
021f1396 | 276 | /** |
277 | * @return constant reference to multiplicity map | |
278 | */ | |
c05d076f | 279 | const AliFMDFloatMap& MultiplicityMap() const { return fMultiplicity; } |
021f1396 | 280 | /** |
281 | * @return constant reference to pseudo-rapidity map | |
282 | */ | |
1f795f84 | 283 | const AliFMDFloatMap& EtaMap() const { return fEta; } |
9da38871 | 284 | protected: |
c05d076f | 285 | AliFMDFloatMap fMultiplicity; // Psuedo multplicity per strip |
286 | AliFMDFloatMap fEta; // Psuedo-rapidity per strip | |
287 | Float_t fNoiseFactor; // Factor used for noise suppresion | |
288 | Bool_t fAngleCorrected; // Whether we've done angle correction | |
ab08bcd7 | 289 | ClassDef(AliESDFMD,4) // ESD info from FMD |
9da38871 | 290 | }; |
291 | #endif | |
292 | //____________________________________________________________________ | |
293 | // | |
294 | // Local Variables: | |
295 | // mode: C++ | |
296 | // End: | |
297 | // | |
298 | // EOF | |
299 | // |