Message: Re: understand weird random seed issue Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Feedback Re: understand weird random seed issue 

Forum: Event and Track Management
Re: None understand weird random seed issue (Zhiyi Liu)
Date: 16 Nov, 2015
From: Gumplinger Peter <Gumplinger Peter>

> In my main file, I have the following code:
> 
>   G4Random::setTheEngine(new CLHEP::RanecuEngine);
>   G4long seed = time(NULL);
>   CLHEP::HepRandom::setTheSeed(seed);

try:

    G4Random::setTheEngine(new CLHEP::RanecuEngine);
    G4long seeds[2];
    time_t systime = time(NULL);
    seeds[0] = (long) systime;
    seeds[1] = (long) (systime*G4UniformRand());
    G4Random::setTheSeeds(seeds);

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

1 Agree: Re: understand weird random seed issue   (Zhiyi Liu - 16 Nov, 2015)
2 Question: Re: understand weird random seed issue   (Azam Zabihi - 14 Feb, 2016)
 Add Message Add Message
to: "Re: understand weird random seed issue"

 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 ]