34 #define INCLXX_IN_GEANT4_MODE 1
62 #ifdef INCL_COUNT_RND_CALLS
74 INCL_ERROR(
"INCL random number generator already initialized." <<
'\n');
76 #ifdef INCL_COUNT_RND_CALLS
94 #ifdef INCL_COUNT_RND_CALLS
102 while( (r=
shoot()) <= 0. )
109 while( (r=
shoot()) >= 1. )
114 #ifndef INCLXX_IN_GEANT4_MODE
152 return sigma*std::sqrt(-2*std::log(u))*std::cos(v);
157 return sigma*std::sqrt(-2*std::log(u))*std::sin(v);
165 const G4double stheta = std::sqrt(1.-ctheta*ctheta);
168 norm * stheta * std::cos(phi),
169 norm * stheta * std::sin(phi),
185 G4double factor = 1.-corrCoeff*corrCoeff;
188 #ifndef INCLXX_IN_GEANT4_MODE
190 const G4double y = corrCoeff * x +
gauss(sigma*std::sqrt(factor)) + x0;
196 return std::make_pair(x, y);
218 #ifdef INCL_COUNT_RND_CALLS
220 unsigned long long getNumberOfCalls() {
244 #ifdef INCLXX_IN_GEANT4_MODE
246 #else // INCLXX_IN_GEANT4_MODE
247 RNGType rng = theConfig->getRNGType();
254 #endif // INCLXX_IN_GEANT4_MODE