All of RAT uses random numbers generated by the !HepJamesRandom class from CLHEP. This class implements the random number algorithm from ‘’F.James, Comp. Phys. Comm. 60 (1990) 329’‘, which was also used in the FORTRAN library MATHLIB.
Normally, the random number generator is initialized at startup using a seed which is a mixture of the current time and the process ID of RAT. With this seeding scheme, two RAT instances should generate different event sequences, even if they are started at the same time on the same machine or different machines. This assurance is probabilistic however, and not an absolute guarantee.
The seed is always written to the log file:
This is RAT, version 0.1 Status messages enabled: info detail Seeding random number generator: 937308832
If desired, the seed can be selected at the command line using the -s switch. For example, a seed of zero can be forced using:
rat -s0 mac/std_test.mac
This is useful when debugging to reproduce an error caused by a particular event sequence. Any long integer may be used as the seed.