Message: Re: Random Number generation Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Random Number generation 

Keywords: Random Numbers
Forum: Run Management
Re: Question Random Number generation (Michael Famiano)
Date: 08 Jul, 2002
From: michel maire <michel maire>

User Michael Famiano wrote:

>> I'm trying to generate a particle at a random position using the
>> G4UniformRand() command, but I'm not sure I'm initializing it correctly,
>> because I keep getting the same sequence of random numbers every time I
>> run the code. I'm following the examples given, but can't seem to find
>> any example for randomizing or initializing the new seeds. Can someone
>> help me? Thanks,

If you have run any examples/extended/elelectromagnetic, you have written 2 files: currentRun.rndm and currentEvent.rndm, which contain the seed at begin of last run (and last event) of your previous job. To restart from a given seed, use the command: /random/resetEngineFrom fileName where fileName contains the seed

Interactively, see also the help for the directory /random/

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

 Add Message Add Message
to: "Re: Random Number generation"

 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 ]