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

Abstract random number source. More...

#include <QPRandomBase.hpp>

Inheritance diagram for QPRandomBase:
QPRandom QPRandomTRandom

Public Member Functions

virtual ~QPRandomBase ()
 Virtual destructor for deletion through the interface.
 
virtual void SetSeed (unsigned long seed)=0
 Seed the underlying engine.
 
virtual double Uniform (double a, double b)=0
 Uniform deviate between a and b.
 
virtual double Gaus (double mean, double sigma)=0
 Normal (Gaussian) deviate.
 

Detailed Description

Abstract random number source.

The only RNG type core code may reference; concrete engines (the std-based QPRandom, the TRandom adapter in vis/include) are chosen and owned by the caller.

Definition at line 8 of file QPRandomBase.hpp.

Constructor & Destructor Documentation

◆ ~QPRandomBase()

virtual QPRandomBase::~QPRandomBase ( )
inlinevirtual

Virtual destructor for deletion through the interface.

Definition at line 11 of file QPRandomBase.hpp.

Member Function Documentation

◆ SetSeed()

virtual void QPRandomBase::SetSeed ( unsigned long  seed)
pure virtual

Seed the underlying engine.

Parameters
seedengine seed value

Implemented in QPRandom, and QPRandomTRandom.

◆ Uniform()

virtual double QPRandomBase::Uniform ( double  a,
double  b 
)
pure virtual

Uniform deviate between a and b.

Whether the endpoints themselves can be returned follows the concrete engine (QPRandom: $[a,b)$; the TRandom adapter: TRandom semantics).

Parameters
alower bound
bupper bound
Returns
uniform deviate

Implemented in QPRandom, and QPRandomTRandom.

Referenced by QPMonteCarlo::Shoot().

◆ Gaus()

virtual double QPRandomBase::Gaus ( double  mean,
double  sigma 
)
pure virtual

Normal (Gaussian) deviate.

Parameters
meanmean of the distribution
sigmastandard deviation
Returns
normal deviate

Implemented in QPRandom, and QPRandomTRandom.


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