#ifndef BASIC_DISTRIBUTIONS_INL_
#define BASIC_DISTRIBUTIONS_INL_
#include <iostream>
#include <assert.h>
#include <time.h>
#include <chrono>
#include <tclap/CmdLine.h>
#include <hydra/detail/external/hydra_thrust/random.h>
#ifdef _ROOT_AVAILABLE_
#include <TROOT.h>
#include <TH1D.h>
#include <TApplication.h>
#include <TCanvas.h>
#endif //_ROOT_AVAILABLE_
{
try {
TCLAP::CmdLine cmd("Command line arguments for ", '=');
TCLAP::ValueArg<size_t>
EArg(
"n",
"number-of-events",
"Number of events",
true, 10e6,
"size_t");
}
catch (TCLAP::ArgException &e) {
std::cerr << " error: " << e.error()
<< " for arg " << e.argId()
<< std::endl;
}
#ifdef _ROOT_AVAILABLE_
TH1D hist_gauss("hist_gauss", "hydra::Gaussian<xvar>" , 100,-8.0, 8.0);
TH1D hist_lognormal("hist_lognormal", "hydra::LogNormal<xvar>" , 100,0.0, 2.5);
TH1D hist_bigauss("hist_bigauss", "hydra::BifurcatedGaussian<xvar>" , 100,-8.0, 8.0);
TH1D hist_exp("hist_exp" , "hydra::Exponential<xvar>", 100, 0.0, 10.0);
TH1D hist_bw("hist_bw" , "hydra::BreitWignerNR<xvar>", 100, 0.0, 10.0);
TH1D hist_chi("hist_chi" , "hydra::ChiSquare<xvar>", 100, 0.0, 10.0);
TH1D hist_johnson_su("hist_su" , "hydra::JohnsonSU<xvar>", 100, -5.0, 1.0);
TH1D hist_uniform("hist_uniform" , "hydra::UniformShape<xvar>", 100, -6.0, 6.0);
hist_uniform.SetMinimum(0.0);
TH1D hist_triangle("hist_triangle" , "hydra::TriangularShape<xvar>", 100, -6.0, 6.0);
TH1D hist_trapezoid("hist_trapezoid" , "hydra::TrapezoidalShape<xvar>", 100, -6.0, 6.0);
{
hist_gauss.Fill( gauss_dist(
engine, {0.0, 1.5} ));
}
TApplication *myapp=new TApplication("myapp",0,0);
TCanvas canvas_gauss("canvas_gauss" ,"hydra::Gaussian", 500, 500);
hist_gauss.Draw("hist");
TCanvas canvas_lognormal("canvas_lognormal" ,"hydra::LogNormal", 500, 500);
hist_lognormal.Draw("hist");
TCanvas canvas_bigauss("canvas_bigauss" ,"hydra::BifurcatedGaussian", 500, 500);
hist_bigauss.Draw("hist");
TCanvas canvas_exp("canvas_exp" ,"hydra::Exponential", 500, 500);
hist_exp.Draw("hist");
TCanvas canvas_bw("canvas_bw" ,"hydra::BreitWignerNR", 500, 500);
hist_bw.Draw("hist");
TCanvas canvas_chi("canvas_chi" ,"hydra::ChiSquare", 500, 500);
hist_chi.Draw("hist");
TCanvas canvas_johnson_su("canvas_chi" ,"hydra::JohnsonSU", 500, 500);
hist_johnson_su.Draw("hist");
TCanvas canvas_uniform("canvas_uniform" ,"hydra::UniformShape", 500, 500);
hist_uniform.Draw("hist");
TCanvas canvas_triangle("canvas_triangle" ,"hydra::TriangularShape", 500, 500);
hist_triangle.Draw("hist");
TCanvas canvas_trapezoid("canvas_trapezoid" ,"hydra::TrapezoidalShape", 500, 500);
hist_trapezoid.Draw("hist");
myapp->Run();
#endif //_ROOT_AVAILABLE_
return 0;
}
#endif