ATLAS Offline Software
|
generate a distribution according to an input histogram (after smoothing) More...
#include <generate.h>
Public Member Functions | |
hist_generator (TH1D *h, bool _smooth=true) | |
hist_generator (const hist_generator &)=delete | |
hist_generator | operator= (const hist_generator &)=delete |
virtual | ~hist_generator () |
double | generate () const |
actually generate a random number from the distribution More... | |
TH1D * | histogram () |
TH1D * | rawhistogram () |
TH1D * | smoothhistogram () |
Private Member Functions | |
int | getbin (double y) const |
double | invert (double y) const |
Private Attributes | |
std::vector< double > | m_y |
std::vector< double > | m_x |
std::vector< double > | m_dx |
std::vector< double > | m_dy |
std::vector< double > | m_dxdy |
TH1D * | m_s |
TH1D * | m_raw |
TH1D * | m_smooth |
BasicRandom * | m_random |
generate a distribution according to an input histogram (after smoothing)
Definition at line 72 of file generate.h.
generate::hist_generator::hist_generator | ( | TH1D * | h, |
bool | _smooth = true |
||
) |
save the original histogram (should save a copy ho hum)
smooth the original
else simply clone the original
generate a pdf from the smoothed distribution
assign the actual generator use a shared generator
use a dedicated generator mrandom = new BasicRandom(false);
Definition at line 231 of file generate.cxx.
|
delete |
|
inlinevirtual |
Definition at line 81 of file generate.h.
|
inlinevirtual |
actually generate a random number from the distribution
Implements generate::generator_base.
Definition at line 84 of file generate.h.
|
inlineprivate |
|
inline |
Definition at line 88 of file generate.h.
|
inlineprivate |
|
delete |
|
inline |
Definition at line 89 of file generate.h.
|
inline |
Definition at line 90 of file generate.h.
|
private |
Definition at line 112 of file generate.h.
|
private |
Definition at line 115 of file generate.h.
|
private |
Definition at line 113 of file generate.h.
|
private |
Definition at line 121 of file generate.h.
|
private |
Definition at line 118 of file generate.h.
|
private |
Definition at line 117 of file generate.h.
|
private |
Definition at line 119 of file generate.h.
|
private |
Definition at line 109 of file generate.h.
|
private |
Definition at line 108 of file generate.h.