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

#include <BhwideRandom.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 12 of file BhwideRandom.h.

Member Function Documentation

◆ Flat() [1/3]

double BhwideRandom::Flat ( )
static

Definition at line 33 of file BhwideRandom.cxx.

33{ return BhwideRandom::random(); }
static double random()

◆ Flat() [2/3]

double BhwideRandom::Flat ( double max)
static

Definition at line 31 of file BhwideRandom.cxx.

31{ return max * BhwideRandom::random(); }
#define max(a, b)

◆ Flat() [3/3]

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

Definition at line 23 of file BhwideRandom.cxx.

23 {
24
25 if ( min > max )
26 { cerr << "min>max in BhwideRandom::Flat(" << min << "," << max << ")" << endl; }
27
28 return BhwideRandom::random() * ( max - min ) + min;
29}
#define min(a, b)

◆ FlatArray()

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

Definition at line 35 of file BhwideRandom.cxx.

35 {
36 if ( _randomEngine == 0 )
37 cout << "Can not get randomEngine pointer in BhwideRandom::FlatArray" << endl;
38 else _randomEngine->flatArray( size, vect );
39}

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

◆ random()

double BhwideRandom::random ( )
static

Definition at line 13 of file BhwideRandom.cxx.

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

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

◆ setRandomEngine()

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

Definition at line 9 of file BhwideRandom.cxx.

9 {
10 _randomEngine = randomEngine;
11}

Referenced by Bhwide::initialize().


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