Changeset 2835 for trunk/MagicSoft
- Timestamp:
- 01/16/04 16:14:16 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mcalib/MHCalibrationBlindPixel.h
r2828 r2835 132 132 BlindPixelFitFunc fgSinglePheFitFunc; //! In the beginning, 133 133 Int_t fgSinglePheFitNPar; //! we want to be flexible using different functions 134 135 inline static Double_t gfKto4(Double_t *x, Double_t *par)134 135 inline static Double_t fAna(Double_t *x, Double_t *par) 136 136 { 137 137 … … 152 152 if (sigma1 < sigma0) 153 153 return NoWay; 154 155 154 156 155 Double_t mu2 = (2.*mu1)-mu0; … … 188 187 return TMath::Exp(-1.*lambda)*par[5]*sum; 189 188 190 } //-> 191 192 inline static Double_t gfKto5(Double_t *x, Double_t *par) 189 } 190 191 inline static Double_t fKto4(Double_t *x, Double_t *par) 192 { 193 194 Double_t lambda = par[0]; 195 196 Double_t sum = 0.; 197 Double_t arg = 0.; 198 199 Double_t mu0 = par[1]; 200 Double_t mu1 = par[2]; 201 202 if (mu1 < mu0) 203 return NoWay; 204 205 Double_t sigma0 = par[3]; 206 Double_t sigma1 = par[4]; 207 208 if (sigma1 < sigma0) 209 return NoWay; 210 211 Double_t mu2 = (2.*mu1)-mu0; 212 Double_t mu3 = (3.*mu1)-(2.*mu0); 213 Double_t mu4 = (4.*mu1)-(3.*mu0); 214 215 Double_t sigma2 = TMath::Sqrt((2.*sigma1*sigma1) - (sigma0*sigma0)); 216 Double_t sigma3 = TMath::Sqrt((3.*sigma1*sigma1) - (2.*sigma0*sigma0)); 217 Double_t sigma4 = TMath::Sqrt((4.*sigma1*sigma1) - (3.*sigma0*sigma0)); 218 219 Double_t lambda2 = lambda*lambda; 220 Double_t lambda3 = lambda2*lambda; 221 Double_t lambda4 = lambda3*lambda; 222 223 // k=0: 224 arg = (x[0] - mu0)/sigma0; 225 sum = TMath::Exp(-0.5*arg*arg)/sigma0; 226 227 // k=1: 228 arg = (x[0] - mu1)/sigma1; 229 sum += lambda*TMath::Exp(-0.5*arg*arg)/sigma1; 230 231 // k=2: 232 arg = (x[0] - mu2)/sigma2; 233 sum += 0.5*lambda2*TMath::Exp(-0.5*arg*arg)/sigma2; 234 235 // k=3: 236 arg = (x[0] - mu3)/sigma3; 237 sum += 0.1666666667*lambda3*TMath::Exp(-0.5*arg*arg)/sigma3; 238 239 // k=4: 240 arg = (x[0] - mu4)/sigma4; 241 sum += 0.041666666666667*lambda4*TMath::Exp(-0.5*arg*arg)/sigma4; 242 243 return TMath::Exp(-1.*lambda)*par[5]*sum; 244 245 } 246 247 248 inline static Double_t fKto5(Double_t *x, Double_t *par) 193 249 { 194 250 … … 255 311 256 312 257 inline static Double_t gfKto6(Double_t *x, Double_t *par)313 inline static Double_t fKto6(Double_t *x, Double_t *par) 258 314 { 259 315
Note:
See TracChangeset
for help on using the changeset viewer.