CGEM BOSS 6.6.5.h
BESIII Offline Software System
Loading...
Searching...
No Matches
EkharaRandom Class Reference

#include <EkharaRandom.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 6 of file EkharaRandom.h.

Member Function Documentation

◆ Flat() [1/3]

double EkharaRandom::Flat ( )
static

Definition at line 44 of file EkharaRandom.cxx.

44 {
45
46 return EkharaRandom::random();
47
48 }
static double random()

◆ Flat() [2/3]

double EkharaRandom::Flat ( double max)
static

Definition at line 38 of file EkharaRandom.cxx.

38 {
39
40 return max*EkharaRandom::random();
41
42}

◆ Flat() [3/3]

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

Definition at line 28 of file EkharaRandom.cxx.

28 {
29
30 if ( min > max ) {
31 cerr<< "min>max in EkharaRandom::Flat(" << min << "," << max << ")" <<endl;
32 }
33
34 return EkharaRandom::random()*( max - min )+min;
35
36}

◆ FlatArray()

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

Definition at line 50 of file EkharaRandom.cxx.

50 {
51 if(_randomEngine == 0)
52 cout<<"Can not get randomEngine pointer in EkharaRandom::FlatArray"<<endl;
53 else {
54 _randomEngine->flatArray(size,vect);
55 }
56}

◆ random()

double EkharaRandom::random ( )
static

Definition at line 16 of file EkharaRandom.cxx.

16 {
17
18 if (_randomEngine==0){
19 cerr <<"No random engine available in "
20 <<"EkharaRandom::random()."<<endl;
21 }
22
23 return _randomEngine->flat();
24 }

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

◆ setRandomEngine()

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

Definition at line 11 of file EkharaRandom.cxx.

11 {
12 _randomEngine=randomEngine;
13}

Referenced by Ekhara::initialize().


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