CLHEP 2.4.6.4
C++ Class Library for High Energy Physics
Loading...
Searching...
No Matches
gaussSmall.cc File Reference
#include "CLHEP/Random/Randomize.h"
#include "CLHEP/Random/NonRandomEngine.h"
#include "CLHEP/Random/defs.h"
#include <iostream>
#include <iomanip>

Go to the source code of this file.

Functions

int main ()
 

Function Documentation

◆ main()

int main ( )

Definition at line 21 of file gaussSmall.cc.

21 {
22
23 cout << "\n--------------------------------------------\n";
24 cout << "Test of Gauss distribution at small r \n\n";
25
26 cout << "\nInstantiating distribution utilizing NonRandomEngine...\n";
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}
void setNextRandom(double r)