11 nBins(histo->GetXaxis()->GetNbins()),
12 xMin(histo->GetXaxis()->GetXmin()),
13 xMax(histo->GetXaxis()->GetXmax()),
14 binWidth((xMax-xMin)/(float)nBins)
45 const std::vector<float>& array,
46 const double&
value)
const
54 int nabove, nbelow, middle;
57 while(nabove-nbelow > 1) {
58 middle = (nabove+nbelow)/2;
59 if (value == array[middle-1])
return middle-1;
60 if (value < array[middle-1]) nabove = middle;
double nEntries
Number of entries.
double flatShoot(double xmin=0.0, double xmax=1.0) const
std::vector< float > integral
Integral.
SimpleHistogramGenerator(TH1 *histo)
double generate(RandomEngineAndDistribution const *) const
The random generation.
int nBins
Pointer to the histogram.
int binarySearch(const int &n, const std::vector< float > &array, const double &value) const