29 #ifdef G4MULTITHREADED
58 for (
G4int i=0; i<size; ++i)
59 vect[i] =
shoot(mean,stdDev);
66 for (
G4int i=0; i<size; ++i)
67 vect[i] =
shoot(anEngine,mean,stdDev);
72 for (
G4int i=0; i<size; ++i)
79 for (
G4int i=0; i<size; ++i)
80 vect[i] =
fire( mean, stdDev );
93 #define Table0size 250
94 #define Table1size 1000
95 #define TableSize (Table0size+Table1size)
97 #define Table0step (2.0E-6)
98 #define Table1step (5.0E-4)
100 #define Table0scale (1.0/Table1step)
102 #define Table0offset 0
103 #define Table1offset (Table0size)
108 #include "gaussQTables.cdat"
138 G4double y0 = gaussTables [index++];
141 return (
G4float) (sign * ( y1 * dx + y0 * (1.0-dx) ));
170 for (
G4int i = 1; i < 50; i++ ) {
172 G4double s = -13*11*9*7*5*3 * vn2*vn2*vn2*vn2*vn2*vn2*vn2;
173 s += 11*9*7*5*3 * vn2*vn2*vn2*vn2*vn2*vn2;
174 s += -9*7*5*3 * vn2*vn2*vn2*vn2*vn2;
175 s += 7*5*3 * vn2*vn2*vn2*vn2;
176 s += -5*3 * vn2*vn2*vn2;
177 s += 3 * vn2*vn2 - vn2 + 1.0;
178 v = std::sqrt ( 2.0 * std::log ( s / (r*guess*std::sqrt(CLHEP::twopi)) ) );
179 if ( std::fabs(v-guess) < eps )
break;
virtual ~G4MTRandGaussQ()
virtual G4double operator()()
G4MTRandGaussQ(CLHEP::HepRandomEngine &anEngine, G4double mean=0.0, G4double stdDev=1.0)
static G4double transformQuick(G4double r)
static G4double transformSmall(G4double r)
static void shootArray(const G4int size, G4double *vect, G4double mean=0.0, G4double stdDev=1.0)
void fireArray(const G4int size, G4double *vect)
CLHEP::HepRandomEngine * localEngine