CGEM BOSS 6.6.5.i
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 27 of file KKMCRandom.h.

Member Function Documentation

◆ Flat() [1/3]

double KKMCRandom::Flat ( )
static

Definition at line 65 of file KKMCRandom.cxx.

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

◆ Flat() [2/3]

double KKMCRandom::Flat ( double max)
static

Definition at line 59 of file KKMCRandom.cxx.

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

◆ Flat() [3/3]

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}

◆ FlatArray()

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}

◆ random()

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(), 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: