GENIEGenerator
|
A singleton holding random number generator classes. All random number generation in GENIE should take place through this class. Ensures that the random number generator seed is set consistently to all GENIE modules and that all modules use the preferred rndm number generator. More...
#include <RandomGen.h>
Classes | |
struct | Cleaner |
Public Member Functions | |
TRandom3 & | RndKine (void) const |
rnd number generator used by kinematics generators More... | |
TRandom3 & | RndHadro (void) const |
rnd number generator used by hadronization models More... | |
TRandom3 & | RndDec (void) const |
rnd number generator used by decay models More... | |
TRandom3 & | RndFsi (void) const |
rnd number generator used by intranuclear cascade monte carlos More... | |
TRandom3 & | RndLep (void) const |
rnd number generator used by final state primary lepton generators More... | |
TRandom3 & | RndISel (void) const |
rnd number generator used by interaction selectors More... | |
TRandom3 & | RndGeom (void) const |
rnd number generator used by geometry drivers More... | |
TRandom3 & | RndFlux (void) const |
rnd number generator used by flux drivers More... | |
TRandom3 & | RndEvg (void) const |
rnd number generator used by the event generation drivers More... | |
TRandom3 & | RndNum (void) const |
rnd number generator used by MC integrators & other numerical methods More... | |
TRandom3 & | RndGen (void) const |
rnd number generator for generic usage More... | |
long int | GetSeed (void) const |
void | SetSeed (long int seed) |
Static Public Member Functions | |
static RandomGen * | Instance () |
Access instance. More... | |
Private Member Functions | |
RandomGen () | |
RandomGen (const RandomGen &rgen) | |
virtual | ~RandomGen () |
void | InitRandomGenerators (long int seed) |
Private Attributes | |
TRandom3 * | fRandom3 |
Mersenne Twistor. More... | |
long int | fCurrSeed |
random number generator seed number More... | |
bool | fInitalized |
done initializing singleton? More... | |
Static Private Attributes | |
static RandomGen * | fInstance = 0 |
Friends | |
struct | Cleaner |
A singleton holding random number generator classes. All random number generation in GENIE should take place through this class. Ensures that the random number generator seed is set consistently to all GENIE modules and that all modules use the preferred rndm number generator.
Definition at line 29 of file RandomGen.h.
|
private |
Definition at line 27 of file RandomGen.cxx.
References genie::gAbortingInErr, genie::controls::kDefaultRandSeed, LOG, pFATAL, and pINFO.
|
private |
|
privatevirtual |
Definition at line 65 of file RandomGen.cxx.
|
inline |
Definition at line 82 of file RandomGen.h.
References fCurrSeed.
Referenced by genie::Pythia8Hadro2019::Initialize().
|
private |
Definition at line 126 of file RandomGen.cxx.
|
static |
Access instance.
Definition at line 71 of file RandomGen.cxx.
References genie::RandomGen::Cleaner::DummyMethodAndSilentCompiler().
Referenced by genie::HNIntranuke2018::AbsorbHN(), genie::BaryonResonanceDecayer::AcceptPionDecay(), genie::MECGenerator::AddFinalStateLepton(), genie::CEvNSEventGenerator::AddFinalStateNeutrino(), genie::AMNuGammaGenerator::AddPhoton(), genie::HEDISGenerator::AddPrimaryLepton(), genie::NucDeExcitationSim::ArgonTargetSim(), INukeNucleonCorr::AvgCorrection(), BuildSpectrum(), genie::hnl::VertexGenerator::CalcTravelLength(), genie::COHHadronicSystemGenerator::CalculateHadronicSystem_BergerSehgalFM(), genie::COHHadronicSystemGenerator::CalculateHadronicSystem_ReinSehgal(), genie::COHKinematicsGenerator::CalculateKin_AlvarezRuso(), genie::SKKinematicsGenerator::CalculateKin_AtharSingleKaon(), genie::COHKinematicsGenerator::CalculateKin_BergerSehgal(), genie::COHKinematicsGenerator::CalculateKin_BergerSehgalFM(), genie::COHKinematicsGenerator::CalculateKin_ReinSehgal(), genie::NucDeExcitationSim::CarbonTargetSim(), genie::flux::GFluxBlender::ChooseFlavor(), ConvertToGTracker(), genie::DarkSectorDecayer::Decay(), genie::AGKYLowW2019::DecayBackToBack(), genie::BaryonResonanceDecayer::DecayExclusive(), genie::AGKYLowW2019::DecayMethod2(), genie::MECGenerator::DecayNucleonCluster(), genie::HNIntranuke2018::ElasHN(), genie::utils::intranuke::Equilibrium(), genie::utils::intranuke2018::Equilibrium(), genie::BaryonResonanceDecayer::FindDistributionExtrema(), genie::HNIntranuke2018::GammaInelasticHN(), genie::geometry::ROOTGeomAnalyzer::GenBoxRay(), genie::AGKYLowW2019::GenerateBaryonPdgCode(), genie::AGCharm2019::GenerateCharmHadron(), genie::NucleonDecayPrimaryVtxGenerator::GenerateDecayedNucleonPosition(), genie::hnl::Decayer::GenerateDecayPosition(), genie::NucleonDecayPrimaryVtxGenerator::GenerateDecayProducts(), genie::NNBarOscPrimaryVtxGenerator::GenerateDecayProducts(), genie::hnl::Decayer::GenerateDecayProducts(), genie::GMCJDriver::GenerateEvent1Try(), genie::AGKYLowW2019::GenerateHadronCodes(), genie::CEvNSEventGenerator::GenerateKinematics(), genie::COHDNuEventGenerator::GenerateKinematics(), genie::hnl::Decayer::GenerateMomentum(), genie::flux::GPowerLawFlux::GenerateNext(), genie::flux::GMonoEnergeticFlux::GenerateNext(), genie::flux::GJPARCNuFlux::GenerateNext(), genie::flux::GSimpleNtpFlux::GenerateNext(), genie::flux::GNuMIFlux::GenerateNext(), genie::flux::GAtmoFlux::GenerateNext_1try(), genie::flux::GNuMIFlux::GenerateNext_weighted(), genie::SpectralFunc::GenerateNucleon(), genie::EffectiveSF::GenerateNucleon(), genie::LocalFGM::GenerateNucleon(), genie::FGMBodekRitchie::GenerateNucleon(), genie::SpectralFunc1d::GenerateNucleon(), GenerateOriginMomentum(), GenerateOriginPosition(), genie::NNBarOscPrimaryVtxGenerator::GenerateOscillatingNeutronPosition(), genie::flux::GCylindTH1Flux::GeneratePhi(), GeneratePosition(), genie::Intranuke::GenerateStep(), genie::Intranuke2018::GenerateStep(), INukeNucleonCorr::generateTargetNucleon(), genie::VertexGenerator::GenerateVertex(), genie::geometry::ROOTGeomAnalyzer::GenerateVertex(), genie::Intranuke::GenerateVertex(), genie::Intranuke2018::GenerateVertex(), genie::hnl::FluxCreator::GetAngDeviation(), GetDetectorVertex(), GetRandomRay(), GetTargetMaterial(), genie::HAIntranuke::HadronFateHA(), genie::HAIntranuke2018::HadronFateHA(), genie::HNIntranuke2018::HadronFateHN(), genie::HNIntranuke2018::HadronFateOset(), genie::LeptoHadronization::Hadronize(), genie::AGCharm2019::Hadronize(), genie::hnl::FluxCreator::HNLEnergy(), genie::HAIntranuke::Inelastic(), genie::HAIntranuke2018::Inelastic(), genie::HAIntranuke::InelasticHA(), genie::HAIntranuke2018::InelasticHA(), genie::PhotonRESGenerator::Initialize(), genie::PhotonCOHGenerator::Initialize(), genie::PythiaDecayer::Initialize(), genie::LeptoHadronization::Initialize(), genie::Pythia6Hadro2019::Initialize(), genie::Pythia8Hadro2019::Initialize(), genie::INukeHadroData2018::IntBounce(), genie::INukeHadroData::IntBounce(), genie::flux::GSimpleNtpFlux::LoadBeamSimData(), genie::flux::GNuMIFlux::LoadBeamSimData(), genie::GLRESGenerator::LoadConfig(), main(), genie::PythiaBaseHadro2019::MakeQuarkDiquarkAssignments(), genie::hnl::FluxCreator::MakeTupleFluxEntry(), genie::NucDeExcitationSim::OxygenTargetSim(), genie::AGKYLowW2019::PhaseSpaceDecay(), genie::utils::intranuke::PhaseSpaceDecay(), genie::utils::intranuke2018::PhaseSpaceDecay(), genie::NucDeExcitationSim::Photon4P(), genie::NucDeExcitationSim::PhotonEnergySmearing(), genie::HAIntranuke::PiBounce(), genie::HAIntranuke2018::PiBounce(), genie::utils::intranuke::PionProduction(), genie::utils::intranuke2018::PionProduction(), genie::HAIntranuke::PnBounce(), genie::HAIntranuke2018::PnBounce(), genie::hnl::FluxCreator::PointToRandomPointInBBox(), genie::hnl::Decayer::PolarisedDecay(), genie::utils::intranuke::PreEquilibrium(), genie::utils::intranuke2018::PreEquilibrium(), genie::NuEPrimaryLeptonGenerator::ProcessEventRecord(), genie::HELeptonKinematicsGenerator::ProcessEventRecord(), genie::DFRHadronicSystemGenerator::ProcessEventRecord(), genie::DMEOutgoingDarkGenerator::ProcessEventRecord(), genie::NuEKinematicsGenerator::ProcessEventRecord(), genie::DFRKinematicsGenerator::ProcessEventRecord(), genie::PrimaryLeptonGenerator::ProcessEventRecord(), genie::INukeDeltaPropg::ProcessEventRecord(), genie::QELKinematicsGenerator::ProcessEventRecord(), genie::DMEKinematicsGenerator::ProcessEventRecord(), genie::RESKinematicsGenerator::ProcessEventRecord(), genie::HENuElGenerator::ProcessEventRecord(), genie::PhotonCOHGenerator::ProcessEventRecord(), genie::PhotonRESGenerator::ProcessEventRecord(), genie::QELEventGenerator::ProcessEventRecord(), genie::OutgoingDarkGenerator::ProcessEventRecord(), genie::IBDKinematicsGenerator::ProcessEventRecord(), genie::DMELKinematicsGenerator::ProcessEventRecord(), genie::DISKinematicsGenerator::ProcessEventRecord(), genie::HEDISKinematicsGenerator::ProcessEventRecord(), genie::GLRESGenerator::ProcessEventRecord(), genie::DMELEventGenerator::ProcessEventRecord(), genie::NucDeExcitationSim::ProcessEventRecord(), genie::DMDISKinematicsGenerator::ProcessEventRecord(), genie::evtlib::EventLibraryInterface::ProcessEventRecord(), genie::QELEventGeneratorSM::ProcessEventRecord(), genie::SPPEventGenerator::ProcessEventRecord(), genie::utils::app_init::RandGen(), genie::flux::GJPARCNuFlux::RandomOffset(), SelectAnnihilationMode(), genie::BaryonResonanceDecayer::SelectDecayChannel(), genie::DarkSectorDecayer::SelectDecayChannel(), SelectDecayMode(), genie::MECGenerator::SelectEmpiricalKinematics(), genie::flux::GAstroFlux::NuGenerator::SelectEnergy(), genie::AGKY2019::SelectHadronizer(), genie::PhysInteractionSelector::SelectInteraction(), genie::ToyInteractionSelector::SelectInteraction(), genie::QELEventGeneratorSuSA::SelectLeptonKinematics(), genie::flux::GCylindTH1Flux::SelectNeutrino(), genie::flux::GAtmoFlux::SelectNeutrino(), genie::MECGenerator::SelectNSVLeptonKinematics(), genie::flux::GAstroFlux::NuGenerator::SelectNuPdg(), genie::flux::GAstroFlux::NuGenerator::SelectOrigin(), genie::RSPPResonanceSelector::SelectResonance(), genie::flux::GPointSourceAstroFlux::SelectSource(), genie::MECGenerator::SelectSuSALeptonKinematics(), genie::DarkSectorDecayer::SetSpaceTime(), genie::QELKinematicsGenerator::SpectralFuncExperimentalCode(), genie::DMELKinematicsGenerator::SpectralFuncExperimentalCode(), genie::SRCNuclearRecoil::SRCRecoilPDG(), genie::utils::intranuke::ThreeBodyKinematics(), genie::utils::intranuke2018::ThreeBodyKinematics(), genie::utils::intranuke::TwoBodyKinematics(), genie::utils::intranuke2018::TwoBodyKinematics(), and genie::hnl::Decayer::UnpolarisedDecay().
|
inline |
rnd number generator used by decay models
Definition at line 56 of file RandomGen.h.
References fRandom3.
Referenced by genie::NucDeExcitationSim::ArgonTargetSim(), genie::NucDeExcitationSim::CarbonTargetSim(), genie::DarkSectorDecayer::Decay(), genie::BaryonResonanceDecayer::DecayExclusive(), genie::MECGenerator::DecayNucleonCluster(), genie::NucDeExcitationSim::OxygenTargetSim(), genie::NucDeExcitationSim::Photon4P(), genie::NucDeExcitationSim::PhotonEnergySmearing(), genie::NucDeExcitationSim::ProcessEventRecord(), genie::BaryonResonanceDecayer::SelectDecayChannel(), genie::DarkSectorDecayer::SelectDecayChannel(), and genie::DarkSectorDecayer::SetSpaceTime().
|
inline |
rnd number generator used by the event generation drivers
Definition at line 74 of file RandomGen.h.
References fRandom3.
Referenced by genie::GMCJDriver::GenerateEvent1Try(), and genie::evtlib::EventLibraryInterface::ProcessEventRecord().
|
inline |
rnd number generator used by flux drivers
Definition at line 71 of file RandomGen.h.
References fRandom3.
Referenced by genie::flux::GFluxBlender::ChooseFlavor(), genie::flux::GPowerLawFlux::GenerateNext(), genie::flux::GMonoEnergeticFlux::GenerateNext(), genie::flux::GJPARCNuFlux::GenerateNext(), genie::flux::GSimpleNtpFlux::GenerateNext(), genie::flux::GNuMIFlux::GenerateNext(), genie::flux::GAtmoFlux::GenerateNext_1try(), genie::flux::GNuMIFlux::GenerateNext_weighted(), genie::flux::GCylindTH1Flux::GeneratePhi(), GetDetectorVertex(), GetRandomRay(), GetTargetMaterial(), genie::flux::GSimpleNtpFlux::LoadBeamSimData(), genie::flux::GNuMIFlux::LoadBeamSimData(), genie::flux::GJPARCNuFlux::RandomOffset(), genie::flux::GAstroFlux::NuGenerator::SelectEnergy(), genie::flux::GCylindTH1Flux::SelectNeutrino(), genie::flux::GAtmoFlux::SelectNeutrino(), genie::flux::GAstroFlux::NuGenerator::SelectNuPdg(), genie::flux::GAstroFlux::NuGenerator::SelectOrigin(), and genie::flux::GPointSourceAstroFlux::SelectSource().
|
inline |
rnd number generator used by intranuclear cascade monte carlos
Definition at line 59 of file RandomGen.h.
References fRandom3.
Referenced by genie::HNIntranuke2018::AbsorbHN(), genie::HNIntranuke2018::ElasHN(), genie::utils::intranuke::Equilibrium(), genie::utils::intranuke2018::Equilibrium(), genie::HNIntranuke2018::GammaInelasticHN(), genie::NucleonDecayPrimaryVtxGenerator::GenerateDecayedNucleonPosition(), genie::NNBarOscPrimaryVtxGenerator::GenerateOscillatingNeutronPosition(), genie::Intranuke::GenerateStep(), genie::Intranuke2018::GenerateStep(), genie::VertexGenerator::GenerateVertex(), genie::Intranuke::GenerateVertex(), genie::Intranuke2018::GenerateVertex(), genie::HAIntranuke::HadronFateHA(), genie::HAIntranuke2018::HadronFateHA(), genie::HNIntranuke2018::HadronFateHN(), genie::HNIntranuke2018::HadronFateOset(), genie::HAIntranuke::Inelastic(), genie::HAIntranuke2018::Inelastic(), genie::HAIntranuke::InelasticHA(), genie::HAIntranuke2018::InelasticHA(), genie::INukeHadroData2018::IntBounce(), genie::INukeHadroData::IntBounce(), genie::utils::intranuke::PhaseSpaceDecay(), genie::utils::intranuke2018::PhaseSpaceDecay(), genie::HAIntranuke::PiBounce(), genie::HAIntranuke2018::PiBounce(), genie::utils::intranuke::PionProduction(), genie::utils::intranuke2018::PionProduction(), genie::HAIntranuke::PnBounce(), genie::HAIntranuke2018::PnBounce(), genie::utils::intranuke::PreEquilibrium(), genie::utils::intranuke2018::PreEquilibrium(), genie::INukeDeltaPropg::ProcessEventRecord(), genie::utils::intranuke::ThreeBodyKinematics(), genie::utils::intranuke2018::ThreeBodyKinematics(), genie::utils::intranuke::TwoBodyKinematics(), and genie::utils::intranuke2018::TwoBodyKinematics().
|
inline |
rnd number generator for generic usage
Definition at line 80 of file RandomGen.h.
References fRandom3.
Referenced by INukeNucleonCorr::AvgCorrection(), BuildSpectrum(), genie::hnl::VertexGenerator::CalcTravelLength(), ConvertToGTracker(), genie::hnl::Decayer::GenerateDecayPosition(), genie::hnl::Decayer::GenerateDecayProducts(), genie::hnl::Decayer::GenerateMomentum(), genie::SpectralFunc::GenerateNucleon(), genie::LocalFGM::GenerateNucleon(), genie::EffectiveSF::GenerateNucleon(), genie::SpectralFunc1d::GenerateNucleon(), genie::FGMBodekRitchie::GenerateNucleon(), GenerateOriginMomentum(), GenerateOriginPosition(), INukeNucleonCorr::generateTargetNucleon(), genie::hnl::FluxCreator::GetAngDeviation(), main(), genie::hnl::FluxCreator::MakeTupleFluxEntry(), genie::hnl::FluxCreator::PointToRandomPointInBBox(), genie::hnl::Decayer::PolarisedDecay(), genie::QELEventGeneratorSM::ProcessEventRecord(), SelectDecayMode(), genie::RSPPResonanceSelector::SelectResonance(), and genie::SRCNuclearRecoil::SRCRecoilPDG().
|
inline |
rnd number generator used by geometry drivers
Definition at line 68 of file RandomGen.h.
References fRandom3.
Referenced by genie::geometry::ROOTGeomAnalyzer::GenBoxRay(), GeneratePosition(), and genie::geometry::ROOTGeomAnalyzer::GenerateVertex().
|
inline |
rnd number generator used by hadronization models
Definition at line 53 of file RandomGen.h.
References fRandom3.
Referenced by genie::COHHadronicSystemGenerator::CalculateHadronicSystem_BergerSehgalFM(), genie::COHHadronicSystemGenerator::CalculateHadronicSystem_ReinSehgal(), genie::AGKYLowW2019::GenerateBaryonPdgCode(), genie::AGCharm2019::GenerateCharmHadron(), genie::NucleonDecayPrimaryVtxGenerator::GenerateDecayProducts(), genie::NNBarOscPrimaryVtxGenerator::GenerateDecayProducts(), genie::AGKYLowW2019::GenerateHadronCodes(), genie::LeptoHadronization::Hadronize(), genie::AGCharm2019::Hadronize(), genie::hnl::FluxCreator::HNLEnergy(), genie::PythiaBaseHadro2019::MakeQuarkDiquarkAssignments(), genie::AGKYLowW2019::PhaseSpaceDecay(), genie::DFRHadronicSystemGenerator::ProcessEventRecord(), genie::AGKY2019::SelectHadronizer(), and genie::hnl::Decayer::UnpolarisedDecay().
|
inline |
rnd number generator used by interaction selectors
Definition at line 65 of file RandomGen.h.
References fRandom3.
Referenced by genie::PhysInteractionSelector::SelectInteraction(), and genie::ToyInteractionSelector::SelectInteraction().
|
inline |
rnd number generator used by kinematics generators
Random number generators used by various GENIE modules. (See note at http://root.cern.ch/root/html//TRandom.html on using several TRandom objects each with each own "independent" run sequence). At this point, since the actual random number generator periodicity is very high, all the generators are in fact one! However, the option to use many generators is reserved. Currently, the preferred generator is the "Mersenne Twister" with a periodicity of 10**6000 See: http://root.cern.ch/root/html/TRandom3.html
Definition at line 50 of file RandomGen.h.
References fRandom3.
Referenced by genie::AMNuGammaGenerator::AddPhoton(), genie::COHKinematicsGenerator::CalculateKin_AlvarezRuso(), genie::SKKinematicsGenerator::CalculateKin_AtharSingleKaon(), genie::COHKinematicsGenerator::CalculateKin_BergerSehgal(), genie::COHKinematicsGenerator::CalculateKin_BergerSehgalFM(), genie::COHKinematicsGenerator::CalculateKin_ReinSehgal(), genie::CEvNSEventGenerator::GenerateKinematics(), genie::COHDNuEventGenerator::GenerateKinematics(), genie::HELeptonKinematicsGenerator::ProcessEventRecord(), genie::DFRKinematicsGenerator::ProcessEventRecord(), genie::NuEKinematicsGenerator::ProcessEventRecord(), genie::DMEKinematicsGenerator::ProcessEventRecord(), genie::QELKinematicsGenerator::ProcessEventRecord(), genie::RESKinematicsGenerator::ProcessEventRecord(), genie::QELEventGenerator::ProcessEventRecord(), genie::IBDKinematicsGenerator::ProcessEventRecord(), genie::DMELKinematicsGenerator::ProcessEventRecord(), genie::DISKinematicsGenerator::ProcessEventRecord(), genie::HEDISKinematicsGenerator::ProcessEventRecord(), genie::DMELEventGenerator::ProcessEventRecord(), genie::DMDISKinematicsGenerator::ProcessEventRecord(), genie::QELEventGeneratorSM::ProcessEventRecord(), genie::SPPEventGenerator::ProcessEventRecord(), genie::MECGenerator::SelectEmpiricalKinematics(), genie::QELEventGeneratorSuSA::SelectLeptonKinematics(), genie::MECGenerator::SelectNSVLeptonKinematics(), genie::MECGenerator::SelectSuSALeptonKinematics(), genie::QELKinematicsGenerator::SpectralFuncExperimentalCode(), and genie::DMELKinematicsGenerator::SpectralFuncExperimentalCode().
|
inline |
rnd number generator used by final state primary lepton generators
Definition at line 62 of file RandomGen.h.
References fRandom3.
Referenced by genie::MECGenerator::AddFinalStateLepton(), genie::CEvNSEventGenerator::AddFinalStateNeutrino(), genie::HEDISGenerator::AddPrimaryLepton(), genie::NuEPrimaryLeptonGenerator::ProcessEventRecord(), genie::DMEOutgoingDarkGenerator::ProcessEventRecord(), genie::PrimaryLeptonGenerator::ProcessEventRecord(), genie::OutgoingDarkGenerator::ProcessEventRecord(), genie::PhotonCOHGenerator::ProcessEventRecord(), genie::QELEventGeneratorSuSA::SelectLeptonKinematics(), genie::MECGenerator::SelectNSVLeptonKinematics(), and genie::MECGenerator::SelectSuSALeptonKinematics().
|
inline |
rnd number generator used by MC integrators & other numerical methods
Definition at line 77 of file RandomGen.h.
References fRandom3.
Referenced by genie::NNBarOscPrimaryVtxGenerator::GenerateDecayProducts(), and SelectAnnihilationMode().
void genie::RandomGen::SetSeed | ( | long int | seed | ) |
Definition at line 82 of file RandomGen.cxx.
References LOG, pINFO, and pNOTICE.
Referenced by genie::NNBarOscPrimaryVtxGenerator::GenerateDecayProducts(), genie::utils::app_init::RandGen(), and SelectAnnihilationMode().
|
friend |
Definition at line 109 of file RandomGen.h.
|
private |
random number generator seed number
Definition at line 94 of file RandomGen.h.
Referenced by GetSeed().
|
private |
done initializing singleton?
Definition at line 95 of file RandomGen.h.
|
staticprivate |
Definition at line 91 of file RandomGen.h.
Referenced by genie::RandomGen::Cleaner::~Cleaner().
|
private |