3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights
6 * See cxx source for full Copyright notice
8 //___________________________________________________________________
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.
19 #ifndef ALIFMDFLOATMAP_H
20 # include "AliFMDFloatMap.h"
23 //___________________________________________________________________
25 @brief Event Summary Data for the Forward Multiplicity Detector.
27 This stores the psuedo-multiplicity and -rapidiy for each strip of
30 class AliESDFMD : public TObject
34 * Base class of looping over the FMD ESD object
36 * A simple example could be
39 * struct ESDFMDPrinter : AliESDFMD::ForOne
41 * Bool_t operator()(UShort_t d, Char_t r, UShort_t s, UShort_t t,
42 * Float_t m, Float_t e)
44 * Printf("FMD%d%c[%2d,%3d]=%7.4f @ %7.4f", d, r, s, t, m, e);
58 * Functional operator called for each entry
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
67 * @return @c kTRUE in case of success, @c kFALSE in case of failure.
68 * If the method returns @c kFALSE, the loop stops.
70 virtual bool operator()(UShort_t d, Char_t r, UShort_t s, UShort_t t,
71 Float_t m, Float_t e) = 0;
74 kNeedNoiseFix = (1 << 14)
83 * @param other Object to construct from
85 AliESDFMD(const AliESDFMD& other);
89 * @param other Object to assign from
91 * @return reference to this object
93 AliESDFMD& operator=(const AliESDFMD& other);
95 * Destructor - does nothing
97 virtual ~AliESDFMD() {}
99 * Copy the content of this object to @a obj which must have been
102 * @param obj Object to copy to
104 virtual void Copy(TObject &obj) const;
109 void Clear(Option_t *option="");
111 * Get the pseudo-multiplicity of
112 * @f$ \text{FMD}\langle detector\rangle\lange ring\rangle_{\langle
113 * sector\rangle\langle strip\rangle}@f$
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)
120 * @return Psuedo multiplicity
122 Float_t Multiplicity(UShort_t detector, Char_t ring,
123 UShort_t sector, UShort_t strip) const;
125 * Get the pseudo-rapidity of
126 * @f$ \text{FMD}\langle detector\rangle\lange ring\rangle_{\langle
127 * sector\rangle\langle strip\rangle}@f$
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)
134 * @return Psuedo rapidity
136 Float_t Eta(UShort_t detector, Char_t ring,
137 UShort_t sector, UShort_t strip) const;
139 * Get the azimuthal angle of
140 * @f$ \text{FMD}\langle detector\rangle\lange ring\rangle_{\langle
141 * sector\rangle\langle strip\rangle}@f$
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)
148 * @return Azimuthal angle
150 Float_t Phi(UShort_t detector, Char_t ring,
151 UShort_t sector, UShort_t strip) const;
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$
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)
162 * @return Polar angle
164 Float_t Theta(UShort_t detector, Char_t ring,
165 UShort_t sector, UShort_t strip) const;
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$
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)
176 * @return Radial distance
178 Float_t R(UShort_t detector, Char_t ring,
179 UShort_t sector, UShort_t strip) const;
181 * Set the pseudo-multiplicity of
182 * @f$ \text{FMD}\langle detector\rangle\lange ring\rangle_{\langle
183 * sector\rangle\langle strip\rangle}@f$
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
191 void SetMultiplicity(UShort_t detector, Char_t ring,
192 UShort_t sector, UShort_t strip,
195 * Set the pseudo-rapidity of
196 * @f$ \text{FMD}\langle detector\rangle\lange ring\rangle_{\langle
197 * sector\rangle\langle strip\rangle}@f$
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
205 void SetEta(UShort_t detector, Char_t ring,
206 UShort_t sector, UShort_t strip,
209 * @param f the factor for noise suppression
211 void SetNoiseFactor(Float_t f) { fNoiseFactor = f; }
213 * @param done Whether we've done angle correction or not
215 void SetAngleCorrected(Bool_t done) { fAngleCorrected = done; }
217 * @return Whether we've done angle correction or not
219 Bool_t IsAngleCorrected() const { return fAngleCorrected; }
221 * @return the factor for noise suppression
223 Float_t GetNoiseFactor() const { return fNoiseFactor; }
225 * @return maximum number of detectors
227 UShort_t MaxDetectors() const { return fMultiplicity.MaxDetectors(); }
229 * @return maximum number of rings
231 UShort_t MaxRings() const { return fMultiplicity.MaxRings(); }
233 * @return maximum number of sectors
235 UShort_t MaxSectors() const { return fMultiplicity.MaxSectors(); }
237 * @return Maximum number of strips
239 UShort_t MaxStrips() const { return fMultiplicity.MaxStrips(); }
241 * Print this object to standard out.
243 * @param option Options
245 void Print(Option_t* option="") const;
247 * Check if we need the @c UShort_t fix
249 * @param file File this object was read from
251 void CheckNeedUShort(TFile* file);
253 * Check if we need the noise fix
255 * @return true if class version of read object is 3 or smaller
257 Bool_t NeedNoiseFix() const { return TestBit(kNeedNoiseFix); }
259 * Call the function operator of the passed object @a algo for each
260 * entry in this object
262 * @param algo Algorithm
264 * @return @c kTRUE on success, @c kFALSE if the passed object
265 * failed at any entry. It will return immediately on error.
267 Bool_t ForEach(ForOne& algo) const;
269 /** Value used for undefined multiplicity */
273 /** Value used for undefined pseudo rapidity */
277 * @return constant reference to multiplicity map
279 const AliFMDFloatMap& MultiplicityMap() const { return fMultiplicity; }
281 * @return constant reference to pseudo-rapidity map
283 const AliFMDFloatMap& EtaMap() const { return fEta; }
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
289 ClassDef(AliESDFMD,4) // ESD info from FMD
292 //____________________________________________________________________