_Geant4 Version:_10.5
_Operating System:_CentOS 7
Compiler/Version:
CMake Version:
Dear Geant4 experts,
I am running a modified version of the exampleB1
simulation in Geant4 and noticed a difference in results when executing the following commands:
- Running
/run/beamOn 1
10,000 times - Running
/run/beamOn 10000
once
The results from the first approach appear to be more ideal for my use case, while the second approach shows discrepancies.
I have G4Random::setTheEngine(new CLHEP::RanecuEngine);
in my exampleB1.cc
file. When I commented out this line, the discrepancy was somewhat reduced, but there was still a noticeable difference.
Could someone explain why this difference occurs and how I can ensure consistent results? Is there a recommended way to manage the random seed or simulation execution to achieve results similar to the repeated /run/beamOn 1
case?
Thank you!
( In the graph above, the green is the average of the results after executing /run/beamOn 1 several times, and the orange is the average of /run/beamOn 10000 divided by 10000 after executing it once.)