Message: Re: How to Randomize each Run? Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Idea Re: How to Randomize each Run? 

Keywords: randomize
Forum: Event and Track Management
Re: None How to Randomize each Run? (Jeremy)
Date: 25 Feb, 2003
From: Domingo Granero <Domingo Granero>

 Try to put this code in your own class RunAction:
 HepRandom::setTheEngine(new RanecuEngine); //selection of a random
 engine G4long seed=time(0); //returns time in seconds as an integer
 HepRandom::setTheSeed(seed);//changes the seed of the random engine
 HepRandom::showEngineStatus();//shows the actual seed
 also you have to include the headers
 #include "Randomize.hh"
 #include <time.h>
 for more information see the section "3.2.2 The HEPRandom module in
 CLHEP" in the manual

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

1 None: Re: How to Randomize each Run?   (Jeremy - 26 Feb, 2003)
2 None: Re: How to Randomize each Run?   (michel maire - 27 Feb, 2003)
 Add Message Add Message
to: "Re: How to Randomize each Run?"

 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 ]