1 #ifndef ALIFMDCORRNOISEGAIN_H
2 #define ALIFMDCORRNOISEGAIN_H
3 #include <AliFMDFloatMap.h>
6 * Get the noise calibration. That is, the ratio
9 * \frac{\sigma_{i}}{g_{i}k}
12 * where @f$ k@f$ is a constant determined by the electronics of
13 * units DAC/MIP, and @f$ \sigma_i, g_i@f$ are the noise and gain of
14 * the @f$ i @f$ strip respectively.
16 * This correction is needed because some of the reconstructed data
17 * (what which have an AliESDFMD class version less than or equal to
18 * 3) used the wrong zero-suppression factor. The zero suppression
19 * factor used by the on-line electronics was 4, but due to a coding
20 * error in the AliFMDRawReader a zero suppression factor of 1 was
21 * assumed during the reconstruction. This shifts the zero of the
22 * energy loss distribution artificially towards the left (lover
25 * So let's assume the real zero-suppression factor is @f$ f@f$ while
26 * the zero suppression factor @f$ f'@f$ assumed in the reconstruction
27 * was (wrongly) lower. The number of ADC counts @f$ c_i'@f$ used in
28 * the reconstruction can be calculated from the reconstructed signal
32 * c_i' = m_i \times g_i \times k / \cos\theta_i
35 * where @f$\theta_i@f$ is the incident angle of the @f$ i@f$ strip.
37 * This number of counts used the wrong noise factor @f$ f'@f$ so to
38 * correct to the on-line value, we need to do
41 * c_i = c_i' - \floor{f'\times n_i} + \floor{f\times n_i}
44 * which gives the correct number of ADC counts over the pedestal. To
45 * convert back to the scaled energy loss signal we then need to
46 * calculate (noting that @f$ f,f'@f$ are integers)
49 * m_i &=& \frac{c_i \times \cos\theta_i}{g_i \times k}\\
50 * &=& \left(c_i' - \lfloor f'\times n_i\rfloor +
51 * \lfloor f\times n_i\rfloor\right)\frac{\cos\theta}{g_i \times k}\\
52 * &=& \left(\frac{m_i'\times g_i\times k}{\cos\theta} -
53 * \lfloor f'\times n_i\rfloor + \lfloor f\times n_i\rfloor\right)
54 * \frac{\cos\theta}{g_i \times k}\\
55 * &=& m_i' + \frac{1}{g_i \times k}
56 * \left(\lfloor f\times n_i}\rfloor-
57 * \lfloor f'\times n_i\rfloor\right)\cos\theta\\
58 * &=& m_i' + \frac{\lfloor n_i\rfloor}{g_i \times k}
59 * \left(f-f'\right)\cos\theta
63 class AliFMDCorrNoiseGain : public TObject
69 AliFMDCorrNoiseGain() : fValues(0) { fValues.Reset(-1); }
71 * Constructor from a float map
73 * @param map Construct from this map
75 AliFMDCorrNoiseGain(const AliFMDFloatMap& map) : fValues(map) {}
77 * Get the noise value for a particular strip
84 * @return Noise value for strip
86 Float_t Get(UShort_t d, Char_t r, UShort_t s, UShort_t t) const
88 return fValues(d, r, s, t);
91 * Set the value for a strip.
99 void Set(UShort_t d, Char_t r, UShort_t s, UShort_t t, Float_t x)
101 fValues(d, r, s, t) = x;
104 * Get a reference to the noise map
108 const AliFMDFloatMap& Values() { return fValues; }
110 AliFMDFloatMap fValues; // The noise-gain map
111 ClassDef(AliFMDCorrNoiseGain,1); // Clone of AliFMDCalibPedestal