GENIEGenerator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | Friends | List of all members
genie::RandomGen Class Reference

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>

Collaboration diagram for genie::RandomGen:
Collaboration graph
[legend]

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 RandomGenInstance ()
 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 RandomGenfInstance = 0
 

Friends

struct Cleaner
 

Detailed Description

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.

Author
Costas Andreopoulos <c.andreopoulos cern.ch> University of Liverpool
Created:
September 22, 2004
License:
Copyright (c) 2003-2024, The GENIE Collaboration For the full text of the license visit http://copyright.genie-mc.org

Definition at line 29 of file RandomGen.h.

Constructor & Destructor Documentation

genie::RandomGen::RandomGen ( )
private

Definition at line 27 of file RandomGen.cxx.

References genie::gAbortingInErr, genie::controls::kDefaultRandSeed, LOG, pFATAL, and pINFO.

28 {
29  LOG("Rndm", pINFO) << "RandomGen late initialization";
30 
31  fInitalized = false;
32  fInstance = 0;
33 /*
34  // try to get this job's random number seed from the environment
35  const char * seed = gSystem->Getenv("GSEED");
36  if(seed) {
37  LOG("Rndm", pDEBUG) << "Reading RandomNumGenerator seed env. var $GSEED";
38  fCurrSeed = atoi(seed);
39  } else {
40  LOG("Rndm", pINFO) << "Env. var. $GSEED is not set. Using default seed";
41  fCurrSeed = kDefaultRandSeed; // default seed number
42  }
43  this->InitRandomGenerators(fCurrSeed);
44 */
45 
46  if ( gSystem->Getenv("GSEED") ) {
47  LOG("Rndm", pFATAL)
48  << "\n\n"
49  << "************************************************************************************** \n"
50  << "The random number seed is no longer set via the $GSEED variable.\n"
51  << "Please use the --seed option implemented in all GENIE apps or, if you access RandomGen \n"
52  << "directly in your user code, use RandomGen::SetSeed(long int seed).\n"
53  << "Unset $GSEED to continue running GENIE. \n"
54  << "************************************************************************************** \n";
55  gAbortingInErr = true;
56  exit(1);
57  }
58 
59  fCurrSeed = kDefaultRandSeed; // a default seed number is set a init
61 
62  fInitalized = true;
63 }
bool fInitalized
done initializing singleton?
Definition: RandomGen.h:95
static const unsigned int kDefaultRandSeed
Definition: Controls.h:37
#define pFATAL
Definition: Messenger.h:56
long int fCurrSeed
random number generator seed number
Definition: RandomGen.h:94
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:96
static RandomGen * fInstance
Definition: RandomGen.h:91
#define pINFO
Definition: Messenger.h:62
void InitRandomGenerators(long int seed)
Definition: RandomGen.cxx:126
bool gAbortingInErr
Definition: Messenger.cxx:34
genie::RandomGen::RandomGen ( const RandomGen rgen)
private
genie::RandomGen::~RandomGen ( )
privatevirtual

Definition at line 65 of file RandomGen.cxx.

66 {
67  fInstance = 0;
68  if(fRandom3) delete fRandom3;
69 }
TRandom3 * fRandom3
Mersenne Twistor.
Definition: RandomGen.h:93
static RandomGen * fInstance
Definition: RandomGen.h:91

Member Function Documentation

long int genie::RandomGen::GetSeed ( void  ) const
inline

Definition at line 82 of file RandomGen.h.

References fCurrSeed.

Referenced by genie::Pythia8Hadro2019::Initialize().

82 { return fCurrSeed; }
long int fCurrSeed
random number generator seed number
Definition: RandomGen.h:94
void genie::RandomGen::InitRandomGenerators ( long int  seed)
private

Definition at line 126 of file RandomGen.cxx.

127 {
128  fRandom3 = new TRandom3();
129  this->SetSeed(seed);
130 }
TRandom3 * fRandom3
Mersenne Twistor.
Definition: RandomGen.h:93
void SetSeed(long int seed)
Definition: RandomGen.cxx:82
RandomGen * genie::RandomGen::Instance ( void  )
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().

72 {
73  if(fInstance == 0) {
74  static RandomGen::Cleaner cleaner;
75  cleaner.DummyMethodAndSilentCompiler();
76 
77  fInstance = new RandomGen;
78  }
79  return fInstance;
80 }
friend struct Cleaner
Definition: RandomGen.h:109
static RandomGen * fInstance
Definition: RandomGen.h:91
TRandom3& genie::RandomGen::RndDec ( void  ) const
inline
TRandom3& genie::RandomGen::RndEvg ( void  ) const
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().

74 { return *fRandom3; }
TRandom3 * fRandom3
Mersenne Twistor.
Definition: RandomGen.h:93
TRandom3& genie::RandomGen::RndFlux ( void  ) const
inline
TRandom3& genie::RandomGen::RndFsi ( void  ) const
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().

59 { return *fRandom3; }
TRandom3 * fRandom3
Mersenne Twistor.
Definition: RandomGen.h:93
TRandom3& genie::RandomGen::RndGen ( void  ) const
inline
TRandom3& genie::RandomGen::RndGeom ( void  ) const
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().

68 { return *fRandom3; }
TRandom3 * fRandom3
Mersenne Twistor.
Definition: RandomGen.h:93
TRandom3& genie::RandomGen::RndHadro ( void  ) const
inline
TRandom3& genie::RandomGen::RndISel ( void  ) const
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().

