BOSS
8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
BhlumiRandom.cxx
Go to the documentation of this file.
1
#include "
BhlumiRandom.h
"
2
3
#include <iostream>
4
using namespace
std
;
5
using namespace
CLHEP;
6
7
HepRandomEngine* BhlumiRandom::_randomEngine = 0;
8
9
void
BhlumiRandom::setRandomEngine
( CLHEP::HepRandomEngine* randomEngine ) {
10
_randomEngine = randomEngine;
11
}
12
13
double
BhlumiRandom::random
() {
14
15
if
( _randomEngine == 0 )
16
{
17
cerr <<
"No random engine available in "
18
<<
"BhlumiRandom::random()."
<< endl;
19
}
20
return
_randomEngine->flat();
21
}
22
23
double
BhlumiRandom::Flat
(
double
min
,
double
max
) {
24
25
if
(
min
>
max
)
26
{ cerr <<
"min>max in BhlumiRandom::Flat("
<<
min
<<
","
<<
max
<<
")"
<< endl; }
27
28
return
BhlumiRandom::random
() * (
max
-
min
) +
min
;
29
}
30
31
double
BhlumiRandom::Flat
(
double
max
) {
return
max
*
BhlumiRandom::random
(); }
32
33
double
BhlumiRandom::Flat
() {
return
BhlumiRandom::random
(); }
34
35
void
BhlumiRandom::FlatArray
(
double
* vect,
const
int
size ) {
36
if
( _randomEngine == 0 )
37
cout <<
"Can not get randomEngine pointer in BhlumiRandom::FlatArray"
<< endl;
38
else
_randomEngine->flatArray( size, vect );
39
}
BhlumiRandom.h
min
#define min(a, b)
Definition
Eepipi/src/ee2eepp/basesv5.1/f2c.h:157
max
#define max(a, b)
Definition
Eepipi/src/ee2eepp/basesv5.1/f2c.h:158
BhlumiRandom::FlatArray
static void FlatArray(double *vect, const int size)
Definition
BhlumiRandom.cxx:35
BhlumiRandom::setRandomEngine
static void setRandomEngine(CLHEP::HepRandomEngine *randomEngine)
Definition
BhlumiRandom.cxx:9
BhlumiRandom::random
static double random()
Definition
BhlumiRandom.cxx:13
BhlumiRandom::Flat
static double Flat()
Definition
BhlumiRandom.cxx:33
std
Definition
x86_64-el9-gcc13-dbg/Event/RootEventData/RootEventDataDict.cxx:101
8.0.0
BOSS_Gen
Bhlumi
src
BhlumiRandom.cxx
Generated by
1.16.1