#include <SimpleHistogramGenerator.h>
Public Member Functions | |
int | binarySearch (const int &n, const std::vector< float > &array, const double &value) const |
double | generate (RandomEngineAndDistribution const *) const |
The random generation. More... | |
SimpleHistogramGenerator (TH1 *histo) | |
virtual | ~SimpleHistogramGenerator () |
Default destructor. More... | |
Private Attributes | |
double | binWidth |
std::vector< float > | integral |
Integral. More... | |
int | nBins |
Pointer to the histogram. More... | |
double | nEntries |
Number of entries. More... | |
double | xMax |
double | xMin |
Definition at line 21 of file SimpleHistogramGenerator.h.
SimpleHistogramGenerator::SimpleHistogramGenerator | ( | TH1 * | histo | ) |
Constructor that perform the necessary integration and inversion steps xmin and xmax are the generation bounds, n is the internal table size and iter is the number of iterations for the numerical part.
Definition at line 8 of file SimpleHistogramGenerator.cc.
References timingPdfMaker::histo, mps_fire::i, integral, nBins, and nEntries.
|
inlinevirtual |
int SimpleHistogramGenerator::binarySearch | ( | const int & | n, |
const std::vector< float > & | array, | ||
const double & | value | ||
) | const |
Definition at line 37 of file SimpleHistogramGenerator.cc.
References mps_check::array, and dqmiodumpmetadata::n.
Referenced by generate().
double SimpleHistogramGenerator::generate | ( | RandomEngineAndDistribution const * | random | ) | const |
The random generation.
Definition at line 25 of file SimpleHistogramGenerator.cc.
References binarySearch(), binWidth, RandomEngineAndDistribution::flatShoot(), integral, nBins, diffTwoXMLs::r1, x, and xMin.
Referenced by PixelTemplateSmearerBase::smearHit(), and PixelTemplateSmearerBase::smearMergeGroup().
|
private |
Definition at line 50 of file SimpleHistogramGenerator.h.
Referenced by generate().
|
private |
Integral.
Definition at line 53 of file SimpleHistogramGenerator.h.
Referenced by generate(), and SimpleHistogramGenerator().
|
private |
Pointer to the histogram.
the axis Number of bins
Definition at line 44 of file SimpleHistogramGenerator.h.
Referenced by generate(), and SimpleHistogramGenerator().
|
private |
Number of entries.
Definition at line 56 of file SimpleHistogramGenerator.h.
Referenced by SimpleHistogramGenerator().
|
private |
Definition at line 47 of file SimpleHistogramGenerator.h.
|
private |
Definition at line 47 of file SimpleHistogramGenerator.h.
Referenced by generate().