162 double v1, v2, s, u1;
165 v1 = gRandom->Rndm();
166 return (log(1 - v1) / sigma + mean);
173 v1 = 2. * gRandom->Rndm() - 1.;
174 v2 = 2. * gRandom->Rndm() - 1.;
176 s = v1 * v1 + v2 * v2;
177 }
while (s >= 1.0 || s == 0.0);
179 u1 = sigma * v1 * (sqrt(-2. * log(s) / s)) + mean;
183 return (sigma * v2 * (sqrt(-2. * log(s) / s)) + mean);
200 static double fgdPeak[] = { 200., 302., 653., 1024., 2800.};
201 static double fgdSigma[] = { 10., 22., 153., 104., 38.};
202 static double fgdPeak2[] = { 300., 402., 853., 2000., 3024.};
203 static double fgdSigma2[] = { 22., 153., 104., 100., 20.};
209 return ((
long)(
gauss_rnd(fgdPeak[cnt], fgdSigma[cnt])));