CLHEP VERSION Reference Documentation
CLHEP Home Page
CLHEP Documentation
CLHEP Bug Reports
Main Page
Namespaces
Classes
Files
File List
File Members
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
}
main
int main()
Definition:
gaussSmall.cc:21
CLHEP::NonRandomEngine::setNextRandom
void setNextRandom(double r)
Definition:
NonRandomEngine.cc:46
CLHEP::NonRandomEngine
Definition:
Matrix/CLHEP/Random/NonRandomEngine.h:40
CLHEP::RandGauss::fire
double fire()
CLHEP::RandGauss
Definition:
Matrix/CLHEP/Random/RandGauss.h:42
Generated on Sat Apr 26 2014 20:36:36 for CLHEP by
1.8.6