1 #ifndef GAUDIKERNEL_RNDMGENGENERATORS_H 2 #define GAUDIKERNEL_RNDMGENGENERATORS_H 35 Gauss(
double m,
double s ) :
IRndmGen::Param( IID_IRndmGauss ), m_mean( m ), m_sigma( s ) {}
37 double mean()
const {
return m_mean; }
39 double sigma()
const {
return m_sigma; }
58 double mean()
const {
return m_mean; }
77 Chi2(
long n_dof ) :
IRndmGen::Param( IID_IRndmChi2 ), m_nDOF( n_dof ) {}
79 long nDOF()
const {
return m_nDOF; }
100 double mean()
const {
return m_mean; }
102 double gamma()
const {
return m_gamma; }
121 Landau(
double m,
double s ) :
IRndmGen::Param( IID_IRndmLandau ), m_mean( m ), m_sigma( s ) {}
123 double mean()
const {
return m_mean; }
125 double sigma()
const {
return m_sigma; }
146 :
IRndmGen::Param( IID_IRndmBreitWignerCutOff ), m_mean( m ), m_gamma( g ), m_cut( c )
150 double mean()
const {
return m_mean; }
152 double gamma()
const {
return m_gamma; }
175 double aValue()
const {
return m_aValue; }
196 Gamma(
double k,
double l ) :
IRndmGen::Param( IID_IRndmGamma ), m_kValue( k ), m_lambda( l ) {}
198 double kValue()
const {
return m_kValue; }
200 double lambda()
const {
return m_lambda; }
222 double mean()
const {
return m_mean; }
242 Binomial(
long n,
double p ) :
IRndmGen::Param( IID_IRndmBinomial ), m_nEvent( n ), m_probability( p ) {}
266 Flat(
double mi,
double ma ) :
IRndmGen::Param( IID_IRndmFlat ), m_minimum( mi ), m_maximum( ma ) {}
317 :
IRndmGen::Param( IID_IRndmDefinedPdf ), m_pdf( pdf ), m_interpolation( intpol )
344 double cut()
const {
return m_cut; }
346 double sigma()
const {
return m_sigma; }
385 #if !defined( GAUDI_V22_API ) || defined( G22_NEW_SVCLOCATOR ) 394 operator bool()
const {
return m_generator; }
398 double pop() {
return this->shoot(); }
400 double shoot() {
return m_generator ? m_generator->
shoot() : -1; }
408 #endif // GAUDIKERNEL_RNDMGENGENERATORS_H Binomial * clone() const override
Clone parameters.
constexpr static const auto FAILURE
Gamma * clone() const override
Clone parameters.
StudentT * clone() const override
Clone parameters.
virtual double shoot() const =0
Single shot returning single random number according to specified distribution.
long nDOF() const
Access mean value of the distribution.
static const InterfaceID & typeID()
Identifier for factory.
Parameters for the bit value generation: returns values 0 and 1.
double m_mean
Mean, Gamma and cut off parameter of the Breit-Wigner distribution.
static const InterfaceID & typeID()
Identifier for factory.
GaussianTail(double a, double s)
Standard Constructor.
double m_minimum
Lower boundary for random numbers.
static const InterfaceID & typeID()
Identifier for factory.
double mean() const
Access mean value of the distribution.
Parameters for the Poisson distributed random number generation with a given mean.
Exponential * clone() const override
Clone parameters.
double mean() const
Access mean value of the distribution.
Definition of a interface for a generic random number generators.
SmartIF< IRndmGen > m_generator
Pointer to random number generator.
double m_probability
And the probability for having success.
static const InterfaceID & typeID()
Identifier for factory.
double operator()()
Operator () for the use within STL.
double m_sigma
Sigma of the Gauss ditribution.
static const InterfaceID & typeID()
Identifier for factory.
Parameters for the Gauss random number generation.
Gauss(double m, double s)
Standard Constructor.
Bit * clone() const override
Clone parameters.
Flat(double mi, double ma)
Standard Constructor.
double mean() const
Access mean value of the distribution.
double shoot()
Pop a new number from the buffer.
double lambda() const
Access Lambda parameter.
long m_nEvent
Number of events the binomial destribution corresponds to.
double m_mean
Mean value of the exponential distribution.
BreitWigner(double m, double g)
Standard Constructor.
long nEvent() const
Access number of events.
long interpolation() const
Access interpolation type.
Landau(double m, double s)
Standard Constructor.
Flat * clone() const override
Clone parameters.
double m_mean
Mean value of the Poisson distribution.
Random number accessor This small class encapsulates the use of the random number generator...
Bit()
Standard Constructor.
double probability() const
Access number of events.
Poisson * clone() const override
Clone parameters.
DefinedPdf(const std::vector< double > &pdf, long intpol)
Standard Constructor.
Random Generator service interface definition Definition of a interface for a service to access rando...
double m_cut
Cut on the Gaussian tail distribution.
This class is used for returning status codes from appropriate routines.
static const InterfaceID & typeID()
Identifier for factory.
Parameters for the flat random number generation within boundaries [minimum, maximum].
double m_maximum
Upper boundary for random numbers.
std::vector< double > m_pdf
Vector containing probability distribution function.
static const InterfaceID & typeID()
Identifier for factory.
StudentT(double a)
Standard Constructor.
double cutOff() const
Access width of the distribution.
static const InterfaceID & typeID()
Identifier for factory.
double m_mean
Mean of the Gauss distribution.
long m_interpolation
Interpolation type.
static const InterfaceID & typeID()
Identifier for factory.
double maximum() const
Access upper edge.
Parameters for the StudentT distributed random number generation.
double m_lambda
Lambda parameter.
static const InterfaceID & typeID()
Identifier for factory.
Parameters for the Binomial distributed random number generation.
StatusCode shootArray(std::vector< double > &array, long num, long start=0)
Pop a new number from the buffer.
double kValue() const
Access K parameter.
double sigma() const
Access width of the distribution.
Parameters for the Landau distributed random number generation.
BreitWigner * clone() const override
Clone parameters.
struct GAUDI_API array
Parametrisation class for redirection array - like implementation.
Parameters for the Chi2 distributed random number generation.
double pop()
Pop a new number from the buffer.
double m_sigma
Sigma of the Gauss distribution.
Landau * clone() const override
Clone parameters.
static const InterfaceID & typeID()
Identifier for factory.
Parameters for the BreitWigner distributed random number generation with cut off;.
double sigma() const
Access width of the distribution.
double mean() const
Access mean value of the distribution.
Parameters for the Gamma distributed random number generation.
BreitWignerCutOff(double m, double g, double c)
Standard Constructor.
static const InterfaceID & typeID()
Identifier for factory.
Gamma(double k, double l)
Standard Constructor.
BreitWignerCutOff * clone() const override
Clone parameters.
double gamma() const
Access width of the distribution.
virtual StatusCode shootArray(std::vector< double > &array, long howmany, long start=0) const =0
Multiple shots returning vector with random number according to specified distribution.
Binomial(long n, double p)
Standard Constructor.
double m_aValue
StudentT distribution parameter.
Gauss * clone() const override
Clone parameters.
Chi2(long n_dof)
Standard Constructor.
double aValue() const
Access A parameter.
double cut() const
Access cut value of the distribution.
double mean() const
Access mean value of the distribution.
Parameters for the Gaussian tail number generation.
Generate a random number Generator following generally distributed random values, given a user-define...
Parameters for the Gauss random number generation.
Chi2 * clone() const override
Clone parameters.
double minimum() const
Access lower edge.
DefinedPdf * clone() const override
Clone parameters.
long m_nDOF
Number of degrees of freedom.
double mean() const
Access mean value of the distribution.
Parameters for the BreitWigner distributed random number generation.
Poisson(double m)
Standard Constructor.
static const InterfaceID & typeID()
Identifier for factory.
double gamma() const
Access width of the distribution.
double m_mean
Mean and Gamma parameter of the Breit-Wigner distribution.
GaussianTail * clone() const override
Clone parameters.
double sigma() const
Access sigma of the distribution.
Exponential(double m)
Standard Constructor.
std::vector< double > & pdf()
Access pdf.
static const InterfaceID & typeID()
Identifier for factory.