GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » Event Generators » simpleEvtGen default EvtRandomEngine
Re: simpleEvtGen default EvtRandomEngine - PndMTRandomEngine Suggestion [message #9240 is a reply to message #9239] Wed, 26 August 2009 17:22 Go to previous messageGo to previous message
Elwin Dijck
Messages: 16
Registered: June 2009
Location: Groningen, The Netherland...
occasional visitor
From: *KVI.nl
Hello all,

Perhaps you found this out already, but it seems that actually the Boost interface has changed: they initialize the Mersenne Twister (which actually needs a few hundred integers as initialization) now in a different way than in older versions. Instead of using a single integer, they want a function/functor that gives a sequence of values to initialize the internal state of the Mersenne Twister.

The Boost documentation says "The seeding from an integer was changed in April 2005 to address a weakness." and refers to here.

Also see how ROOT initializes the Mersenne Twister.

So casting will not help, for the newer Boost versions the argument to seed() must be a function or functor. Simplest is to make a small class that has an operator() that just returns the seed number, though it might be better to use one of the more advanced schemes.

Best regards,
Elwin Dijck
 
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: Thu Apr 25 17:31:21 CEST 2024

Total time taken to generate the page: 0.01024 seconds