65 { return *fRandom3; }
TRandom3 * fRandom3
Mersenne Twistor.
Definition: RandomGen.h:93
TRandom3& genie::RandomGen::RndKine ( void  ) const
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().

50 { return *fRandom3; }
TRandom3 * fRandom3
Mersenne Twistor.
Definition: RandomGen.h:93
TRandom3& genie::RandomGen::RndLep ( void  ) const
inline
TRandom3& genie::RandomGen::RndNum ( void  ) const
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().

77 { return *fRandom3; }
TRandom3 * fRandom3
Mersenne Twistor.
Definition: RandomGen.h:93
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().

83 {
84  LOG("Rndm", pNOTICE)
85  << "Setting"
86  << ((fInitalized) ? " " : " default ")
87  << "random number seed"
88  << ((fInitalized) ? ": " : " at random number generator initialization: ")
89  << seed;
90 
91  // Set the seed number for all internal GENIE random number generators
92  this->RndKine ().SetSeed(seed);
93  this->RndHadro().SetSeed(seed);
94  this->RndDec ().SetSeed(seed);
95  this->RndFsi ().SetSeed(seed);
96  this->RndLep ().SetSeed(seed);
97  this->RndISel ().SetSeed(seed);
98  this->RndGeom ().SetSeed(seed);
99  this->RndFlux ().SetSeed(seed);
100  this->RndEvg ().SetSeed(seed);
101  this->RndNum ().SetSeed(seed);
102  this->RndGen ().SetSeed(seed);
103 
104  // Set the seed number for ROOT's gRandom
105  gRandom ->SetSeed (seed);
106 
107  // Set the PYTHIA6 seed number
108  TPythia6 * pythia6 = TPythia6::Instance();
109  pythia6->SetMRPY(1, seed);
110 
111  LOG("Rndm", pINFO) << "RndKine seed = " << this->RndKine ().GetSeed();
112  LOG("Rndm", pINFO) << "RndHadro seed = " << this->RndHadro().GetSeed();
113  LOG("Rndm", pINFO) << "RndDec seed = " << this->RndDec ().GetSeed();
114  LOG("Rndm", pINFO) << "RndFsi seed = " << this->RndFsi ().GetSeed();
115  LOG("Rndm", pINFO) << "RndLep seed = " << this->RndLep ().GetSeed();
116  LOG("Rndm", pINFO) << "RndISel seed = " << this->RndISel ().GetSeed();
117  LOG("Rndm", pINFO) << "RndGeom seed = " << this->RndGeom ().GetSeed();
118  LOG("Rndm", pINFO) << "RndFlux seed = " << this->RndFlux ().GetSeed();
119  LOG("Rndm", pINFO) << "RndEvg seed = " << this->RndEvg ().GetSeed();
120  LOG("Rndm", pINFO) << "RndNum seed = " << this->RndNum ().GetSeed();
121  LOG("Rndm", pINFO) << "RndGen seed = " << this->RndGen ().GetSeed();
122  LOG("Rndm", pINFO) << "gRandom seed = " << gRandom->GetSeed();
123  LOG("Rndm", pINFO) << "PYTHIA6 seed = " << pythia6->GetMRPY(1);
124 }
bool fInitalized
done initializing singleton?
Definition: RandomGen.h:95
TRandom3 & RndFsi(void) const
rnd number generator used by intranuclear cascade monte carlos
Definition: RandomGen.h:59
TRandom3 & RndLep(void) const
rnd number generator used by final state primary lepton generators
Definition: RandomGen.h:62
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:96
TRandom3 & RndEvg(void) const
rnd number generator used by the event generation drivers
Definition: RandomGen.h:74
#define pINFO
Definition: Messenger.h:62
TRandom3 & RndGeom(void) const
rnd number generator used by geometry drivers
Definition: RandomGen.h:68
TRandom3 & RndKine(void) const
rnd number generator used by kinematics generators
Definition: RandomGen.h:50
TRandom3 & RndNum(void) const
rnd number generator used by MC integrators &amp; other numerical methods
Definition: RandomGen.h:77
TRandom3 & RndHadro(void) const
rnd number generator used by hadronization models
Definition: RandomGen.h:53
TRandom3 & RndGen(void) const
rnd number generator for generic usage
Definition: RandomGen.h:80
TRandom3 & RndISel(void) const
rnd number generator used by interaction selectors
Definition: RandomGen.h:65
#define pNOTICE
Definition: Messenger.h:61
TRandom3 & RndFlux(void) const
rnd number generator used by flux drivers
Definition: RandomGen.h:71
TRandom3 & RndDec(void) const
rnd number generator used by decay models
Definition: RandomGen.h:56

Friends And Related Function Documentation

friend struct Cleaner
friend

Definition at line 109 of file RandomGen.h.

Member Data Documentation

long int genie::RandomGen::fCurrSeed
private

random number generator seed number

Definition at line 94 of file RandomGen.h.

Referenced by GetSeed().

bool genie::RandomGen::fInitalized
private

done initializing singleton?

Definition at line 95 of file RandomGen.h.

RandomGen * genie::RandomGen::fInstance = 0
staticprivate

Definition at line 91 of file RandomGen.h.

Referenced by genie::RandomGen::Cleaner::~Cleaner().

TRandom3* genie::RandomGen::fRandom3
private

Mersenne Twistor.

Definition at line 93 of file RandomGen.h.

Referenced by RndDec(), RndEvg(), RndFlux(), RndFsi(), RndGen(), RndGeom(), RndHadro(), RndISel(), RndKine(), RndLep(), and RndNum().


The documentation for this class was generated from the following files: