Go to the documentation of this file.
11 #ifndef GAUDIKERNEL_RNDMGENGENERATORS_H
12 #define GAUDIKERNEL_RNDMGENGENERATORS_H
43 Gauss(
double m,
double s ) :
IRndmGen::Param( IID_IRndmGauss ), m_mean(
m ), m_sigma(
s ) {}
45 double mean()
const {
return m_mean; }
47 double sigma()
const {
return m_sigma; }
65 double mean()
const {
return m_mean; }
83 Chi2(
long n_dof ) :
IRndmGen::Param( IID_IRndmChi2 ), m_nDOF( n_dof ) {}
85 long nDOF()
const {
return m_nDOF; }
89 Chi2* clone()
const override {
return new Chi2( m_nDOF ); }
105 double mean()
const {
return m_mean; }
107 double gamma()
const {
return m_gamma; }
127 double mean()
const {
return m_mean; }
129 double sigma()
const {
return m_sigma; }
133 Landau* clone()
const override {
return new Landau( m_mean, m_sigma ); }
149 :
IRndmGen::Param( IID_IRndmBreitWignerCutOff ), m_mean(
m ), m_gamma(
g ), m_cut(
c ) {}
151 double mean()
const {
return m_mean; }
153 double gamma()
const {
return m_gamma; }
175 double aValue()
const {
return m_aValue; }
195 Gamma(
double k,
double l ) :
IRndmGen::Param( IID_IRndmGamma ), m_kValue( k ), m_lambda(
l ) {}
197 double kValue()
const {
return m_kValue; }
199 double lambda()
const {
return m_lambda; }
203 Gamma* clone()
const override {
return new Gamma( m_kValue, m_lambda ); }
220 double mean()
const {
return m_mean; }
239 Binomial(
long n,
double p ) :
IRndmGen::Param( IID_IRndmBinomial ), m_nEvent(
n ), m_probability( p ) {}
262 Flat(
double mi,
double ma ) :
IRndmGen::Param( IID_IRndmFlat ), m_minimum( mi ), m_maximum( ma ) {}
311 :
IRndmGen::Param( IID_IRndmDefinedPdf ), m_pdf( pdf ), m_interpolation( intpol ) {}
335 double cut()
const {
return m_cut; }
337 double sigma()
const {
return m_sigma; }
375 #if !defined( GAUDI_V22_API ) || defined( G22_NEW_SVCLOCATOR )
376 [[deprecated(
"use Numbers( SmartIF<IRndmGenSvc>, IRndmGen::Param ) instead" )]]
Numbers(
380 [[deprecated(
"use Numbers::initialize( SmartIF<IRndmGenSvc>, IRndmGen::Param ) instead" )]]
virtual StatusCode
386 operator bool()
const {
return m_generator; }
390 double pop()
const {
return this->shoot(); }
392 double shoot()
const {
return m_generator ? m_generator->shoot() : -1; }
399 #endif // GAUDIKERNEL_RNDMGENGENERATORS_H
long interpolation() const
Access interpolation type.
static const InterfaceID & typeID()
Identifier for factory.
double mean() const
Access mean value of the distribution.
double m_maximum
Upper boundary for random numbers.
double gamma() const
Access width of the distribution.
double mean() const
Access mean value of the distribution.
double operator()() const
Operator () for the use within STL.
GaussianTail * clone() const override
Clone parameters.
long m_nDOF
Number of degrees of freedom.
long nEvent() const
Access number of events.
GaussianTail(double a, double s)
Standard Constructor.
static const InterfaceID & typeID()
Identifier for factory.
double m_sigma
Sigma of the Gauss distribution.
double m_mean
Mean value of the exponential distribution.
Binomial(long n, double p)
Standard Constructor.
DefinedPdf(const std::vector< double > &pdf, long intpol)
Standard Constructor.
SmartIF< IRndmGen > m_generator
Pointer to random number generator.
static const InterfaceID & typeID()
Identifier for factory.
Parameters for the StudentT distributed random number generation.
double m_mean
Mean of the Gauss distribution.
long m_interpolation
Interpolation type.
DefinedPdf * clone() const override
Clone parameters.
Parameters for the Gaussian tail number generation.
Parameters for the flat random number generation within boundaries [minimum, maximum].
static const InterfaceID & typeID()
Identifier for factory.
static const InterfaceID & typeID()
Identifier for factory.
Gauss * clone() const override
Clone parameters.
std::vector< double > m_pdf
Vector containing probability distribution function.
double aValue() const
Access A parameter.
Exponential(double m)
Standard Constructor.
long m_nEvent
Number of events the binomial destribution corresponds to.
double maximum() const
Access upper edge.
Binomial * clone() const override
Clone parameters.
static const InterfaceID & typeID()
Identifier for factory.
Parameters for the BreitWigner distributed random number generation with cut off;.
double m_sigma
Sigma of the Gauss ditribution.
Parameters for the Landau distributed random number generation.
double m_cut
Cut on the Gaussian tail distribution.
Landau(double m, double s)
Standard Constructor.
double pop() const
Pop a new number from the buffer.
Parameters for the Gauss random number generation.
std::vector< double > & pdf()
Access pdf.
static const InterfaceID & typeID()
Identifier for factory.
Random number accessor This small class encapsulates the use of the random number generator.
double sigma() const
Access width of the distribution.
double m_mean
Mean value of the Poisson distribution.
double kValue() const
Access K parameter.
double mean() const
Access mean value of the distribution.
Parameters for the BreitWigner distributed random number generation.
double shoot() const
Pop a new number from the buffer.
static const InterfaceID & typeID()
Identifier for factory.
Gamma(double k, double l)
Standard Constructor.
static const InterfaceID & typeID()
Identifier for factory.
double minimum() const
Access lower edge.
Parameters for the Gamma distributed random number generation.
static const InterfaceID & typeID()
Identifier for factory.
static const InterfaceID & typeID()
Identifier for factory.
double mean() const
Access mean value of the distribution.
Numbers(const Numbers &)=default
Copy constructor.
long nDOF() const
Access mean value of the distribution.
Bit()
Standard Constructor.
double probability() const
Access number of events.
double m_mean
Mean, Gamma and cut off parameter of the Breit-Wigner distribution.
double m_lambda
Lambda parameter.
double m_mean
Mean and Gamma parameter of the Breit-Wigner distribution.
static const InterfaceID & typeID()
Identifier for factory.
BreitWigner(double m, double g)
Standard Constructor.
struct GAUDI_API array
Parametrisation class for redirection array - like implementation.
Poisson * clone() const override
Clone parameters.
StudentT(double a)
Standard Constructor.
double mean() const
Access mean value of the distribution.
Flat(double mi, double ma)
Standard Constructor.
Gauss(double m, double s)
Standard Constructor.
StatusCode shootArray(std::vector< double > &array, long num, long start=0) const
Pop a new number from the buffer.
Bit * clone() const override
Clone parameters.
double mean() const
Access mean value of the distribution.
double m_minimum
Lower boundary for random numbers.
Poisson(double m)
Standard Constructor.
double sigma() const
Access width of the distribution.
Chi2(long n_dof)
Standard Constructor.
Generate a random number Generator following generally distributed random values, given a user-define...
double gamma() const
Access width of the distribution.
double sigma() const
Access sigma of the distribution.
double lambda() const
Access Lambda parameter.
Parameters for the Gauss random number generation.
double m_aValue
StudentT distribution parameter.
double cut() const
Access cut value of the distribution.
Parameters for the Chi2 distributed random number generation.
Parameters for the Poisson distributed random number generation with a given mean.
Flat * clone() const override
Clone parameters.
double cutOff() const
Access width of the distribution.
static const InterfaceID & typeID()
Identifier for factory.
constexpr static const auto FAILURE
BreitWignerCutOff(double m, double g, double c)
Standard Constructor.
double m_probability
And the probability for having success.
static const InterfaceID & typeID()
Identifier for factory.
Parameters for the Binomial distributed random number generation.
Parameters for the bit value generation: returns values 0 and 1.
Numbers()=default
Standard constructor.