Geant4  10.02.p01
G4INCL::Random Namespace Reference

Classes

class  Adapter
 
class  SeedVector
 

Functions

void setGenerator (G4INCL::IRandomGenerator *aGenerator)
 Set the random number generator implementation to be used globally by INCL. More...
 
void setSeeds (const SeedVector &sv)
 Set the seeds of the current generator. More...
 
SeedVector getSeeds ()
 Get the seeds of the current generator. More...
 
G4double shoot ()
 Generate flat distribution of random numbers. More...
 
G4double shoot0 ()
 Return a random number in the ]0,1] interval. More...
 
G4double shoot1 ()
 Return a random number in the [0,1[ interval. More...
 
template<typename T >
shootInteger (T n)
 Return a random integer in the [0,n[ interval. More...
 
G4double gauss (G4double sigma=1.)
 Generate random numbers using gaussian distribution. More...
 
ThreeVector normVector (G4double norm=1.)
 Generate isotropically-distributed ThreeVectors of given norm. More...
 
ThreeVector sphereVector (G4double rmax=1.)
 Generate ThreeVectors that are uniformly distributed in a sphere of radius rmax. More...
 
ThreeVector gaussVector (G4double sigma=1.)
 Generate Gaussianly-distributed ThreeVectors. More...
 
std::pair< G4double, G4doublecorrelatedGaussian (const G4double corrCoeff, const G4double x0=0., const G4double sigma=1.)
 Generate pairs of correlated Gaussian random numbers. More...
 
std::pair< G4double, G4doublecorrelatedUniform (const G4double corrCoeff)
 Generate pairs of correlated uniform random numbers. More...
 
void deleteGenerator ()
 Delete the generator. More...
 
G4bool isInitialized ()
 Check if the generator is initialized. More...
 
void saveSeeds ()
 Save the status of the random-number generator. More...
 
SeedVector getSavedSeeds ()
 Get the saved status of the random-number generator. More...
 
void initialize (Config const *const)
 Initialize generator according to a Config object. More...
 
Adapter const & getAdapter ()
 
std::ostream & operator<< (std::ostream &out, SeedVector const &sv)
 

Function Documentation

std::pair< G4double, G4double > G4INCL::Random::correlatedGaussian ( const G4double  corrCoeff,
const G4double  x0 = 0.,
const G4double  sigma = 1. 
)

Generate pairs of correlated Gaussian random numbers.

Definition at line 155 of file G4INCLRandom.cc.

References factor, gauss(), and x.

Referenced by correlatedUniform().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::pair< G4double, G4double > G4INCL::Random::correlatedUniform ( const G4double  corrCoeff)

Generate pairs of correlated uniform random numbers.

Definition at line 165 of file G4INCLRandom.cc.

References correlatedGaussian(), and G4INCL::Math::gaussianCDF().

Referenced by G4INCL::ParticleSampler::sampleOneParticleWithFuzzyRPCorrelation().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4INCL::Random::deleteGenerator ( )

Delete the generator.

Definition at line 170 of file G4INCLRandom.cc.

References theGenerator.

Referenced by G4INCL::INCL::~INCL().

+ Here is the caller graph for this function:

G4double G4INCL::Random::gauss ( G4double  sigma = 1.)

Generate random numbers using gaussian distribution.

Definition at line 114 of file G4INCLRandom.cc.

References G4ThreadLocal, shoot(), shoot0(), and G4INCL::Math::twoPi.

Referenced by correlatedGaussian(), and gaussVector().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ThreeVector G4INCL::Random::gaussVector ( G4double  sigma = 1.)

Generate Gaussianly-distributed ThreeVectors.

Generate ThreeVectors that are distributed as a three-dimensional Gaussian of the given sigma.

Definition at line 150 of file G4INCLRandom.cc.

References gauss(), and G4INCL::Math::oneOverSqrtThree.

Referenced by G4INCL::DeJongSpin::shoot().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Adapter const & G4INCL::Random::getAdapter ( )

Definition at line 227 of file G4INCLRandom.cc.

Referenced by G4INCL::PiNToMultiPionsChannel::isospinRepartition(), G4INCL::NNToMultiPionsChannel::isospinRepartition(), G4INCL::INCL::makeCompoundNucleus(), and G4INCL::ProjectileRemnant::shuffleStoredComponents().

+ Here is the caller graph for this function:

SeedVector G4INCL::Random::getSavedSeeds ( )

Get the saved status of the random-number generator.

Definition at line 198 of file G4INCLRandom.cc.

SeedVector G4INCL::Random::getSeeds ( )

Get the seeds of the current generator.

Definition at line 89 of file G4INCLRandom.cc.

References theGenerator.

Referenced by G4INCL::CascadeAction::afterAvatarDefaultAction(), G4INCL::CascadeAction::beforeAvatarDefaultAction(), G4INCL::IAvatar::fillFinalState(), G4INCL::INCL::finalizeGlobalInfo(), and G4INCL::InteractionAvatar::postInteraction().

+ Here is the caller graph for this function:

void G4INCL::Random::initialize ( Config const * const  )

Initialize generator according to a Config object.

Definition at line 205 of file G4INCLRandom.cc.

References G4INCL::Ranecu3Type, G4INCL::RanecuType, and setGenerator().

Referenced by G4INCL::INCL::INCL().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4bool G4INCL::Random::isInitialized ( )

Check if the generator is initialized.

Definition at line 179 of file G4INCLRandom.cc.

References theGenerator.

Referenced by G4CsvRNtupleManager::GetNtupleRow(), G4RootRNtupleManager::GetNtupleRow(), G4XmlRNtupleManager::GetNtupleRow(), and setGenerator().

+ Here is the caller graph for this function:

ThreeVector G4INCL::Random::normVector ( G4double  norm = 1.)

Generate isotropically-distributed ThreeVectors of given norm.

Definition at line 134 of file G4INCLRandom.cc.

References shoot(), and G4INCL::Math::twoPi.

Referenced by G4INCL::RecombinationChannel::fillFinalState(), G4INCL::PhaseSpaceKopylov::generate(), G4INCL::PhaseSpaceRauboldLynch::generateEvent(), G4INCL::ParticleSampler::sampleOneParticleWithFuzzyRPCorrelation(), G4INCL::ParticleSampler::sampleOneParticleWithoutRPCorrelation(), and sphereVector().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::ostream& G4INCL::Random::operator<< ( std::ostream &  out,
SeedVector const &  sv 
)

Definition at line 50 of file G4INCLRandomSeedVector.cc.

void G4INCL::Random::saveSeeds ( )

Save the status of the random-number generator.

Definition at line 191 of file G4INCLRandom.cc.

References theGenerator.

void G4INCL::Random::setGenerator ( G4INCL::IRandomGenerator aGenerator)

Set the random number generator implementation to be used globally by INCL.

See also
G4INCL::IRandomGenerator

Definition at line 72 of file G4INCLRandom.cc.

References INCL_ERROR, isInitialized(), and theGenerator.

Referenced by initialize().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4INCL::Random::setSeeds ( const SeedVector &  sv)

Set the seeds of the current generator.

Definition at line 85 of file G4INCLRandom.cc.

References theGenerator.

G4double G4INCL::Random::shoot0 ( )

Return a random number in the ]0,1] interval.

Definition at line 100 of file G4INCLRandom.cc.

References shoot().

Referenced by gauss(), G4INCL::INCL::preCascade(), and sphereVector().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4double G4INCL::Random::shoot1 ( )

Return a random number in the [0,1[ interval.

Definition at line 107 of file G4INCLRandom.cc.

References shoot().

Referenced by shootInteger().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<typename T >
T G4INCL::Random::shootInteger ( n)

Return a random integer in the [0,n[ interval.

Definition at line 96 of file G4INCLRandom.hh.

References n, and shoot1().

Referenced by G4INCL::Random::Adapter::operator()().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ThreeVector G4INCL::Random::sphereVector ( G4double  rmax = 1.)

Generate ThreeVectors that are uniformly distributed in a sphere of radius rmax.

Definition at line 146 of file G4INCLRandom.cc.

References normVector(), G4INCL::Math::pow13(), and shoot0().

Referenced by G4INCL::ParticleSampler::sampleOneParticleWithFuzzyRPCorrelation(), and G4INCL::ParticleSampler::sampleOneParticleWithRPCorrelation().

+ Here is the call graph for this function:

+ Here is the caller graph for this function: