ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4INCL::Random Namespace Reference

Classes

class  Adapter
 
class  SeedVector
 

Functions

void setGenerator (G4INCL::IRandomGenerator *aGenerator)
 
void setSeeds (const SeedVector &sv)
 
SeedVector getSeeds ()
 
G4double shoot ()
 
G4double shoot0 ()
 
G4double shoot1 ()
 
template<typename T >
T shootInteger (T n)
 
G4double gauss (G4double sigma=1.)
 
G4double gaussWithMemory (G4double sigma=1.)
 
ThreeVector normVector (G4double norm=1.)
 
ThreeVector sphereVector (G4double rmax=1.)
 
ThreeVector gaussVector (G4double sigma=1.)
 Generate Gaussianly-distributed ThreeVectors.
 
std::pair< G4double, G4doublecorrelatedGaussian (const G4double corrCoeff, const G4double x0=0., const G4double sigma=1.)
 Generate pairs of correlated Gaussian random numbers.
 
std::pair< G4double, G4doublecorrelatedUniform (const G4double corrCoeff)
 Generate pairs of correlated uniform random numbers.
 
void deleteGenerator ()
 
G4bool isInitialized ()
 
void saveSeeds ()
 Save the status of the random-number generator.
 
SeedVector getSavedSeeds ()
 Get the saved status of the random-number generator.
 
void initialize (Config const *const)
 Initialize generator according to a Config object.
 
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 183 of file G4INCLRandom.cc.

View newest version in sPHENIX GitHub at line 183 of file G4INCLRandom.cc

References gauss(), gaussWithMemory(), x, and y.

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 199 of file G4INCLRandom.cc.

View newest version in sPHENIX GitHub at line 199 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 204 of file G4INCLRandom.cc.

View newest version in sPHENIX GitHub at line 204 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 137 of file G4INCLRandom.cc.

View newest version in sPHENIX GitHub at line 137 of file G4INCLRandom.cc

References G4INCL::DeJongSpin::shoot().

Referenced by correlatedGaussian(), G4INCL::NpiToMissingStrangenessChannel::fillFinalState(), G4INCL::NNToMissingStrangenessChannel::fillFinalState(), 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 178 of file G4INCLRandom.cc.

View newest version in sPHENIX GitHub at line 178 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:

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

Generate random numbers using gaussian distribution to be used only for correlated pairs

Definition at line 141 of file G4INCLRandom.cc.

View newest version in sPHENIX GitHub at line 141 of file G4INCLRandom.cc

References G4ThreadLocal, shoot(), shoot0(), G4INCL::Math::twoPi, Acts::UnitConstants::u, and v.

Referenced by correlatedGaussian().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 257 of file G4INCLRandom.cc.

View newest version in sPHENIX GitHub at line 257 of file G4INCLRandom.cc

Referenced by G4INCL::PiNToMultiPionsChannel::isospinRepartition(), G4INCL::NNOmegaToMultiPionsChannel::isospinRepartition(), G4INCL::NNToMultiPionsChannel::isospinRepartition(), G4INCL::NNEtaToMultiPionsChannel::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 232 of file G4INCLRandom.cc.

View newest version in sPHENIX GitHub at line 232 of file G4INCLRandom.cc

SeedVector G4INCL::Random::getSeeds ( )

Get the seeds of the current generator.

Definition at line 89 of file G4INCLRandom.cc.

View newest version in sPHENIX GitHub 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 239 of file G4INCLRandom.cc.

View newest version in sPHENIX GitHub at line 239 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 213 of file G4INCLRandom.cc.

View newest version in sPHENIX GitHub at line 213 of file G4INCLRandom.cc

References theGenerator.

Referenced by G4CsvRNtupleManager::GetTNtupleRow(), G4Hdf5RNtupleManager::GetTNtupleRow(), G4RootRNtupleManager::GetTNtupleRow(), G4XmlRNtupleManager::GetTNtupleRow(), 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 162 of file G4INCLRandom.cc.

View newest version in sPHENIX GitHub at line 162 of file G4INCLRandom.cc

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

