[Halld-offline] Random Number Seeds

Curtis A. Meyer cmeyer at cmu.edu
Thu Mar 13 14:44:53 EDT 2014

To try an bring closure to the random number issues, I would like to propose the following procedure
for handling random numbers. In doing this, I am trying to address the following:

1) Make sure that by default, if you reprocess from any point, you get the same results.
2) Make sure that as many processes as possible are thread safe. This includes GEANT as there
    is some hope that GEANT4 may eventually be thread safe.

I consider the simple chain as follows:

Event Generator (such as bggen) 
Simulation          (HDGEANT)
Smearing            (mcsmear)
Triggering            (trigger code?)
Reconstruction   (HDana)

and consider a random number structure for each event we have generated. For each process in the chain, the strunture
contains an identification for the code, the random number seed at the start of the event, and the random number seed at
the end of the event.

The event generator gets its initial seed from some external source, and the seed at the end of event i is used at the 
start of event i+1.

The next level, say simulation, gets its seed for the start of each event from the ending seed of the generator job for that
event. Thus, the seed for event i in simulation is the ending seed for event i in generation.

This repeats to the next level, with mcsmear getting its seed for the start of event i as the ending seed for event i from the

Thus, no matter where you start reprocessing in the chain, the same seeds will consistently restart each event. In addition, 
because each event carries its own seed history, they are insensitive to in what order they are run as threads.

I would like to let people think about this, and we can then discuss it at the data challenge meeting tomorrow.

Curtis A. Meyer			MCS Associate Dean for Faculty and Graduate Affairs
Wean:    (412) 268-2745	Professor of Physics
Doherty: (412) 268-3090	Carnegie Mellon University
Fax:         (412) 681-0648	Pittsburgh, PA 15213
curtis.meyer at cmu.edu	http://www.curtismeyer.com/

More information about the Halld-offline mailing list