rivet is hosted by Hepforge, IPPP Durham
Rivet 4.0.0
Random.hh
1// -*- C++ -*-
2#ifndef RIVET_Random_HH
3#define RIVET_Random_HH
4
5#include <random>
6// #if defined(_OPENMP)
7// #include "omp.h"
8// #endif
9
10namespace Rivet {
11
13 std::mt19937& rng();
14
16 double rand01();
17
19 double randnorm(double loc, double scale);
20
22 double randlognorm(double loc, double scale);
23
25 double randcrystalball(double alpha, double n, double mu, double sigma);
26
27
29 double pNorm(double x, double mu, double sigma);
31 double pCrystalBall(double x, double alpha, double n, double mu, double sigma);
32
33
34}
35
36#endif
Definition MC_CENT_PPB_Projections.hh:10
double rand01()
Return a uniformly sampled random number between 0 and 1.
double pCrystalBall(double x, double alpha, double n, double mu, double sigma)
Probability density of a Crystal Ball distribution at x.
double pNorm(double x, double mu, double sigma)
Probability density of a Gaussian/normal distribution at x.
double randnorm(double loc, double scale)
Return a random number sampled from a Gaussian/normal distribution.
double randcrystalball(double alpha, double n, double mu, double sigma)
Return a random number sampled from a Crystal Ball distribution.
double randlognorm(double loc, double scale)
Return a random number sampled from a log-normal distribution.
std::mt19937 & rng()
Return a thread-safe random number generator (mainly for internal use)