Referenced by G4INCL::EtaNElasticChannel::fillFinalState(), G4INCL::NLToNSChannel::fillFinalState(), G4INCL::NSToNLChannel::fillFinalState(), G4INCL::PiNToOmegaChannel::fillFinalState(), G4INCL::NKElasticChannel::fillFinalState(), G4INCL::NSToNSChannel::fillFinalState(), G4INCL::NYElasticChannel::fillFinalState(), G4INCL::NKToNKChannel::fillFinalState(), G4INCL::OmegaNElasticChannel::fillFinalState(), G4INCL::OmegaNToPiNChannel::fillFinalState(), G4INCL::RecombinationChannel::fillFinalState(), G4INCL::PhaseSpaceKopylov::generate(), G4INCL::PhaseSpaceRauboldLynch::generateEvent(), G4INCL::NKbToSpiChannel::KaonMomentum(), G4INCL::NKbToNKbChannel::KaonMomentum(), G4INCL::NKbElasticChannel::KaonMomentum(), G4INCL::NpiToSKChannel::KaonMomentum(), G4INCL::NKbToLpiChannel::KaonMomentum(), G4INCL::NpiToLKChannel::KaonMomentum(), 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.

View newest version in sPHENIX GitHub at line 50 of file G4INCLRandomSeedVector.cc

void G4INCL::Random::saveSeeds ( )

Save the status of the random-number generator.

Definition at line 225 of file G4INCLRandom.cc.

View newest version in sPHENIX GitHub at line 225 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.

View newest version in sPHENIX GitHub 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.

View newest version in sPHENIX GitHub at line 85 of file G4INCLRandom.cc

References theGenerator.

G4double G4INCL::Random::shoot ( )

Generate flat distribution of random numbers.

Definition at line 93 of file G4INCLRandom.cc.

View newest version in sPHENIX GitHub at line 93 of file G4INCLRandom.cc

References theGenerator.

