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

#include <BabayagaRandom.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 18 of file BabayagaRandom.h.

Member Function Documentation

◆ Flat() [1/3]

double BabayagaRandom::Flat ( )
static

Definition at line 46 of file BabayagaRandom.cxx.

46{ return BabayagaRandom::random(); }
static double random()

◆ Flat() [2/3]

double BabayagaRandom::Flat ( double max)
static

Definition at line 44 of file BabayagaRandom.cxx.

44{ return max * BabayagaRandom::random(); }
#define max(a, b)

◆ Flat() [3/3]

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

Definition at line 36 of file BabayagaRandom.cxx.

36 {
37
38 if ( min > max )
39 { cerr << "min>max in BabayagaRandom::Flat(" << min << "," << max << ")" << endl; }
40
41 return BabayagaRandom::random() * ( max - min ) + min;
42}
#define min(a, b)

◆ FlatArray()

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

Definition at line 48 of file BabayagaRandom.cxx.

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

◆ random()

double BabayagaRandom::random ( )
static

Definition at line 26 of file BabayagaRandom.cxx.

26 {
27
28 if ( _randomEngine == 0 )
29 {
30 cerr << "No random engine available in "
31 << "BabayagaRandom::random()." << endl;
32 }
33 return _randomEngine->flat();
34}

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

◆ setRandomEngine()

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

Definition at line 22 of file BabayagaRandom.cxx.

22 {
23 _randomEngine = randomEngine;
24}

Referenced by Babayaga::initialize().


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