20 using namespace genie::controls;
29 LOG(
"Rndm",
pINFO) <<
"RandomGen late initialization";
46 if ( gSystem->Getenv(
"GSEED") ) {
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";
60 this->InitRandomGenerators(fCurrSeed);
68 if(fRandom3)
delete fRandom3;
86 << ((fInitalized) ?
" " :
" default ")
87 <<
"random number seed"
88 << ((fInitalized) ?
": " :
" at random number generator initialization: ")
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);
105 gRandom ->SetSeed (seed);
108 TPythia6 * pythia6 = TPythia6::Instance();
109 pythia6->SetMRPY(1, seed);
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);
128 fRandom3 =
new TRandom3();
static const unsigned int kDefaultRandSeed
static RandomGen * Instance()
Access instance.
A singleton holding random number generator classes. All random number generation in GENIE should tak...
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
static RandomGen * fInstance
void InitRandomGenerators(long int seed)
void DummyMethodAndSilentCompiler()
void SetSeed(long int seed)