Message: Re: some clarifications regarding primary generator and random numbers Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Feedback Re: some clarifications regarding primary generator and random numbers 

Forum: Event and Track Management
Re: Question some clarifications regarding primary generator and random numbers (Athreya Shankar)
Date: 14 May, 2012
From: Gumplinger Peter <Gumplinger Peter>

Athreya,

Please see for example /examples/extended/optical/wls/wls.cc how the random seed is obtained from the command line when you submit your job:

  if (argc  > 2) seed = atoi(argv[argc-1]);
  CLHEP::HepRandom::setTheSeed(seed);

or:

http://geant4www.triumf.ca/lxr/source/examples/extended/field/field04/src/F04RunAction.cc#52

for a more elaborate way of setting seeds.

> How do we set the initial event ID?

http://geant4www.triumf.ca/lxr/source//event/include/G4Event.hh#109

> Also, once the data is obtained from these

> multiple jobs, how do we combine the data into one file?

This is not a G4 question but a question of the software you use to store the MC data (HBOOK, ROOT etc.).

Same seed at the beginning of run will result in exactly the same event history; e.g. all events of that run will be identical to all events of another run execution with the same initial seed; e.g yes to your first question.

Peter

 Add Message Add Message
to: "Re: some clarifications regarding primary generator and random numbers"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]