hep.lcd.contrib.util.functions
Class GaussianBoxRandom
java.lang.Object
|
+--hep.lcd.contrib.util.functions.GaussianBoxRandom
- public class GaussianBoxRandom
- extends Object
GaussianBoxRandom generates random numbers from a box distribution
convoluted with a Gaussian. This is the form of the data produced from
the energy distribution of a single particle C from the production mode
e+e- -> A + A followed by the decay A -> B + C.
The resolution will be of the form sigma / E = constant + slope / sqrt(E).
- Version:
- 1.0
- Author:
- David L. Wagner
- Source Code:
- GaussianBoxRandom.java
Constructor Summary |
GaussianBoxRandom(double xmin,
double xmax,
double slope)
Constructor which assumes a zero constant term. |
GaussianBoxRandom(double xmin,
double xmax,
double constant,
double slope)
Constructor which uses all four parameters. |
GaussianBoxRandom(double xmin,
double xmax,
double constant,
double slope,
long seed)
Full form of the constructor which allows the seed to specified as well. |
Method Summary |
double |
nextDouble()
Return the next random number as a double. |
float |
nextFloat()
Return the next random number as a floating point number. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GaussianBoxRandom
public GaussianBoxRandom(double xmin,
double xmax,
double slope)
- Constructor which assumes a zero constant term.
- Parameters:
xmin
- minimum value for the boxxmax
- maximum value for the boxslope
- slope term of the resolution
GaussianBoxRandom
public GaussianBoxRandom(double xmin,
double xmax,
double constant,
double slope)
- Constructor which uses all four parameters.
- Parameters:
xmin
- minimum value for the boxxmax
- maximum value for the boxconstant
- constant term of the resolutionslope
- slope term of the resolution
GaussianBoxRandom
public GaussianBoxRandom(double xmin,
double xmax,
double constant,
double slope,
long seed)
- Full form of the constructor which allows the seed to specified as well.
- Parameters:
xmin
- minimum value for the boxxmax
- maximum value for the boxconstant
- constant term of the resolutionslope
- slope term of the resolutionseed
- seed for the random number generator
nextFloat
public float nextFloat()
- Return the next random number as a floating point number.
nextDouble
public double nextDouble()
- Return the next random number as a double.
The LCD Group