BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
KKMCRandom Class Reference

#include <KKMCRandom.h>

Static Public Member Functions

static double Flat (double min, double max)
static double Flat (double max)
static double Flat ()
static void FlatArray (double *vect, const int size)
static double random ()
static void setRandomEngine (CLHEP::HepRandomEngine *randomEngine)

Detailed Description

Definition at line 26 of file KKMCRandom.h.

Member Function Documentation

◆ Flat() [1/3]

double KKMCRandom::Flat ( )
static

Definition at line 57 of file KKMCRandom.cxx.

57{ return KKMCRandom::random(); }
static double random()

Referenced by rlu_().

◆ Flat() [2/3]

double KKMCRandom::Flat ( double max)
static

Definition at line 55 of file KKMCRandom.cxx.

55{ return max * KKMCRandom::random(); }
#define max(a, b)

◆ Flat() [3/3]

double KKMCRandom::Flat ( double min,
double max )
static

Definition at line 47 of file KKMCRandom.cxx.

47 {
48
49 if ( min > max )
50 { cerr << "min>max in KKMCRandom::Flat(" << min << "," << max << ")" << endl; }
51
52 return KKMCRandom::random() * ( max - min ) + min;
53}
#define min(a, b)

◆ FlatArray()

void KKMCRandom::FlatArray ( double * vect,
const int size )
static

Definition at line 59 of file KKMCRandom.cxx.

59 {
60 if ( _randomEngine == 0 )
61 cout << "Can not get randomEngine pointer in KKMCRandom::FlatArray" << endl;
62 else _randomEngine->flatArray( size, vect );
63}

◆ random()

double KKMCRandom::random ( )
static

Definition at line 36 of file KKMCRandom.cxx.

36 {
37
38 if ( _randomEngine == 0 )
39 {
40 cerr << "No random engine available in "
41 << "KKMCRandom::random()." << endl;
42 }
43
44 return _randomEngine->flat();
45}

Referenced by Flat(), Flat(), Flat(), and flat_().

◆ setRandomEngine()

void KKMCRandom::setRandomEngine ( CLHEP::HepRandomEngine * randomEngine)
static

Definition at line 32 of file KKMCRandom.cxx.

32 {
33 _randomEngine = randomEngine;
34}

Referenced by KKMC::initialize().


The documentation for this class was generated from the following files: