|Message: Re: Seed for Random Engines||Not Logged In (login)|
Click on the Forum title, e.g. on the "Forums by Category" page, to read a sequence of postings to the Forum and its threads all in one page. If you are only interested in one thread or the thread following a specific posting, click the thread or the posting, which takes you to a smaller page, which contains only the part you are interested in and may be easier to navigate.
Messages are "chained" if there are only replies at the first level, i.e. 1/1.html, 1/1/1.html etc. In case of "chained" messages the message number is replaced by the icon and there is no indentation.
Inline: Display the subject line only or also the text of the posting(s); for the choice "All" the "Outline" choices are switched off.
|1||0||1||no text / full text of posting|
|2||1||All||text for level 1 only / text for All postings|
Outline: Choose the depth of the posting thread, successive toggle controls provide increasing detail.
|1||2||1||2 levels / 1 level (original posting)|
|2||3||2||3 levels / 2 levels|
|3||3||All||3 levels / all levels (all postings)|
I am just having a seed problem myself and found your reply looking for answers in the forum. - It seems to contradict what i see so i am wondering if there is something i am overlooking. I would be grateful if you (or somebody else) could have a quick look on the following lines.
In a modified version of the extended/medical/dicom example v.9.4.p02, i set in my main
> CLHEP::HepRandom::setTheEngine(new CLHEP::RanecuEngine);
pick a seed from the seed table according to a seedIndex which i change for every run:
> long seeds; > CLHEP::HepRandom::getTheTableSeeds(seeds,seedIndex);
use one of them to initialize random number generator
Now, if i do a
> G4cout << "DicomPrimaryGeneratorAction::GeneratePrimaries: seed= " << CLHEP::HepRandom::getTheSeed() << G4endl;
in DicomPrimaryGeneratorAction::GeneratePrimaries, i get "1" every time GeneratePrimaries is invoked. The sequence of G4UniformRand() numbers generated during the events of one run is then the same for every run, no matter what index i give in main. Is there something i am doing wrong? Or what should i check to find out?
I had an output of the seed in main, which nicely gives the respective entry in SeedTable.h, while a G4cout of CLHEP::HepRandom::getTheSeed() in main, directly after the setTheSeed returns a different value (e.g. seeds=1315342834, getTheSeed returns 139), but this changes with a different seeds so i was not so concerned but still i do not understand why?
Thanks a lot Asja
|Inline Depth:||Outline Depth:||Add message:|