Rivet  3.1.4
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 
10 namespace 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.hh:10
double randlognorm(double loc, double scale)
Return a random number sampled from a log-normal distribution.
double pCrystalBall(double x, double alpha, double n, double mu, double sigma)
Probability density of a Crystal Ball distribution at x.
double randcrystalball(double alpha, double n, double mu, double sigma)
Return a random number sampled from a Crystal Ball distribution.
double pNorm(double x, double mu, double sigma)
Probability density of a Gaussian/normal distribution at x.
std::mt19937 & rng()
Return a thread-safe random number generator (mainly for internal use)
double rand01()
Return a uniformly sampled random number between 0 and 1.
double randnorm(double loc, double scale)
Return a random number sampled from a Gaussian/normal distribution.