11 theXaxis(histo->GetXaxis()),
12 nBins(theXaxis->GetNbins()),
13 xMin(theXaxis->GetXmin()),
14 xMax(theXaxis->GetXmax()),
15 binWidth((xMax-xMin)/(float)nBins)
45 const std::vector<double>& 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 generate() const
The random generation.
double nEntries
Number of entries.
std::vector< double > integral
Integral.
SimpleHistogramGenerator(TH1 *histo, const RandomEngine *engine)
int binarySearch(const int &n, const std::vector< double > &array, const double &value) const
const RandomEngine * random
double flatShoot(double xmin=0.0, double xmax=1.0) const