It's exactly analogous to HepRandom except that the return types for the fire() and related methods are HepVector instead of HepDouble.

Distribution classes returning HepVectors of results inherit from HepRandomVector instead of HepRandom.

HepVector is used instead of the more modern looking std::vector<HepDouble> because the motivating sub-class RandMultiGauss uses HepMatrix to supply the correlation matrix S anyway. Given that, we might as well stick to HepVector when a vector of numbers is needed, as well.


Mark Fischler

See also



#include "CLHEP/RandomObjects/RandomVector.h"

class HepRandomVector

Public Member Functions

HepRandomVector(long seed)
Contructors with and without a seed using a default engine (JamesRandom) which is instantiated for use of this distribution instance.
If the seed is omitted, multiple instantiations will each get unique seeds.

HepRandomVector(HepRandomEngine & engine)
HepRandomVector(HepRandomEngine * engine)
Constructor taking an alternative engine as argument.
If a pointer is given the corresponding object will be deleted by the HepRandom destructor.
virtual ~HepRandomVector()
virtual HepVector operator()()
To get a flat random number using the operator().
inline HepVector flat()
Returns vector of the flat values ( interval ]0,1[ ).

inline HepVector flat (HepRandomEngine* theNewEngine)
Returns a vector of flat values, given a defined Random Engine.
inline void flatArray(const HepInt size, HepVector* vect)
Fills vect array of flat random values, given the size.
Included for consistency with the HepRandom class.

inline void flatArray(HepRandomEngine* theNewEngine, const HepInt size, HepVector* vect)
Fills vect array of flat random values, given the size and a defined Random Engine.



19 June 2001