88 float bMin,
float bMax,
89 std::unique_ptr<const BinningData> sBinData =
nullptr,
90 bool sBinAdditive =
false)
96 step((bMax - bMin) / bBins),
109 for (
size_t ib = 0; ib <
m_bins + 1; ++ib) {
123 const std::vector<float>& bBoundaries,
124 std::unique_ptr<const BinningData> sBinData =
nullptr)
134 m_bins(bBoundaries.size() - 1),
187 if (
this != &bdata) {
228 return (sbin != bin);
238 return (sbin != bin);
278 return (
perp(position));
281 return (
perp(position) *
phi(position));
284 return (
eta(position));
290 return phi(position);
299 const std::vector<float>& bvals =
boundaries();
301 float value = bin < bvals.size() ? 0.5 * (bvals[
bin] + bvals[bin + 1]) : 0.;
317 float val =
value(position);
318 return (val >
min - 0.001 && val <
max + 0.001);
333 float val =
value(lposition);
334 return (val >
min - 0.001 && val <
max + 0.001);
383 size_t masterbin = (*m_functionPtr)(
value, *
this);
409 float val =
value(position);
410 Vector3D probe = position + dir.normalized();
411 float nextval =
value(probe);
412 return (nextval > val) ? 1 : -1;
428 return 0.5 * (bmin + bmax);
443 if (dsucc && isucc) {
444 return {low,
bin, high};
447 if (dsucc || isucc) {
474 const std::vector<float>& subBinBoundaries =
476 float sBinMin = subBinBoundaries[0];
478 std::vector<float>::const_iterator mbvalue =
m_boundaries.begin();
481 if (
std::abs((*mbvalue) - sBinMin) < 10
e-10) {
484 subBinBoundaries.begin(),
485 subBinBoundaries.end());
496 const std::vector<float>& subBinBoundaries =
500 for (
size_t ib = 0; ib <
m_bins; ++ib) {
502 for (
size_t isb = 1; isb < subBinBoundaries.size(); ++isb) {
521 if (value < bData.
min) {
522 return (bData.
m_bins - 1);
524 if (value > bData.
max) {
530 return size_t((bin <=
int(bData.
m_bins - 1))
544 if (value >= bData.
max) {
551 if ((*vIter) >
value) {
566 size_t nabove, nbelow, middle;
569 if (value >= bData.
max) {
574 while (nabove - nbelow > 1) {
575 middle = (nabove + nbelow) / 2;