cepgen is hosted by Hepforge, IPPP Durham
CepGen N/A
Central exclusive processes event generator

A random number generator. More...

#include <include/CepGen/Utils/RandomGenerator.h>

+ Inheritance diagram for RandomGenerator:
+ Collaboration diagram for RandomGenerator:

Public Member Functions

 RandomGenerator (const ParametersList &)
 Default constructor.
 
virtual int uniformInt (int min, int max)=0
 
virtual double uniform (double min=0., double max=1.)=0
 
virtual double normal (double mean=0., double rms=1.)=0
 
virtual double exponential (double exponent=1.)
 
virtual double breitWigner (double mean=0., double scale=1.)
 
virtual double landau (double location=0., double width=1.)
 
virtual int poisson (double mean=0.)
 
template<typename T >
T * engine ()
 Retrieve the engine object.
 
const std::string & name () const
 Module unique indexing name.
 
bool operator== (const SteeredObject &oth) const
 Equality operator.
 
bool operator!= (const SteeredObject &oth) const
 Inequality operator.
 
const ParametersListparameters () const override
 Module user-defined parameters.
 
void setParameters (const ParametersList &params) override
 Set module parameters.
 
void setDescribedParameters (const ParametersList &params_orig)
 Set (documented) module parameters.
 

Static Public Member Functions

static ParametersDescription description ()
 

Protected Member Functions

virtual void * enginePtr ()
 engine object
 
template<typename T >
steer (const std::string &key) const
 Retrieve a parameters as previously steered.
 
template<typename T , typename U >
U steerAs (const std::string &key) const
 Retrieve a recast parameters as previously steered.
 
std::string steerName () const
 Retrieve module name from parameters.
 
std::string steerPath (const std::string &key) const
 Retrieve a path from common search paths.
 

Protected Attributes

unsigned long long seed_
 
const std::string name_
 Module unique indexing name.
 
ParametersList params_
 Module parameters.
 

Detailed Description

Author
L. Forthomme laure.nosp@m.nt.f.nosp@m.ortho.nosp@m.mme@.nosp@m.cern..nosp@m.ch
Date
Nov 2023

Definition at line 28 of file RandomGenerator.h.

Constructor & Destructor Documentation

◆ RandomGenerator()

RandomGenerator ( const ParametersList & )
explicit

Member Function Documentation

◆ breitWigner()

virtual double breitWigner ( double mean = 0.,
double scale = 1. )
virtual

◆ description()

static ParametersDescription description ( )
static

◆ engine()

template<typename T >
T * engine ( )

Definition at line 48 of file RandomGenerator.h.

◆ enginePtr()

virtual void * enginePtr ( )
protectedvirtual

◆ exponential()

virtual double exponential ( double exponent = 1.)
virtual

◆ landau()

virtual double landau ( double location = 0.,
double width = 1. )
virtual

◆ name()

const std::string & name ( ) const
inherited

Definition at line 42 of file NamedModule.h.

◆ normal()

virtual double normal ( double mean = 0.,
double rms = 1. )
pure virtual

◆ operator!=()

template<typename T >
bool operator!= ( const SteeredObject< T > & oth) const
inherited

Definition at line 50 of file SteeredObject.h.

◆ operator==()

template<typename T >
bool operator== ( const SteeredObject< T > & oth) const
inherited

Definition at line 48 of file SteeredObject.h.

◆ parameters()

template<typename T >
const ParametersList & parameters ( ) const
overridevirtualinherited

Reimplemented from Steerable.

Definition at line 53 of file SteeredObject.h.

◆ poisson()

virtual int poisson ( double mean = 0.)
virtual

◆ setDescribedParameters()

template<typename T >
void setDescribedParameters ( const ParametersList & params_orig)
inherited

Definition at line 72 of file SteeredObject.h.

◆ setParameters()

template<typename T >
void setParameters ( const ParametersList & )
overridevirtualinherited

Reimplemented from Steerable.

Definition at line 61 of file SteeredObject.h.

◆ steer()

template<typename T >
T steer ( const std::string & key) const
protectedinherited

Definition at line 39 of file Steerable.h.

◆ steerAs()

template<typename T , typename U >
U steerAs ( const std::string & key) const
protectedinherited

Definition at line 44 of file Steerable.h.

◆ steerName()

std::string steerName ( ) const
protectedinherited

Definition at line 48 of file Steerable.h.

◆ steerPath()

std::string steerPath ( const std::string & key) const
protectedinherited

◆ uniform()

virtual double uniform ( double min = 0.,
double max = 1. )
pure virtual

◆ uniformInt()

virtual int uniformInt ( int min,
int max )
pure virtual

Member Data Documentation

◆ name_

const std::string name_
protectedinherited

Definition at line 45 of file NamedModule.h.

◆ params_

ParametersList params_
mutableprotectedinherited

Definition at line 50 of file Steerable.h.

◆ seed_

unsigned long long seed_
protected

Definition at line 53 of file RandomGenerator.h.