CLHEP VERSION Reference Documentation
CLHEP Home Page
CLHEP Documentation
CLHEP Bug Reports
Random
test
gaussSmall.cc
Go to the documentation of this file.
1
#include "
CLHEP/Random/Randomize.h
"
2
#include "
CLHEP/Random/NonRandomEngine.h
"
3
#include "
CLHEP/Random/defs.h
"
4
#include <iostream>
5
#include <iomanip>
6
7
using
std::cin;
8
using
std::cout;
9
using
std::cerr;
10
using
std::endl;
11
using namespace
CLHEP
;
12
//#ifndef _WIN32
13
//using std::exp;
14
//#endif
15
16
␌
17
// ---------
18
// RandGauss
19
// ---------
20
21
int
main
() {
22
23
cout <<
"\n--------------------------------------------\n"
;
24
cout <<
"Test of Gauss distribution at small r \n\n"
;
25
26
cout <<
"\nInstantiating distribution utilizing NonRandomEngine...\n"
;
27
NonRandomEngine
eng;
28
RandGauss
dist (eng);
29
30
double
r;
31
while
(
true
) {
32
cout <<
"r -- "
;
33
cin >> r;
34
eng.
setNextRandom
(r);
35
double
x = dist.
fire
();
36
cout <<
" "
<< std::setprecision(16) << x <<
"\n"
;
37
if
( x > 1.0e15 )
break
;
38
}
39
return
0;
40
}
NonRandomEngine.h
Randomize.h
defs.h
CLHEP::NonRandomEngine
Definition
RandomObjects/CLHEP/Random/NonRandomEngine.h:40
CLHEP::NonRandomEngine::setNextRandom
void setNextRandom(double r)
Definition
NonRandomEngine.cc:46
CLHEP::RandGauss
Definition
RandomObjects/CLHEP/Random/RandGauss.h:42
CLHEP::RandGauss::fire
double fire()
main
int main()
Definition
gaussSmall.cc:21
CLHEP
Definition
ClhepVersion.h:13
Generated by
1.12.0