Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
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
1
#include "
PHEvtGenRandomEngine.hh
"
2
3
#include <
phool/PHRandomSeed.h
>
4
5
#include <gsl/gsl_rng.h>
// for gsl_rng_alloc, gsl_rng_free, gsl_rng...
6
7
PHEvtGenRandomEngine::PHEvtGenRandomEngine
()
8
{
9
m_RandomGenerator
= gsl_rng_alloc(gsl_rng_mt19937);
10
m_Seed
=
PHRandomSeed
();
// fixed seed is handled in this funtcion
11
gsl_rng_set
(
m_RandomGenerator
,
m_Seed
);
12
}
13
14
PHEvtGenRandomEngine::~PHEvtGenRandomEngine
()
15
{
16
gsl_rng_free(
RandomGenerator
());
17
}
18
19
double
PHEvtGenRandomEngine::random
()
20
{
21
return
gsl_rng_uniform_pos(
RandomGenerator
());
22
}
coresoftware
blob
master
simulation
g4simulation
g4decayer
PHEvtGenRandomEngine.cc
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:12
using
1.8.2 with
sPHENIX GitHub integration