BOSS 7.1.1
BESIII Offline Software System
Loading...
Searching...
No Matches
BabayagaNLORandom Class Reference

#include <BabayagaNLORandom.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 void FlatArrayF (float *vect, const int size)
 
static double random ()
 
static void setRandomEngine (CLHEP::HepRandomEngine *randomEngine)
 

Detailed Description

Definition at line 27 of file BabayagaNLORandom.h.

Member Function Documentation

◆ Flat() [1/3]

double BabayagaNLORandom::Flat ( )
static

Definition at line 66 of file BabayagaNLORandom.cxx.

66 {
67
69
70 }
static double random()

◆ Flat() [2/3]

double BabayagaNLORandom::Flat ( double max)
static

Definition at line 60 of file BabayagaNLORandom.cxx.

60 {
61
63
64}

◆ Flat() [3/3]

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

Definition at line 50 of file BabayagaNLORandom.cxx.

50 {
51
52 if ( min > max ) {
53 cerr<< "min>max in BabayagaNLORandom::Flat(" << min << "," << max << ")" <<endl;
54 }
55
56 return BabayagaNLORandom::random()*( max - min )+min;
57
58}

◆ FlatArray()

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

Definition at line 72 of file BabayagaNLORandom.cxx.

72 {
73 if(_randomEngine == 0)
74 cout<<"Can not get randomEngine pointer in BabayagaNLORandom::FlatArray"<<endl;
75 else {
76 _randomEngine->flatArray(size,vect);
77 }
78}

Referenced by babayaga_ranluxd_().

◆ FlatArrayF()

void BabayagaNLORandom::FlatArrayF ( float * vect,
const int size )
static

Definition at line 80 of file BabayagaNLORandom.cxx.

80 {
81
82 double *dvec = new double [size];
83 if(_randomEngine == 0) {
84 cout<<"Can not get randomEngine pointer in BabayagaNLORandom::FlatArray"<<endl;
85 return;
86 }
87 else {
88 _randomEngine->flatArray(size,dvec);
89 }
90
91 for (int i=0; i<size; i++) vect[i] = dvec[i];
92
93 delete [] dvec;
94}

Referenced by babayaga_ranlux_().

◆ random()

double BabayagaNLORandom::random ( )
static

Definition at line 38 of file BabayagaNLORandom.cxx.

38 {
39
40 if (_randomEngine==0){
41 cerr <<"No random engine available in "
42 <<"BabayagaNLORandom::random()."<<endl;
43 }
44
45 return _randomEngine->flat();
46 }

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

◆ setRandomEngine()

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

Definition at line 33 of file BabayagaNLORandom.cxx.

33 {
34 _randomEngine=randomEngine;
35}

Referenced by BabayagaNLO::initialize().


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