qupid 0.2
Quasi-Signal Generation Model for Pixelized Detector
Loading...
Searching...
No Matches
QPRandom Class Reference

Default ROOT-free random engine: std::mt19937_64 with the standard library distributions. More...

#include <QPRandom.hpp>

Inheritance diagram for QPRandom:
QPRandomBase

Public Member Functions

 QPRandom (unsigned long seed=std::mt19937_64::default_seed)
 
virtual ~QPRandom ()
 Trivial.
 
virtual void SetSeed (unsigned long seed)
 Re-seed the engine, restarting its sequence.
 
virtual double Uniform (double a, double b)
 Uniform deviate in $[a,b)$ via std::uniform_real_distribution.
 
virtual double Gaus (double mean, double sigma)
 Normal deviate via std::normal_distribution.
 
- Public Member Functions inherited from QPRandomBase
virtual ~QPRandomBase ()
 Virtual destructor for deletion through the interface.
 

Detailed Description

Default ROOT-free random engine: std::mt19937_64 with the standard library distributions.

A distribution object is constructed on every call, so the value sequence is fully determined by the seed and the order of calls.

Definition at line 12 of file QPRandom.hpp.

Constructor & Destructor Documentation

◆ QPRandom()

QPRandom::QPRandom ( unsigned long  seed = std::mt19937_64::default_seed)
Parameters
seedengine seed (default: std::mt19937_64::default_seed)

Definition at line 3 of file QPRandom.cpp.

◆ ~QPRandom()

virtual QPRandom::~QPRandom ( )
inlinevirtual

Trivial.

Definition at line 17 of file QPRandom.hpp.

Member Function Documentation

◆ SetSeed()

void QPRandom::SetSeed ( unsigned long  seed)
virtual

Re-seed the engine, restarting its sequence.

Parameters
seedengine seed value

Implements QPRandomBase.

Definition at line 5 of file QPRandom.cpp.

◆ Uniform()

double QPRandom::Uniform ( double  a,
double  b 
)
virtual

Uniform deviate in $[a,b)$ via std::uniform_real_distribution.

Parameters
alower bound (attainable)
bupper bound (not attainable)
Returns
uniform deviate

Implements QPRandomBase.

Definition at line 9 of file QPRandom.cpp.

◆ Gaus()

double QPRandom::Gaus ( double  mean,
double  sigma 
)
virtual

Normal deviate via std::normal_distribution.

Parameters
meanmean of the distribution
sigmastandard deviation
Returns
normal deviate

Implements QPRandomBase.

Definition at line 14 of file QPRandom.cpp.


The documentation for this class was generated from the following files: