89 float bMin,
float bMax,
90 std::unique_ptr<const BinningData> sBinData =
nullptr,
91 bool sBinAdditive =
false)
97 step((bMax - bMin) / bBins),
110 for (
size_t ib = 0; ib <
m_bins + 1; ++ib) {
124 const std::vector<float>& bBoundaries,
125 std::unique_ptr<const BinningData> sBinData =
nullptr)
135 m_bins(bBoundaries.size() - 1),
188 if (
this != &bdata) {
229 return (sbin != bin);
239 return (sbin != bin);
279 return (
perp(position));
282 return (
perp(position) *
phi(position));
285 return (
eta(position));
291 return phi(position);
300 const std::vector<float>& bvals =
boundaries();
302 float value = bin < bvals.size() ? 0.5 * (bvals[bin] + bvals[bin + 1]) : 0.;
318 float val =
value(position);
319 return (val >
min - 0.001 && val <
max + 0.001);
334 float val =
value(lposition);
335 return (val >
min - 0.001 && val <
max + 0.001);
384 size_t masterbin = (*m_functionPtr)(
value, *
this);
410 float val =
value(position);
411 Vector3D probe = position + dir.normalized();
412 float nextval =
value(probe);
413 return (nextval > val) ? 1 : -1;
429 return 0.5 * (bmin + bmax);
444 if (dsucc && isucc) {
445 return {low, bin, high};
448 if (dsucc || isucc) {
475 const std::vector<float>& subBinBoundaries =
477 float sBinMin = subBinBoundaries[0];
479 std::vector<float>::const_iterator mbvalue =
m_boundaries.begin();
482 if (
std::abs((*mbvalue) - sBinMin) < 10
e-10) {
485 subBinBoundaries.begin(),
486 subBinBoundaries.end());
497 const std::vector<float>& subBinBoundaries =
501 for (
size_t ib = 0; ib <
m_bins; ++ib) {
503 for (
size_t isb = 1; isb < subBinBoundaries.size(); ++isb) {
519 int bin = ((value - bData.
min) / bData.
step);
522 if (value < bData.
min) {
523 return (bData.
m_bins - 1);
525 if (value > bData.
max) {
531 return size_t((bin <=
int(bData.
m_bins - 1))
545 if (value >= bData.
max) {
551 for (; vIter != bData.
m_boundaries.end(); ++vIter, ++bin) {
552 if ((*vIter) >
value) {
567 size_t nabove, nbelow, middle;
570 if (value >= bData.
max) {
575 while (nabove - nbelow > 1) {
576 middle = (nabove + nbelow) / 2;