9 #ifndef ThePEG_UseRandom_H
10 #define ThePEG_UseRandom_H
13 #include "ThePEG/Repository/RandomGenerator.h"
96 template <
typename Unit>
103 template <
typename Unit>
104 static Unit
rnd(Unit xl, Unit xu) {
126 static int rndsign(
double p1,
double p2,
double p3) {
134 static int rnd2(
double p0,
double p1) {
142 static int rnd3(
double p0,
double p1,
double p2) {
150 static int rnd4(
double p0,
double p1,
double p2,
double p3) {
157 static long irnd(
long xu = 2) {
return long(
rnd() * xu); }
162 static long irnd(
long xl,
long xu) {
return xl +
irnd(xu-xl); }
174 template <
typename Unit>
187 template <
typename Unit>
188 static Unit
rndGauss(Unit sigma, Unit mean = Unit()) {
197 template <
typename Unit>
198 static Unit
rndBW(Unit mean, Unit gamma) {
208 template <
typename Unit>
209 static Unit
rndBW(Unit mean, Unit gamma, Unit cut) {
217 template <
typename Unit>
228 template <
typename Unit>
229 static Unit
rndRelBW(Unit mean, Unit gamma, Unit cut) {