Files
geant4/examples/novice/N03/rndmSeed.mac
T
2016-06-09 15:16:48 +02:00

35 lines
560 B
Plaintext

# $Id: rndmSeed.mac,v 1.2 2007/06/13 10:36:39 maire Exp $
#
# This macro illustrates how to save and reset the random number seed
#
# inform the RunManager to systematically save the seed
#
/random/setSavingFlag 1
#
# run 0
#
/run/beamOn 7
#look at what is saved
/control/shell ls
#
# run 1
#
/run/beamOn
#save the seed of this current run
/random/saveThisRun
/control/shell ls
#
# run 2
#
/run/beamOn 4
#
# run3 : restart run 2
#
/random/resetEngineFrom currentRun.rndm
/run/beamOn 4
#
# run4 : restart run 1
#
/random/resetEngineFrom run1.rndm
/run/beamOn