Message: Re: /random/setSeeds question Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

More Re: /random/setSeeds question 

Forum: Run Management
Re: Question /random/setSeeds question (Stefan E. Mueller)
Re: Disagree Re: /random/setSeeds question (Gumplinger Peter)
Date: 14 Jul, 2014
From: Stefan E. Mueller <Stefan E. Mueller>

OK,

I use /random/setSavingFlag 1 and compare the output for two runs in which I am sure that I used different numbers in /random/setSeeds. The files CurrentRun.rndm and CurrentEvent.rndm are identical, as is the output of e.g. /tracking/verbose 1.

These commands I use:

/random/setSeeds 770353837 70597151 /random/setSavingFlag 1 /run/beamOn 10

or

/random/setSeeds 575841909 838392975 /random/setSavingFlag 1 /run/beamOn 10

I have runManager->Initialize(); in my main(), and no /run/initialize in my macro (but that should not make a difference).

In my efforts to get different output for different seeds, I also added the line

CLHEP::HepRandom::setTheEngine(new CLHEP::RanecuEngine);

Would that also initialize the generator?

Otherwise I do not see how and where I would hardcode the seeds.

I also saw several messages on the forum reporting the same or similar problem, unfortunately without giving a solution.

Stefan

On Fri, 11 Jul 2014 19:05:36 GMT, Gumplinger Peter wrote:

> Stefan,
> 
> I can't reproduce your finding. When I change the two arguments of the
> command
> 
> /random/setSeeds
> 
> my executable produces different events. I tested this with a program
> that has:
> 
>   runManager->Initialize();
> 
> in the main() as well as one were this line is missing and instead the
> G4RunManager is initialized with the UI command:
> 
> /run/initialize
> 
> I can put the /random/setSeeds command before or after /run/initialize
> in the macro, the results are the same so long as the /random/setSeeds
> command precedes /run/beamOn
> 
> I suspect that you have hardcoded the initial seed in C++ somewhere in
> your source.
> 
> Peter
> 

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

1 Idea: Re: /random/setSeeds question   (C Mos - 14 Jul, 2014)
(_ More: Re: /random/setSeeds question   (Stefan E. Mueller - 15 Jul, 2014)
(_ News: Re: /random/setSeeds question   (Stefan E. Mueller - 17 Jul, 2014)
(_ Feedback: Re: /random/setSeeds question   (David - 15 Aug, 2014)
 Add Message Add Message
to: "Re: /random/setSeeds question"

 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 ]