Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PHEvtGenRandomEngine.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file PHEvtGenRandomEngine.cc
2 
3 #include <phool/PHRandomSeed.h>
4 
5 #include <gsl/gsl_rng.h> // for gsl_rng_alloc, gsl_rng_free, gsl_rng...
6 
8 {
9  m_RandomGenerator = gsl_rng_alloc(gsl_rng_mt19937);
10  m_Seed = PHRandomSeed(); // fixed seed is handled in this funtcion
12 }
13 
15 {
16  gsl_rng_free(RandomGenerator());
17 }
18 
20 {
21  return gsl_rng_uniform_pos(RandomGenerator());
22 }