BOSS 7.0.6
BESIII Offline Software System
Loading...
Searching...
No Matches
BhlumiRandom Class Reference

#include <BhlumiRandom.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 13 of file BhlumiRandom.h.

Member Function Documentation

◆ Flat() [1/3]

double BhlumiRandom::Flat ( )
static

Definition at line 41 of file BhlumiRandom.cxx.

41 {
42
43 return BhlumiRandom::random();
44
45 }
static double random()

◆ Flat() [2/3]

double BhlumiRandom::Flat ( double  max)
static

Definition at line 35 of file BhlumiRandom.cxx.

35 {
36
38
39}

◆ Flat() [3/3]

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

Definition at line 25 of file BhlumiRandom.cxx.

25 {
26
27 if ( min > max ) {
28 cerr<< "min>max in BhlumiRandom::Flat(" << min << "," << max << ")" <<endl;
29 }
30
31 return BhlumiRandom::random()*( max - min )+min;
32
33}

◆ FlatArray()

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

Definition at line 47 of file BhlumiRandom.cxx.

47 {
48 if(_randomEngine == 0) cout<<"Can not get randomEngine pointer in BhlumiRandom::FlatArray"<<endl;
49 else _randomEngine->flatArray(size,vect);
50}

Referenced by carran_(), ecuran_(), and marran_().

◆ random()

double BhlumiRandom::random ( )
static

Definition at line 14 of file BhlumiRandom.cxx.

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

Referenced by Flat(), and ranmarr_().

◆ setRandomEngine()

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

Definition at line 10 of file BhlumiRandom.cxx.

10 {
11 _randomEngine=randomEngine;
12}

Referenced by Bhlumi::initialize().


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