Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
trento::random Namespace Reference

Typedefs

using Engine = std::mt19937_64
 Mersenne Twister engine, 64-bit preset.
 

Functions

template<typename RealType = double>
RealType canonical ()
 Helper function to easily generate random numbers in [0, 1).
 
template<typename RealType = double>
double cos_theta ()
 Sample a spherical polar angle cos(theta).
 
template<typename RealType = double>
double phi ()
 Sample a spherical azimuthal angle phi.
 

Variables

Engine engine {std::random_device{}()}
 Global variable defined in random.cxx.
 

Typedef Documentation

using trento::random::Engine = typedef std::mt19937_64

Mersenne Twister engine, 64-bit preset.

Definition at line 19 of file random.h.

View newest version in sPHENIX GitHub at line 19 of file random.h

Function Documentation

template<typename RealType = double>
RealType trento::random::canonical ( )
inline

Helper function to easily generate random numbers in [0, 1).

Definition at line 26 of file random.h.

View newest version in sPHENIX GitHub at line 26 of file random.h

References engine.

Referenced by ActsExamples::ensureWritableDirectory(), and runRecCKFTracks().

+ Here is the caller graph for this function:

template<typename RealType = double>
double trento::random::cos_theta ( )
inline

Sample a spherical polar angle cos(theta).

Definition at line 34 of file random.h.

View newest version in sPHENIX GitHub at line 34 of file random.h

Referenced by trento::DeformedWoodsSaxonNucleus::deformed_woods_saxon_dist(), trento::Deuteron::sample_nucleons_impl(), and trento::DeformedWoodsSaxonNucleus::sample_nucleons_impl().

+ Here is the caller graph for this function:

template<typename RealType = double>
double trento::random::phi ( )
inline

Sample a spherical azimuthal angle phi.

Definition at line 40 of file random.h.

View newest version in sPHENIX GitHub at line 40 of file random.h

Variable Documentation

Engine trento::random::engine {std::random_device{}()}

Global variable defined in random.cxx.

Definition at line 11 of file random.cxx.

View newest version in sPHENIX GitHub at line 11 of file random.cxx

Referenced by canonical(), trento::Collider::Collider(), trento::NucleonProfile::fluctuate(), and TEST_CASE().