1 #ifndef GAUDIKERNEL_RNDMGENGENERATORS_H 2 #define GAUDIKERNEL_RNDMGENGENERATORS_H 33 Gauss(
double m,
double s ) :
IRndmGen::Param( IID_IRndmGauss ), m_mean(
m ), m_sigma(
s ) {}
35 double mean()
const {
return m_mean; }
37 double sigma()
const {
return m_sigma; }
55 double mean()
const {
return m_mean; }
73 Chi2(
long n_dof ) :
IRndmGen::Param( IID_IRndmChi2 ), m_nDOF( n_dof ) {}
75 long nDOF()
const {
return m_nDOF; }
95 double mean()
const {
return m_mean; }
97 double gamma()
const {
return m_gamma; }
117 double mean()
const {
return m_mean; }
119 double sigma()
const {
return m_sigma; }
139 :
IRndmGen::Param( IID_IRndmBreitWignerCutOff ), m_mean(
m ), m_gamma(
g ), m_cut(
c ) {}
141 double mean()
const {
return m_mean; }
143 double gamma()
const {
return m_gamma; }
165 double aValue()
const {
return m_aValue; }
185 Gamma(
double k,
double l ) :
IRndmGen::Param( IID_IRndmGamma ), m_kValue( k ), m_lambda(
l ) {}
187 double kValue()
const {
return m_kValue; }
189 double lambda()
const {
return m_lambda; }
210 double mean()
const {
return m_mean; }
229 Binomial(
long n,
double p ) :
IRndmGen::Param( IID_IRndmBinomial ), m_nEvent(
n ), m_probability( p ) {}
252 Flat(
double mi,
double ma ) :
IRndmGen::Param( IID_IRndmFlat ), m_minimum( mi ), m_maximum( ma ) {}
301 :
IRndmGen::Param( IID_IRndmDefinedPdf ), m_pdf( pdf ), m_interpolation( intpol ) {}
325 double cut()
const {
return m_cut; }
327 double sigma()
const {
return m_sigma; }
365 #if !defined( GAUDI_V22_API ) || defined( G22_NEW_SVCLOCATOR ) 374 operator bool()
const {
return m_generator; }
378 double pop() {
return this->shoot(); }
380 double shoot() {
return m_generator ? m_generator->
shoot() : -1; }
387 #endif // GAUDIKERNEL_RNDMGENGENERATORS_H double cut() const
Access cut value of the distribution.
double lambda() const
Access Lambda parameter.
static const InterfaceID & typeID()
Identifier for factory.
Parameters for the bit value generation: returns values 0 and 1.
double mean() const
Access mean value of the distribution.
double m_mean
Mean, Gamma and cut off parameter of the Breit-Wigner distribution.
Exponential * clone() const override
Clone parameters.
static const InterfaceID & typeID()
Identifier for factory.
GaussianTail(double a, double s)
Standard Constructor.
double kValue() const
Access K parameter.
double m_minimum
Lower boundary for random numbers.
static const InterfaceID & typeID()
Identifier for factory.
Parameters for the Poisson distributed random number generation with a given mean.
Definition of a interface for a generic random number generators.
double mean() const
Access mean value of the distribution.
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.
BreitWigner * clone() const override
Clone parameters.
static const InterfaceID & typeID()
Identifier for factory.
GaussianTail * clone() const override
Clone parameters.
Parameters for the Gauss random number generation.
Gauss(double m, double s)
Standard Constructor.
double cutOff() const
Access width of the distribution.
Landau * clone() const override
Clone parameters.
Flat(double mi, double ma)
Standard Constructor.
double shoot()
Pop a new number from the buffer.
long m_nEvent
Number of events the binomial destribution corresponds to.
double m_mean
Mean value of the exponential distribution.
double mean() const
Access mean value of the distribution.
BreitWigner(double m, double g)
Standard Constructor.
double probability() const
Access number of events.
Landau(double m, double s)
Standard Constructor.
long nDOF() const
Access mean value of the distribution.
double m_mean
Mean value of the Poisson distribution.
Random number accessor This small class encapsulates the use of the random number generator.
double gamma() const
Access width of the distribution.
Bit()
Standard Constructor.
Chi2 * 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.
double mean() const
Access mean value of the distribution.
double minimum() const
Access lower edge.
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.
long interpolation() const
Access interpolation type.
StudentT(double a)
Standard Constructor.
StudentT * clone() const override
Clone parameters.
double gamma() 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.
Gauss * clone() const override
Clone parameters.
Parameters for the StudentT distributed random number generation.
double m_lambda
Lambda parameter.
static const InterfaceID & typeID()
Identifier for factory.
Flat * clone() const override
Clone parameters.
Parameters for the Binomial distributed random number generation.
double aValue() const
Access A parameter.
StatusCode shootArray(std::vector< double > &array, long num, long start=0)
Pop a new number from the buffer.
virtual double shoot() const =0
Single shot returning single random number according to specified distribution.
Parameters for the Landau distributed random number generation.
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.
Binomial * clone() const override
Clone parameters.
double m_sigma
Sigma of the Gauss distribution.
static const InterfaceID & typeID()
Identifier for factory.
Parameters for the BreitWigner distributed random number generation with cut off;.
double maximum() const
Access upper edge.
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.
double sigma() const
Access width of the distribution.
Parameters for the Gamma distributed random number generation.
double sigma() const
Access width of the distribution.
BreitWignerCutOff * clone() const override
Clone parameters.
long nEvent() const
Access number of events.
Poisson * clone() const override
Clone parameters.
BreitWignerCutOff(double m, double g, double c)
Standard Constructor.
constexpr static const auto FAILURE
static const InterfaceID & typeID()
Identifier for factory.
Gamma * clone() const override
Clone parameters.
Gamma(double k, double l)
Standard Constructor.
Binomial(long n, double p)
Standard Constructor.
double m_aValue
StudentT distribution parameter.
double sigma() const
Access sigma of the distribution.
Chi2(long n_dof)
Standard Constructor.
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.
Bit * clone() const override
Clone parameters.
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 m_mean
Mean and Gamma parameter of the Breit-Wigner distribution.
Exponential(double m)
Standard Constructor.
std::vector< double > & pdf()
Access pdf.
static const InterfaceID & typeID()
Identifier for factory.