36 double mean,
double stdDev )
38 for(
double*
v = vect;
v != vect + size; ++
v )
43 const int size,
double* vect,
44 double mean,
double stdDev )
46 for(
double*
v = vect;
v != vect + size; ++
v )
47 *
v =
shoot(anEngine,mean,stdDev);
52 for(
double*
v = vect;
v != vect + size; ++
v )
57 double mean,
double stdDev )
59 for(
double*
v = vect;
v != vect + size; ++
v )
60 *
v =
fire( mean, stdDev );
73 #define Table0size 250
74 #define Table1size 1000
75 #define TableSize (Table0size+Table1size)
77 #define Table0step (2.0E-6)
78 #define Table1step (5.0E-4)
80 #define Table0scale (1.0/Table1step)
82 #define Table0offset 0
83 #define Table1offset (Table0size)
88 #include "CLHEP/Random/gaussQTables.cdat"
120 return (
float) (sign * ( y1 * dx + y0 * (1.0-
dx) ));
149 for (
int i = 1; i < 50; i++ ) {
150 double vn2 = 1.0/(guess*guess);
151 double s1 = -13*11*9*7*5*3 * vn2*vn2*vn2*vn2*vn2*vn2*vn2;
152 s1 += 11*9*7*5*3 * vn2*vn2*vn2*vn2*vn2*vn2;
153 s1 += -9*7*5*3 * vn2*vn2*vn2*vn2*vn2;
154 s1 += 7*5*3 * vn2*vn2*vn2*vn2;
155 s1 += -5*3 * vn2*vn2*vn2;
156 s1 += 3 * vn2*vn2 - vn2 + 1.0;
157 v = std::sqrt ( 2.0 * std::log ( s1 / (r*guess*std::sqrt(
CLHEP::twopi)) ) );
158 if ( std::fabs(v-guess) < eps )
break;
166 int pr=os.precision(20);
167 os <<
" " <<
name() <<
"\n";
176 if (inName !=
name()) {
177 is.clear(std::ios::badbit | is.rdstate());
178 std::cerr <<
"Mismatch when expecting to read state of a "
179 <<
name() <<
" distribution\n"
180 <<
"Name found was " << inName
181 <<
"\nistream is left in the badbit state\n";