88 float bMin,
float bMax,
89 std::unique_ptr<const BinningData> sBinData =
nullptr,
90 bool sBinAdditive =
false)
96 step((bMax - bMin) / bBins),
122 const std::vector<float>& bBoundaries,
123 std::unique_ptr<const BinningData> sBinData =
nullptr)
179 if (
this != &bdata) {
264 return (
perp(position));
267 return (
perp(position) *
phi(position));
270 return (
eta(position));
276 return phi(position);
285 const std::vector<float>& bvals =
boundaries();
288 bin < (bvals.size() - 1) ? 0.5 * (bvals[bin] + bvals[bin + 1]) : 0.;
298 const std::vector<float>& bvals =
boundaries();
300 float value = bin < (bvals.size() - 1) ? bvals[bin + 1] - bvals[bin] : 0.;
316 float val =
value(position);
317 return (val >
min - 0.001 && val <
max + 0.001);
332 float val =
value(lposition);
333 return (val >
min - 0.001 && val <
max + 0.001);
382 size_t masterbin = (*m_functionPtr)(
value, *
this);
408 float val =
value(position);
409 Vector3 probe = position + dir.normalized();
410 float nextval =
value(probe);
411 return (nextval > val) ? 1 : -1;
427 return 0.5 * (bmin + bmax);
450 const std::vector<float>& subBinBoundaries =
452 float sBinMin = subBinBoundaries[0];
454 std::vector<float>::const_iterator mbvalue =
m_boundaries.begin();
457 if (std::abs((*mbvalue) - sBinMin) < 10
e-10) {
460 subBinBoundaries.begin(),
461 subBinBoundaries.end());
472 const std::vector<float>& subBinBoundaries =
478 for (
size_t isb = 1; isb < subBinBoundaries.size(); ++isb) {
494 int bin =
static_cast<int>((value - bData.
min) / bData.
step);
497 if (value < bData.
min) {
498 return (bData.
m_bins - 1);
500 if (value > bData.
max) {
506 return size_t((bin <=
int(bData.
m_bins - 1))
519 if (value >= bData.
max) {
534 std::stringstream sl;
535 sl << indent <<
"BinngingData object:" <<
'\n';
536 sl << indent <<
" - type : " << size_t(
type) <<
'\n';
537 sl << indent <<
" - option : " << size_t(
option) <<
'\n';
538 sl << indent <<
" - value : " << size_t(
binvalue) <<
'\n';
539 sl << indent <<
" - bins : " <<
bins() <<
'\n';
540 sl << indent <<
" - min/max : " <<
min <<
" / " <<
max <<
'\n';
542 sl << indent <<
" - step : " <<
step <<
'\n';
544 sl << indent <<
" - boundaries : | ";