#include "Math/Random.h"
#include "Math/GSLRndmEngines.h"
#include "Math/DistFunc.h"
#include "TStopwatch.h"
#include "TRandom3.h"
#include "TRandom2.h"
#include "TCanvas.h"
#include "TH1D.h"
#include "TH2D.h"
#include "TH3D.h"
#include "TMath.h"
#include <iostream>
#include <cmath>
#include <typeinfo>
#include "UnuRanDist.h"
Go to the source code of this file.
Defines | |
#define | HAVE_UNURAN |
#define | PI 3.14159265358979323846264338328 |
#define | NEVT 1000000 |
Functions | |
void | testDiff (TH1D &h1, TH1D &h2, const std::string &name="") |
template<class R> | |
std::string | findName (const R &r) |
template<class R> | |
void | testPoisson (R &r, double mu, TH1D &h) |
template<class R> | |
unsigned int | genPoisson (R &r, double mu) |
template<class R> | |
unsigned int | genPoisson2 (R &r, double mu) |
template<class R> | |
void | testPoisson2 (R &r, double mu, TH1D &h) |
template<class R> | |
void | testFlat (R &r, TH1D &h) |
template<class R> | |
void | testGaus (R &r, double mu, double sigma, TH1D &h) |
template<class R> | |
void | testLandau (R &r, TH1D &h) |
template<class R> | |
void | testBreitWigner (R &r, double mu, double gamma, TH1D &h) |
template<class R> | |
void | testBinomial (R &r, int ntot, double p, TH1D &h) |
template<class R> | |
void | testBinomialCLHEP (R &r, int ntot, double p, TH1D &h) |
template<class R> | |
void | testMultinomial (R &r, int ntot, TH1D &h1, TH1D &h2) |
template<class R> | |
void | testExp (R &r, TH1D &h) |
template<class R> | |
void | testCircle (R &r, TH1D &h) |
template<class R> | |
void | testSphere (R &r, TH1D &h1, TH1D &h2) |
int | testRandomDist () |
int | main () |
Variables | |
static bool | fillHist = false |
#define HAVE_UNURAN |
Definition at line 15 of file testRandomDist.cxx.
#define NEVT 1000000 |
Definition at line 39 of file testRandomDist.cxx.
#define PI 3.14159265358979323846264338328 |
Definition at line 33 of file testRandomDist.cxx.
std::string findName | ( | const R & | r | ) |
Definition at line 75 of file testRandomDist.cxx.
Referenced by testBinomial(), testBinomialCLHEP(), testBreitWigner(), testCircle(), testExp(), testFlat(), testGaus(), testLandau(), testMultinomial(), testPoisson(), testPoisson2(), and testSphere().
Definition at line 119 of file testRandomDist.cxx.
References exp(), TMath::Exp(), k, log(), m, TMath::Pi(), pi, sqrt(), tan(), x, and y.
Definition at line 172 of file testRandomDist.cxx.
References TMath::Exp(), exp(), floor(), g, k, TMath::LnGamma(), log(), TMath::Pi(), pi, sqrt(), t, tan(), and y.
int main | ( | void | ) |
Definition at line 433 of file testRandomDist.cxx.
References fillHist, findName(), h, i, NEVT, w, and x.
Referenced by testRandomDist(), and unuranDiscrete().
Definition at line 458 of file testRandomDist.cxx.
References fillHist, findName(), h, i, NEVT, w, and x.
Referenced by testRandomDist().
Definition at line 407 of file testRandomDist.cxx.
References fillHist, findName(), h, i, NEVT, w, and x.
Referenced by testRandomDist().
Definition at line 566 of file testRandomDist.cxx.
References atan2(), fillHist, findName(), h, i, NEVT, w, x, and y.
Referenced by testRandomDist().
void testDiff | ( | TH1D & | h1, | |
TH1D & | h2, | |||
const std::string & | name = "" | |||
) |
Definition at line 53 of file testRandomDist.cxx.
References c1, TH1::Chi2TestX(), TH2D::DrawCopy(), TH1::GetEntries(), h1, h2, name, and TCanvas::Update().
Referenced by testRandomDist().
Definition at line 541 of file testRandomDist.cxx.
References fillHist, findName(), h, i, NEVT, w, and x.
Referenced by testRandomDist().
Definition at line 326 of file testRandomDist.cxx.
References fillHist, findName(), h, i, NEVT, w, and x.
Referenced by testRandomDist().
Definition at line 352 of file testRandomDist.cxx.
References fillHist, findName(), h, i, NEVT, w, and x.
Referenced by testRandomDist().
Definition at line 379 of file testRandomDist.cxx.
References fillHist, findName(), h, i, NEVT, w, and x.
Referenced by testRandomDist().
Definition at line 483 of file testRandomDist.cxx.
References fillHist, findName(), TH1::GetBinLowEdge(), TH1::GetBinWidth(), TH1::GetNbinsX(), h1, h2, i, j, nbins, NEVT, ROOT::Math::normal_cdf(), p, TH2D::SetBinContent(), w, x1, x2, and y.
Referenced by testRandomDist().
Definition at line 92 of file testRandomDist.cxx.
References fillHist, findName(), h, i, n, NEVT, and w.
Referenced by testRandomDist(), and unuranDiscrete().
Definition at line 220 of file testRandomDist.cxx.
int testRandomDist | ( | ) |
Definition at line 658 of file testRandomDist.cxx.
References TH1::FillRandom(), floor(), max, min, NEVT, p, PI, sqrt(), testBinomial(), testBinomialCLHEP(), testBreitWigner(), testCircle(), testDiff(), testExp(), testFlat(), testGaus(), testLandau(), testMultinomial(), testPoisson(), testSphere(), xmax, and xmin.
Referenced by main().
Definition at line 595 of file testRandomDist.cxx.
References atan2(), c1, TCanvas::cd(), TPad::Divide(), TH1D::DrawCopy(), TH2D::DrawCopy(), TH3D::DrawCopy(), TH3::Fill(), TH2::Fill(), TH1::Fill(), fillHist, findName(), h1, h2, i, NEVT, sqrt(), TCanvas::Update(), w, x, and y.
Referenced by testRandomDist().
bool fillHist = false [static] |
Definition at line 49 of file testRandomDist.cxx.
Referenced by testBinomial(), testBinomialCLHEP(), testBreitWigner(), testCircle(), testExp(), testFlat(), testGaus(), testLandau(), testMultinomial(), testPoisson(), testPoisson2(), and testSphere().