13 : fNBins(theProbSize), fInterpolationType(
intType) {
22 edm::LogError(
"RandArrayFunction") <<
"RandArrayFunction constructed with no bins - will use flat distribution";
30 for (ptn = 0; ptn <
fNBins; ++ptn) {
31 double weight = aProbFunc[ptn];
35 edm::LogWarning(
"RandArrayFunction") <<
"RandArrayFunction constructed with negative-weight bin " << ptn
36 <<
" == " <<
weight <<
" -- will substitute 0 weight";
44 <<
"RandArrayFunction constructed with nothing in bins - will use flat distribution";
49 for (ptn = 0; ptn <
fNBins + 1; ++ptn)
56 edm::LogInfo(
"RandArrayFunction") <<
"RandArrayFunction does not recognize fInterpolationType "
79 while (nAbove > nBelow + 1) {
80 middle = (nAbove + nBelow + 1) >> 1;
81 rand >=
fIntegralPdf[middle] ? nBelow = middle : nAbove = middle;
104 double binFraction = (rand -
fIntegralPdf[nBelow]) / binMeasure;