23.05.2014 Views

Athena Developer Guide

Athena Developer Guide

Athena Developer Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Athena</strong> Chapter 13 Framework services Version/Issue: 2.0.0<br />

There are many different distributions available. The shape of the distribution must be supplied as a<br />

parameter when the generator is requested by the user.<br />

Currently implemented distributions include the following. See also the header file<br />

GaudiKernel/RndmGenerators.h for a description of the parameters to be supplied.<br />

• Generate random bit patterns with parameters Rndm::Bit()<br />

• Generate a flat distribution with boundaries [min, max] with parameters:<br />

Rndm::Flat(double min, double max)<br />

• Generate a gaussian distribution with parameters: Rndm::Gauss(double mean,<br />

double sigma)<br />

• Generate a poissonian distribution with parameters: Rndm::Poisson(double mean)<br />

• Generate a binomial distribution according to n tests with a probability p with parameters:<br />

Rndm::Binomial(long n, double p)<br />

• Generate an exponential distribution with parameters: Rndm::Exponential(double<br />

mean)<br />

• Generate a Chi**2 distribution with n_dof degrees of freedom with parameters:<br />

Rndm::Chi2(long n_dof)<br />

• Generate a Breit-Wigner distribution with parameters:<br />

Rndm::BreitWigner(double mean, double gamma)<br />

• Generate a Breit-Wigner distribution with a cut-off with parameters:<br />

Rndm::BreitWignerCutOff (mean, gamma, cut-off)<br />

• Generate a Landau distribution with parameters:<br />

Rndm::Landau(double mean, double sigma)<br />

• Generate a user defined distribution. The probability density function is given by a set of<br />

descrete points passed as a vector of doubles:<br />

Rndm::DefinedPdf(const std::vector& pdf, long intpol)<br />

Clearly the supplied list of possible parameters is not exhaustive, but probably represents most needs.<br />

The list only represents the present content of generators available in CLHEP and can be updated in<br />

case other distributions will be implemented.<br />

Since there is a danger that the interfaces are not released, a wrapper is provided that automatically<br />

releases all resources once the object goes out of scope. This wrapper allows the use of the random<br />

number service in a simple way. Typically there are two different usages of this wrapper:<br />

page 116

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!