Changeset 3711
- Timestamp:
- 04/13/04 11:15:52 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r3710 r3711 18 18 19 19 -*-*- END OF LINE -*-*- 20 2004/04/13: Markus Gaug 21 22 * mcalib/MCalibrationPix.[h,cc] 23 add functions GetHiLoMeansDivided(), GetHiLoSigmasDivided() and 24 errors 25 26 20 27 2004/04/13: Thomas Bretz 21 28 -
trunk/MagicSoft/Mars/mcalib/MCalibrationPix.cc
r3677 r3711 129 129 } 130 130 131 132 // -------------------------------------------------------------------------- 133 // 134 // Return -1, if the LoGain Mean is zero or -1. (has not yet been set) 135 // Return -1, if the HiGain Mean is -1. (has not yet been set) 136 // Return fHiGainMean / fLoGainMean 137 // 138 Float_t MCalibrationPix::GetHiLoMeansDivided() const 139 { 140 141 if (fLoGainMean == 0. || fLoGainMean == -1.) 142 return -1.; 143 144 if (fHiGainMean == -1.) 145 return -1.; 146 147 return fHiGainMean / fLoGainMean; 148 149 } 150 151 // ---------------------------------------------------------------------------------- 152 // 153 // Return -1, if the LoGain Mean or its variance is zero or -1. (has not yet been set) 154 // Return -1, if the HiGain Mean or its variance is -1. (has not yet been set) 155 // Return propagated error of GetHiLoMeansDivided() 156 // 157 Float_t MCalibrationPix::GetHiLoMeansDividedErr() const 158 { 159 160 if (fLoGainMean == 0. || fLoGainMean == -1.) 161 return -1.; 162 163 if (fHiGainMean == -1.) 164 return -1.; 165 166 if (fLoGainMeanVar <= 0.) 167 return -1.; 168 169 if (fHiGainMeanVar <= 0.) 170 return -1.; 171 172 const Float_t lomeansquare = fLoGainMean * fLoGainMean; 173 const Float_t deltaHi = fHiGainMeanVar / lomeansquare; 174 const Float_t deltaLo = fLoGainMeanVar / (lomeansquare * lomeansquare) * fHiGainMean * fHiGainMean; 175 176 return TMath::Sqrt(deltaHi + deltaLo); 177 178 } 179 180 // -------------------------------------------------------------------------- 181 // 182 // Return -1, if the LoGain Sigma is zero or -1. (has not yet been set) 183 // Return -1, if the HiGain Sigma is -1. (has not yet been set) 184 // Return fHiGainSigma / fLoGainSigma 185 // 186 Float_t MCalibrationPix::GetHiLoSigmasDivided() const 187 { 188 189 if (fLoGainSigma == 0. || fLoGainSigma == -1.) 190 return -1.; 191 192 if (fHiGainSigma == -1.) 193 return -1.; 194 195 return fHiGainSigma / fLoGainSigma; 196 197 } 198 199 // ---------------------------------------------------------------------------------- 200 // 201 // Return -1, if the LoGain Sigma or its variance is zero or -1. (has not yet been set) 202 // Return -1, if the HiGain Sigma or its variance is -1. (has not yet been set) 203 // Return propagated error of GetHiLoSigmasDivided() 204 // 205 Float_t MCalibrationPix::GetHiLoSigmasDividedErr() const 206 { 207 208 if (fLoGainSigma == 0. || fLoGainSigma == -1.) 209 return -1.; 210 211 if (fHiGainSigma == -1.) 212 return -1.; 213 214 if (fLoGainSigmaVar <= 0.) 215 return -1.; 216 217 if (fHiGainSigmaVar <= 0.) 218 return -1.; 219 220 const Float_t losigmasquare = fLoGainSigma * fLoGainSigma; 221 const Float_t deltaHi = fHiGainSigmaVar / losigmasquare; 222 const Float_t deltaLo = fLoGainSigmaVar / (losigmasquare * losigmasquare) * fHiGainSigma * fHiGainSigma; 223 224 return TMath::Sqrt(deltaHi + deltaLo); 225 226 } 227 228 131 229 // -------------------------------------------------------------------------- 132 230 // -
trunk/MagicSoft/Mars/mcalib/MCalibrationPix.h
r3677 r3711 73 73 Float_t GetHiGainNumPickup () const { return fHiGainNumPickup; } 74 74 Float_t GetHiGainNumBlackout() const { return fHiGainNumBlackout; } 75 Float_t GetHiLoMeansDivided () const; 76 Float_t GetHiLoMeansDividedErr () const; 77 Float_t GetHiLoSigmasDivided () const; 78 Float_t GetHiLoSigmasDividedErr () const; 75 79 76 80 virtual Float_t GetLoGainMean () const { return fLoGainMean; }
Note:
See TracChangeset
for help on using the changeset viewer.