GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » Monte Carlo Engines » How to setup random seed?
icon5.gif  How to setup random seed? [message #14320] Thu, 10 January 2013 18:00 Go to next message
Jifeng Hu is currently offline  Jifeng Hu
Messages: 31
Registered: October 2012
continuous participant
From: *physik.uni-giessen.de
when we produce many small MC samples, do we need manually set a random seed for a task? if necessary, how to do that?
Re: How to setup random seed? [message #14321 is a reply to message #14320] Thu, 10 January 2013 18:05 Go to previous messageGo to next message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: *to.infn.it
It depends on which generator you are using. The way to set the seed is in the header file of the generator, you can find it easily.
Re: How to setup random seed? [message #14322 is a reply to message #14321] Fri, 11 January 2013 10:33 Go to previous messageGo to next message
Jifeng Hu is currently offline  Jifeng Hu
Messages: 31
Registered: October 2012
continuous participant
From: *physik.uni-giessen.de
Really sorry, I looked up all interfaces, say the class FairBoxGenerator, PndEvtGenDirect, and their mother class, but didn't find, even in the latest trunk version.
Re: How to setup random seed? [message #14324 is a reply to message #14322] Fri, 11 January 2013 10:40 Go to previous messageGo to next message
Radoslaw Karabowicz is currently offline  Radoslaw Karabowicz
Messages: 108
Registered: June 2004
Location: GSI
continuous participant
From: *gsi.de
It is quite easy:

gRandom->SetSeed(randomSeed);
Re: How to setup random seed? [message #14325 is a reply to message #14324] Fri, 11 January 2013 10:49 Go to previous message
Jifeng Hu is currently offline  Jifeng Hu
Messages: 31
Registered: October 2012
continuous participant
From: *physik.uni-giessen.de
Thanks. Oh, it's a ROOT-based framework. Smile
Previous Topic: Random seed in Geant4?
Next Topic: Different geometry treatment in Geant3 and Geant4
Goto Forum:
  


Current Time: Thu Apr 18 19:41:41 CEST 2024

Total time taken to generate the page: 0.00926 seconds