Referenced by G4INCL::PhaseSpaceKopylov::betaKopylov(), G4INCL::DeltaDecayChannel::computeDecayTime(), G4INCL::PionResonanceDecayChannel::computeDecayTime(), G4INCL::SigmaZeroDecayChannel::computeDecayTime(), G4INCL::PhaseSpaceRauboldLynch::computeWeight(), G4INCL::Nucleus::decayInsideStrangeParticles(), G4INCL::IsotopicDistribution::drawRandomIsotope(), G4INCL::EtaNElasticChannel::fillFinalState(), G4INCL::NKbToSpiChannel::fillFinalState(), G4INCL::NpiToSKpiChannel::fillFinalState(), G4INCL::OmegaNToPiNChannel::fillFinalState(), G4INCL::OmegaNToPiPiNChannel::fillFinalState(), G4INCL::NDeltaToDeltaLKChannel::fillFinalState(), G4INCL::NKToNK2piChannel::fillFinalState(), G4INCL::NKToNKpiChannel::fillFinalState(), G4INCL::NLToNSChannel::fillFinalState(), G4INCL::NNEtaToMultiPionsChannel::fillFinalState(), G4INCL::PiNElasticChannel::fillFinalState(), G4INCL::PiNToEtaChannel::fillFinalState(), G4INCL::NDeltaToDeltaSKChannel::fillFinalState(), G4INCL::NNOmegaToMultiPionsChannel::fillFinalState(), G4INCL::EtaNToPiNChannel::fillFinalState(), G4INCL::NDeltaToNLKChannel::fillFinalState(), G4INCL::NNToMissingStrangenessChannel::fillFinalState(), G4INCL::NDeltaToNNKKbChannel::fillFinalState(), G4INCL::NNToMultiPionsChannel::fillFinalState(), G4INCL::NDeltaToNSKChannel::fillFinalState(), G4INCL::NpiToSKChannel::fillFinalState(), G4INCL::NpiToSK2piChannel::fillFinalState(), G4INCL::NNToNLK2piChannel::fillFinalState(), G4INCL::NpiToMissingStrangenessChannel::fillFinalState(), G4INCL::EtaNToPiPiNChannel::fillFinalState(), G4INCL::NKbToL2piChannel::fillFinalState(), G4INCL::NNToNLKChannel::fillFinalState(), G4INCL::NNToNSKpiChannel::fillFinalState(), G4INCL::NNToNLKpiChannel::fillFinalState(), G4INCL::NNToNNEtaChannel::fillFinalState(), G4INCL::NNToNNKKbChannel::fillFinalState(), G4INCL::NNToNNOmegaChannel::fillFinalState(), G4INCL::NNToNSK2piChannel::fillFinalState(), G4INCL::NNToNSKChannel::fillFinalState(), G4INCL::NKbToNKb2piChannel::fillFinalState(), G4INCL::NpiToLK2piChannel::fillFinalState(), G4INCL::NpiToLKpiChannel::fillFinalState(), G4INCL::NKbToNKbpiChannel::fillFinalState(), G4INCL::NpiToNKKbChannel::fillFinalState(), G4INCL::NKbToS2piChannel::fillFinalState(), G4INCL::NDeltaOmegaProductionChannel::fillFinalState(), G4INCL::DeltaProductionChannel::fillFinalState(), G4INCL::NeutralKaonDecayChannel::fillFinalState(), G4INCL::NDeltaEtaProductionChannel::fillFinalState(), G4INCL::ElasticChannel::fillFinalState(), G4INCL::PionResonanceDecayChannel::fillFinalState(), G4INCL::DeltaDecayChannel::fillFinalState(), G4AblaRandom::flat(), gaussWithMemory(), G4INCL::PhaseSpaceRauboldLynch::generate(), G4INCL::BinaryCollisionAvatar::getChannel(), G4INCL::SurfaceAvatar::getChannel(), G4INCL::NNEtaToMultiPionsChannel::inter2Part(), G4INCL::NNOmegaToMultiPionsChannel::inter2Part(), G4INCL::NNToMultiPionsChannel::inter2Part(), G4INCL::PauliGlobal::isBlocked(), G4INCL::PauliStandard::isBlocked(), G4INCL::PiNToMultiPionsChannel::isospinRepartition(), G4INCL::NNOmegaToMultiPionsChannel::isospinRepartition(), G4INCL::NNToMultiPionsChannel::isospinRepartition(), G4INCL::NNEtaToMultiPionsChannel::isospinRepartition(), G4INCL::NpiToSKChannel::KaonMomentum(), G4INCL::NKbToLpiChannel::KaonMomentum(), G4INCL::NKbElasticChannel::KaonMomentum(), G4INCL::NpiToLKChannel::KaonMomentum(), G4INCL::NKbToNKbChannel::KaonMomentum(), G4INCL::NKbToSpiChannel::KaonMomentum(), normVector(), G4INCL::INCL::preCascade(), G4INCL::StrangeAbsorbtionChannel::sampleAngles(), G4INCL::DeltaDecayChannel::sampleAngles(), G4INCL::PionResonanceDecayChannel::sampleAngles(), G4INCL::SigmaZeroDecayChannel::sampleAngles(), G4INCL::NDeltaToDeltaSKChannel::sampleDeltaMass(), G4INCL::NDeltaToDeltaLKChannel::sampleDeltaMass(), G4INCL::DeltaProductionChannel::sampleDeltaMass(), G4INCL::NDeltaEtaProductionChannel::sampleDeltaMass(), G4INCL::NDeltaOmegaProductionChannel::sampleDeltaMass(), G4INCL::ParticleSampler::sampleOneParticleWithoutRPCorrelation(), shoot0(), and shoot1().

G4double G4INCL::Random::shoot0 ( )

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

Definition at line 100 of file G4INCLRandom.cc.

View newest version in sPHENIX GitHub at line 100 of file G4INCLRandom.cc

References r, and shoot().

Referenced by gaussWithMemory(), 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.

View newest version in sPHENIX GitHub at line 107 of file G4INCLRandom.cc

References r, and 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 ( T  n)

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

Definition at line 98 of file G4INCLRandom.hh.

View newest version in sPHENIX GitHub at line 98 of file G4INCLRandom.hh

References n, shoot1(), and T.

+ Here is the call 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 174 of file G4INCLRandom.cc.

View newest version in sPHENIX GitHub at line 174 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: