RandPoisson


Class defining methods for shooting numbers according to the Poisson distribution, given a mean (Algorithm taken from "W.H.Press et al., Numerical Recipes in C, Second Edition").
Default mean value is set to 1, value used for operator()().

Author

Gabriele Cosmo

See also

Engines: HepRandomEngine, DRand48Engine , DualRand HepJamesRandom Hurd160Engine Hurd288Engine MTwistEngine RandEngine RanecuEngine RanluxEngine Ranlux64Engine RanshiEngine TripleRand

Distributions: HepRandom, RandBinomial RandBreitWigner RandChiSquare RandExponential RandFlat RandGamma RandGauss RandGeneral RandStudentT

Declaration

#include "CLHEP/Random/RandPoisson.h"

class RandPoisson : public HepRandom

Public Member Functions

Constructors
inline RandPoisson(HepRandomEngine& anEngine, HepDouble m=1.0)
inline RandPoisson(HepRandomEngine* anEngine, HepDouble m=1.0)
These constructors should be used to instantiate a RandPoisson distribution object defining a local engine for it.
The static generator will be skeeped using the non-static methods defined below.
If the engine is passed by pointer the corresponding engine object will be deleted by the RandPoisson destructor.
If the engine is passed by reference the corresponding engine object will not be deleted by the RandPoisson destructor.
Destructor
virtual ~RandPoisson()
()
HepDouble operator()();
HepDouble operator()(HepDouble m)
Methods using the localEngine to shoot random values, by-passing the static generator.
fire
long fire()
long fire(HepDouble m)
Methods using the localEngine to shoot random values, by-passing the static generator.
fireArray
void fireArray(const HepInt size, long* vect)
void fireArray(const HepInt size, long* vect, HepDouble m)
Methods using the localEngine to shoot random values, by-passing the static generator.
shoot
static long shoot( HepDouble m=1.0 )
Static method to shoot random values using the static generator.

static long shoot(HepRandomEngine* anEngine, HepDouble m=1.0)
Static method to shoot random values using a given engine by-passing the static generator.
shootArray
static void shootArray(const HepInt size, long* vect, HepDouble m=1.0 )
Static method to shoot random values using the static generator.

static void shootArray(HepRandomEngine* anEngine, const HepInt size, long* vect, HepDouble m=1.0)
Static method to shoot random values using a given engine by-passing the static generator.

Example

CLHEP/test/testRandom.cc


04 May 1999
EVC