@@ -97566,8 +97566,8 @@ class TDrawSelector extends TSelector {
9756697566 res.k = res.nbins / (res.max - res.min);
9756797567
9756897568 res.GetBin = function(value) {
97569- const bin = this.lbls?.indexOf(value) ?? Math.floor((value - this.min) * this.k);
97570- return ( bin < 0) ? 0 : ((bin > this.nbins) ? this.nbins + 1 : bin + 1);
97569+ const bin = this.lbls?.indexOf(value) ?? Number.isFinite(value) ? Math.floor((value - this.min) * this.k) : this.nbins + 1 ;
97570+ return bin < 0 ? 0 : ((bin > this.nbins) ? this.nbins + 1 : bin + 1);
9757197571 };
9757297572
9757397573 return res;
@@ -97732,7 +97732,7 @@ class TDrawSelector extends TSelector {
9773297732 let bin = this.x.GetBin(xvalue);
9773397733 this.hist.fArray[bin] += weight;
9773497734
97735- if (!this.x.lbls) {
97735+ if (!this.x.lbls && Number.isFinite(xvalue) ) {
9773697736 this.hist.fTsumw += weight;
9773797737 this.hist.fTsumwx += weight * xvalue;
9773897738 this.hist.fTsumwx2 += weight * xvalue * xvalue;
@@ -97742,10 +97742,10 @@ class TDrawSelector extends TSelector {
9774297742 /** @summary Fill 2D histogram */
9774397743 fill2DHistogram(xvalue, yvalue, weight) {
9774497744 let xbin = this.x.GetBin(xvalue),
97745- ybin = this.y.GetBin(yvalue);
97745+ ybin = this.y.GetBin(yvalue);
9774697746
9774797747 this.hist.fArray[xbin + (this.x.nbins + 2) * ybin] += weight;
97748- if (!this.x.lbls && !this.y.lbls) {
97748+ if (!this.x.lbls && !this.y.lbls && Number.isFinite(xvalue) && Number.isFinite(yvalue) ) {
9774997749 this.hist.fTsumw += weight;
9775097750 this.hist.fTsumwx += weight * xvalue;
9775197751 this.hist.fTsumwy += weight * yvalue;
@@ -97758,11 +97758,11 @@ class TDrawSelector extends TSelector {
9775897758 /** @summary Fill 3D histogram */
9775997759 fill3DHistogram(xvalue, yvalue, zvalue, weight) {
9776097760 let xbin = this.x.GetBin(xvalue),
97761- ybin = this.y.GetBin(yvalue),
97762- zbin = this.z.GetBin(zvalue);
97761+ ybin = this.y.GetBin(yvalue),
97762+ zbin = this.z.GetBin(zvalue);
9776397763
9776497764 this.hist.fArray[xbin + (this.x.nbins + 2) * (ybin + (this.y.nbins + 2) * zbin)] += weight;
97765- if (!this.x.lbls && !this.y.lbls && !this.z.lbls) {
97765+ if (!this.x.lbls && !this.y.lbls && !this.z.lbls && Number.isFinite(xvalue) && Number.isFinite(yvalue) && Number.isFinite(zvalue) ) {
9776697766 this.hist.fTsumw += weight;
9776797767 this.hist.fTsumwx += weight * xvalue;
9776897768 this.hist.fTsumwy += weight * yvalue;
0 commit comments