GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » Event Generators » Meaning of fSeed for dpm_gen__ in PndDpmDirect
Meaning of fSeed for dpm_gen__ in PndDpmDirect [message #9350] Tue, 08 September 2009 14:48 Go to next message
Christian Leitold is currently offline  Christian Leitold
Messages: 35
Registered: August 2009
Location: Stefan Meyer Institute
continuous participant
From: *smi.oeaw.ac.at
Hello,

we use a (slightly modified version of) PndDpmDirect for our simulations. The problem is, the generated events are always the same, so when running a few simulations in parallel with each let's say 1.000 events, you actually get the same 1.000 events from every simulation. So, I would like to set the fSeed variable in PndDpmDirect to a different value for each simulation. Especially I want to avoid the generation of two equal events in two different simulations, caused by a wrong initialization of the RNG. Unfortunately, I am not sure how to set the fSeed values for that purpose -- and I don't understand the dpm FORTRAN code well enough to find that out.

Kind regards
Christian
Re: Meaning of fSeed for dpm_gen__ in PndDpmDirect [message #9351 is a reply to message #9350] Tue, 08 September 2009 19:17 Go to previous messageGo to next message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: *ext.kfa-juelich.de
Have you tried adding inside your simulation macro the following line at the beginning:

gRandom->SetSeed(XXX);


where XXX is the seed number?
Re: Meaning of fSeed for dpm_gen__ in PndDpmDirect [message #9352 is a reply to message #9350] Wed, 09 September 2009 11:55 Go to previous messageGo to next message
Christian Leitold is currently offline  Christian Leitold
Messages: 35
Registered: August 2009
Location: Stefan Meyer Institute
continuous participant
From: *smi.oeaw.ac.at
Ok, I'm sorry, I haven't formulated my question well. The problem ist not how to set the seed "technically", that is done by gRandom->SetSeed(XXX), as you have written. It is to which values I have to set the seed in the different simulations to make sure not to get any identical events. If I initialize the seed e. g. with some CPU time, can I by sure not to get identical random numbers in the generator respectively identical events?

Kind regards
Christian
Re: Meaning of fSeed for dpm_gen__ in PndDpmDirect [message #9363 is a reply to message #9352] Wed, 09 September 2009 17:04 Go to previous messageGo to next message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: *ext.kfa-juelich.de
If you want to be sure, when you send different macros just use a progressive number as seed, so that you will have different starting values always. If by chance two jobs are starting in the same "time bin" maybe they could have the same values, then I think it would be better simply to set the seeds by hands.
Re: Meaning of fSeed for dpm_gen__ in PndDpmDirect [message #9365 is a reply to message #9350] Thu, 10 September 2009 09:10 Go to previous message
Christian Leitold is currently offline  Christian Leitold
Messages: 35
Registered: August 2009
Location: Stefan Meyer Institute
continuous participant
From: *smi.oeaw.ac.at
Alright, thanks. My only fear was that starting with different, but "wrong" seeds could eventually lead to the same events.

Kind regards
Christian
Previous Topic: simpleEvtGen default EvtRandomEngine
Next Topic: pythia compilation
Goto Forum:
  


Current Time: Thu Nov 28 10:39:24 CET 2024

Total time taken to generate the page: 0.00753 seconds