Rivet: /Users/chrisg/software/rivet/include/Rivet/Tools/Random.hh Source File

| Rivet 3.1.9

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