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;
80 * @param other Object to construct from
82 AliESDFMD(const AliESDFMD& other);
86 * @param other Object to assign from
88 * @return reference to this object
90 AliESDFMD& operator=(const AliESDFMD& other);
92 * Destructor - does nothing
94 virtual ~AliESDFMD() {}
96 * Copy the content of this object to @a obj which must have been
99 * @param obj Object to copy to
101 virtual void Copy(TObject &obj) const;
106 void Clear(Option_t *option="");
108 * Get the pseudo-multiplicity of
109 * @f$ \text{FMD}\langle detector\rangle\lange ring\rangle_{\langle
110 * sector\rangle\langle strip\rangle}@f$
112 * @param detector Detector number (1-3)
113 * @param ring Ring identifier ('I' or 'O')
114 * @param sector Sector number (0-511, or 0-255)
115 * @param strip Strip number (0-19, or 0-39)
117 * @return Psuedo multiplicity
119 Float_t Multiplicity(UShort_t detector, Char_t ring,
120 UShort_t sector, UShort_t strip) const;
122 * Get the pseudo-rapidity of
123 * @f$ \text{FMD}\langle detector\rangle\lange ring\rangle_{\langle
124 * sector\rangle\langle strip\rangle}@f$
126 * @param detector Detector number (1-3)
127 * @param ring Ring identifier ('I' or 'O')
128 * @param sector Sector number (0-511, or 0-255)
129 * @param strip Strip number (0-19, or 0-39)
131 * @return Psuedo rapidity
133 Float_t Eta(UShort_t detector, Char_t ring,
134 UShort_t sector, UShort_t strip) const;
136 * Get the azimuthal angle of
137 * @f$ \text{FMD}\langle detector\rangle\lange ring\rangle_{\langle
138 * sector\rangle\langle strip\rangle}@f$
140 * @param detector Detector number (1-3)
141 * @param ring Ring identifier ('I' or 'O')
142 * @param sector Sector number (0-511, or 0-255)
143 * @param strip Strip number (0-19, or 0-39)
145 * @return Azimuthal angle
147 Float_t Phi(UShort_t detector, Char_t ring,
148 UShort_t sector, UShort_t strip) const;
150 * Get the polar angle (in degrees) from beam line of
151 * @f$ \text{FMD}\langle detector\rangle\lange ring\rangle_{\langle
152 * sector\rangle\langle strip\rangle}@f$
154 * @param detector Detector number (1-3)
155 * @param ring Ring identifier ('I' or 'O')
156 * @param sector Sector number (0-511, or 0-255)
157 * @param strip Strip number (0-19, or 0-39)
159 * @return Polar angle
161 Float_t Theta(UShort_t detector, Char_t ring,
162 UShort_t sector, UShort_t strip) const;
164 * Get the radial distance (in cm) from beam line of
165 * @f$ \text{FMD}\langle detector\rangle\lange ring\rangle_{\langle
166 * sector\rangle\langle strip\rangle}@f$
168 * @param detector Detector number (1-3)
169 * @param ring Ring identifier ('I' or 'O')
170 * @param sector Sector number (0-511, or 0-255)
171 * @param strip Strip number (0-19, or 0-39)
173 * @return Radial distance
175 Float_t R(UShort_t detector, Char_t ring,
176 UShort_t sector, UShort_t strip) const;
178 * Set the pseudo-multiplicity of
179 * @f$ \text{FMD}\langle detector\rangle\lange ring\rangle_{\langle
180 * sector\rangle\langle strip\rangle}@f$
182 * @param detector Detector number (1-3)
183 * @param ring Ring identifier ('I' or 'O')
184 * @param sector Sector number (0-511, or 0-255)
185 * @param strip Strip number (0-19, or 0-39)
186 * @param mult Psuedo multiplicity
188 void SetMultiplicity(UShort_t detector, Char_t ring,
189 UShort_t sector, UShort_t strip,
192 * Set the pseudo-rapidity of
193 * @f$ \text{FMD}\langle detector\rangle\lange ring\rangle_{\langle
194 * sector\rangle\langle strip\rangle}@f$
196 * @param detector Detector number (1-3)
197 * @param ring Ring identifier ('I' or 'O')
198 * @param sector Sector number (0-511, or 0-255)
199 * @param strip Strip number (0-19, or 0-39)
200 * @param eta Psuedo rapidity
202 void SetEta(UShort_t detector, Char_t ring,
203 UShort_t sector, UShort_t strip,
206 * @param f the factor for noise suppression
208 void SetNoiseFactor(Float_t f) { fNoiseFactor = f; }
210 * @param done Whether we've done angle correction or not
212 void SetAngleCorrected(Bool_t done) { fAngleCorrected = done; }
214 * @return Whether we've done angle correction or not
216 Bool_t IsAngleCorrected() const { return fAngleCorrected; }
218 * @return the factor for noise suppression
220 Float_t GetNoiseFactor() const { return fNoiseFactor; }
222 * @return maximum number of detectors
224 UShort_t MaxDetectors() const { return fMultiplicity.MaxDetectors(); }
226 * @return maximum number of rings
228 UShort_t MaxRings() const { return fMultiplicity.MaxRings(); }
230 * @return maximum number of sectors
232 UShort_t MaxSectors() const { return fMultiplicity.MaxSectors(); }
234 * @return Maximum number of strips
236 UShort_t MaxStrips() const { return fMultiplicity.MaxStrips(); }
238 * Print this object to standard out.
240 * @param option Options
242 void Print(Option_t* option="") const;
244 * Check if we need the @c UShort_t fix
246 * @param file File this object was read from
248 void CheckNeedUShort(TFile* file);
250 * Call the function operator of the passed object @a algo for each
251 * entry in this object
253 * @param algo Algorithm
255 * @return @c kTRUE on success, @c kFALSE if the passed object
256 * failed at any entry. It will return immediately on error.
258 Bool_t ForEach(ForOne& algo) const;
260 /** Value used for undefined multiplicity */
264 /** Value used for undefined pseudo rapidity */
268 * @return constant reference to multiplicity map
270 const AliFMDFloatMap& MultiplicityMap() const { return fMultiplicity; }
272 * @return constant reference to pseudo-rapidity map
274 const AliFMDFloatMap& EtaMap() const { return fEta; }
276 AliFMDFloatMap fMultiplicity; // Psuedo multplicity per strip
277 AliFMDFloatMap fEta; // Psuedo-rapidity per strip
278 Float_t fNoiseFactor; // Factor used for noise suppresion
279 Bool_t fAngleCorrected; // Whether we've done angle correction
280 ClassDef(AliESDFMD,3) // ESD info from FMD
283 //____________________________________________________________________