CLHEP
2.4.6.4
C++ Class Library for High Energy Physics
Loading...
Searching...
No Matches
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
}
CLHEP::NonRandomEngine
Definition:
NonRandomEngine.h:40
CLHEP::NonRandomEngine::setNextRandom
void setNextRandom(double r)
Definition:
NonRandomEngine.cc:47
CLHEP::RandGauss
Definition:
RandGauss.h:43
CLHEP::RandGauss::fire
double fire()
main
int main()
Definition:
gaussSmall.cc:21
CLHEP
Definition:
DiagMatrix.h:23
CLHEP-CLHEP_2_4_6_4
Random
test
gaussSmall.cc
Generated by
1.9.6