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. )
129 return sigma*std::sqrt(-2*std::log(u))*std::cos(v);
134 return sigma*std::sqrt(-2*std::log(u))*std::sin(v);
141 const G4double stheta = std::sqrt(1.-ctheta*ctheta);
144 norm * stheta * std::cos(phi),
145 norm * stheta * std::sin(phi),
161 G4double factor = 1.-corrCoeff*corrCoeff;
166 return std::make_pair(x, y);
188 #ifdef INCL_COUNT_RND_CALLS
189 unsigned long long getNumberOfCalls() {
214 #ifdef INCLXX_IN_GEANT4_MODE
216 #else // INCLXX_IN_GEANT4_MODE
217 RNGType rng = theConfig->getRNGType();
224 #endif // INCLXX_IN_GEANT4_MODE
std::shared_ptr< HepRandom > theGenerator
void saveSeeds()
Save the status of the random-number generator.
ThreeVector gaussVector(G4double sigma=1.)
Generate Gaussianly-distributed ThreeVectors.
ThreeVector normVector(G4double norm=1.)
void initialize(Config const *const)
Initialize generator according to a Config object.
SeedVector getSavedSeeds()
Get the saved status of the random-number generator.
void setSeeds(const SeedVector &sv)
Adapter const & getAdapter()
Extended Ranecu-type RNG class.
std::pair< G4double, G4double > correlatedGaussian(const G4double corrCoeff, const G4double x0=0., const G4double sigma=1.)
Generate pairs of correlated Gaussian random numbers.
void setGenerator(G4INCL::IRandomGenerator *aGenerator)
G4double pow13(G4double x)
G4int operator()(const G4int n) const
ThreeVector sphereVector(G4double rmax=1.)
ThreeVector shoot(const G4int Ap, const G4int Af)
std::pair< G4double, G4double > correlatedUniform(const G4double corrCoeff)
Generate pairs of correlated uniform random numbers.
G4double gaussianCDF(const G4double x)
Cumulative distribution function for Gaussian.
const G4double oneOverSqrtThree
G4double gaussWithMemory(G4double sigma=1.)
G4double gauss(G4double sigma=1.)
#define INCLXX_IN_GEANT4_MODE