@@ -1227,7 +1227,7 @@ class TDrawSelector extends TSelector {
12271227 let bin = this . x . GetBin ( xvalue ) ;
12281228 this . hist . fArray [ bin ] += weight ;
12291229
1230- if ( ! this . x . lbls ) {
1230+ if ( ! this . x . lbls && Number . isFinite ( xvalue ) ) {
12311231 this . hist . fTsumw += weight ;
12321232 this . hist . fTsumwx += weight * xvalue ;
12331233 this . hist . fTsumwx2 += weight * xvalue * xvalue ;
@@ -1240,7 +1240,7 @@ class TDrawSelector extends TSelector {
12401240 ybin = this . y . GetBin ( yvalue ) ;
12411241
12421242 this . hist . fArray [ xbin + ( this . x . nbins + 2 ) * ybin ] += weight ;
1243- if ( ! this . x . lbls && ! this . y . lbls ) {
1243+ if ( ! this . x . lbls && ! this . y . lbls && Number . isFinite ( xvalue ) && Number . isFinite ( yvalue ) ) {
12441244 this . hist . fTsumw += weight ;
12451245 this . hist . fTsumwx += weight * xvalue ;
12461246 this . hist . fTsumwy += weight * yvalue ;
@@ -1253,11 +1253,11 @@ class TDrawSelector extends TSelector {
12531253 /** @summary Fill 3D histogram */
12541254 fill3DHistogram ( xvalue , yvalue , zvalue , weight ) {
12551255 let xbin = this . x . GetBin ( xvalue ) ,
1256- ybin = this . y . GetBin ( yvalue ) ,
1257- zbin = this . z . GetBin ( zvalue ) ;
1256+ ybin = this . y . GetBin ( yvalue ) ,
1257+ zbin = this . z . GetBin ( zvalue ) ;
12581258
12591259 this . hist . fArray [ xbin + ( this . x . nbins + 2 ) * ( ybin + ( this . y . nbins + 2 ) * zbin ) ] += weight ;
1260- if ( ! this . x . lbls && ! this . y . lbls && ! this . z . lbls ) {
1260+ if ( ! this . x . lbls && ! this . y . lbls && ! this . z . lbls && Number . isFinite ( xvalue ) && Number . isFinite ( yvalue ) && Number . isFinite ( zvalue ) ) {
12611261 this . hist . fTsumw += weight ;
12621262 this . hist . fTsumwx += weight * xvalue ;
12631263 this . hist . fTsumwy += weight * yvalue ;
0 commit comments