BOSS 7.0.2
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)
 
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

Member Function Documentation

◆ Flat() [1/6]

double KKMCRandom::Flat ( )
static

Definition at line 65 of file KKMCRandom.cxx.

65 {
66
67 return KKMCRandom::random();
68
69 }
static double random()
Definition: KKMCRandom.cxx:37

◆ Flat() [2/6]

static double KKMCRandom::Flat ( )
static

◆ Flat() [3/6]

double KKMCRandom::Flat ( double  max)
static

Definition at line 59 of file KKMCRandom.cxx.

59 {
60
61 return max*KKMCRandom::random();
62
63}

◆ Flat() [4/6]

static double KKMCRandom::Flat ( double  max)
static

◆ Flat() [5/6]

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

Definition at line 49 of file KKMCRandom.cxx.

49 {
50
51 if ( min > max ) {
52 cerr<< "min>max in KKMCRandom::Flat(" << min << "," << max << ")" <<endl;
53 }
54
55 return KKMCRandom::random()*( max - min )+min;
56
57}

◆ Flat() [6/6]

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

◆ FlatArray() [1/2]

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

Definition at line 71 of file KKMCRandom.cxx.

71 {
72 if(_randomEngine == 0) cout<<"Can not get randomEngine pointer in KKMCRandom::FlatArray"<<endl;
73 else _randomEngine->flatArray(size,vect);
74}

◆ FlatArray() [2/2]

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

◆ random() [1/2]

double KKMCRandom::random ( )
static

Definition at line 37 of file KKMCRandom.cxx.

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

Referenced by Flat(), and flat_().

◆ random() [2/2]

static double KKMCRandom::random ( )
static

◆ setRandomEngine() [1/2]

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

Definition at line 32 of file KKMCRandom.cxx.

32 {
33 _randomEngine=randomEngine;
34}

Referenced by KKMC::initialize().

◆ setRandomEngine() [2/2]

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

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