GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » Event Generators » simpleEvtGen default EvtRandomEngine
Re: simpleEvtGen default EvtRandomEngine [message #9172 is a reply to message #9171] Mon, 10 August 2009 21:40 Go to previous messageGo to previous message
Bertram Kopf is currently offline  Bertram Kopf
Messages: 110
Registered: March 2006
continuous participant
From: *pools.arcor-ip.net
Hi Marius,
mertens wrote on Mon, 10 August 2009 18:32


As the EvtGen EvtRandom interface is extremely simple (basically just the random() function which returns a random double) I was wondering if the more powerful Ranecu based framework including random number management is as easy to be understood and plugged into this single interface class as (just as a random example) one of the PRNGs from Boost?
My motivation here is the learning curve. Getting random numbers from a boost library function is very easy (and would be sufficient for how I invoke EvtGen) but maybe at a later stage the management functions might be helpful?


As you can see in the class EvtRandomEngine the function random() is defined as a virtual method. That means that you simple have to write a new class derived from EvtRandomEngine and to overwrite this virtual function. In principle you can specify a specific random engine there. In addition you have to set your new defined engine via the static function "EvtRandom::setRandomEngine(newEngine)". An example can be found in the PandaRoot EvtGen package: the test program "ggEvtGen.cc" makes use of the CLHEP-generator "JamesRandom".

Cheers,
Bertram.

 
Read Message
Read Message
Read Message icon4.gif
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: EvtGen Output Fixed Point Precision
Next Topic: Meaning of fSeed for dpm_gen__ in PndDpmDirect
Goto Forum:
  


Current Time: Sun Nov 28 00:18:27 CET 2021

Total time taken to generate the page: 0.02201 seconds