diff --git a/Examples/Example4/run.mac b/Examples/Example4/run.mac index ced78f72769fe42cd7cc053d0387e39f4e254d76..8eec34f7c0cc1911bbafaa6e92961e0836d874ba 100644 --- a/Examples/Example4/run.mac +++ b/Examples/Example4/run.mac @@ -1 +1 @@ -/run/beamOn 10 +/run/beamOn 1000 diff --git a/NPLib/Physics/NPReaction.cxx b/NPLib/Physics/NPReaction.cxx index ba6e8803ba0f5c3638a47d78c111eaf841e4d9c2..566194f56458581b04e8dd22f16548e31bec6c4c 100644 --- a/NPLib/Physics/NPReaction.cxx +++ b/NPLib/Physics/NPReaction.cxx @@ -87,7 +87,6 @@ ClassImp(Reaction) fshoot3=true; fshoot4=true; fUseExInGeant4=true; - RandGen=gRandom; fLabCrossSection=false; // flag if the provided cross-section is in the lab or not @@ -156,7 +155,6 @@ Reaction::Reaction(string reaction){ fshoot3=true; fshoot4=true; - RandGen=gRandom; fLabCrossSection=false; @@ -357,7 +355,7 @@ double Reaction::EnergyLabFromThetaLab(double ThetaLab){ if(B>D) { ThetaLabMax = asin(sqrt(D/B)); - if(RandGen->Rndm()<0.5) sign=-1; + if(gRandom->Rndm()<0.5) sign=-1; } if(ThetaLab>ThetaLabMax) return -1; diff --git a/NPSimulation/Process/BeamReaction.cc b/NPSimulation/Process/BeamReaction.cc index b077304f580fb63ae31a1eb208a265058b5e6bf3..f51b1f9c1e70606e25588686ac391da059917067 100644 --- a/NPSimulation/Process/BeamReaction.cc +++ b/NPSimulation/Process/BeamReaction.cc @@ -320,7 +320,7 @@ void NPS::BeamReaction::DoIt(const G4FastTrack& fastTrack, // Angles // Shoot and Set a Random ThetaCM m_Reaction.ShootRandomThetaCM(); - double phi = RandFlat::shoot() * 2. * pi; + double phi = G4RandFlat::shoot() * 2. * pi; ////////////////////////////////////////////////// ///// Momentum and angles from kinematics ///// @@ -453,8 +453,8 @@ void NPS::BeamReaction::DoIt(const G4FastTrack& fastTrack, // Shoot and Set a Random ThetaCM //m_QFS.ShootRandomThetaCM(); //m_QFS.ShootRandomPhiCM(); - double theta = RandFlat::shoot() * pi; - double phi = RandFlat::shoot() * 2. * pi - pi; //rand in [-pi,pi] + double theta = G4RandFlat::shoot() * pi; + double phi = G4RandFlat::shoot() * 2. * pi - pi; //rand in [-pi,pi] m_QFS.SetThetaCM(theta); m_QFS.SetPhiCM(phi); diff --git a/NPSimulation/Simulation.cc b/NPSimulation/Simulation.cc index ba0ce3916324317772413aaaf22dea1290a84b48..ed862a21df62f611f1149d2c3d1cc51f136af25e 100644 --- a/NPSimulation/Simulation.cc +++ b/NPSimulation/Simulation.cc @@ -67,6 +67,7 @@ int main(int argc, char** argv){ // initialize the state of the root and geant4 random generator if(OptionManager->GetRandomSeed()>0){ + std::cout << " Seeds for random generators set to: " << OptionManager->GetRandomSeed() << std::endl; gRandom->SetSeed(OptionManager->GetRandomSeed()); CLHEP::HepRandom::setTheSeed(OptionManager->GetRandomSeed(),3); }