Skip to content

Commit 49e443c

Browse files
committed
Fix - errors calculations for TProfile
1 parent 35ffef2 commit 49e443c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts/JSRootCore.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1758,12 +1758,12 @@
17581758
m.getBinEffectiveEntries = function(bin) {
17591759
if (bin < 0 || bin >= this.fNcells) return 0;
17601760
var sumOfWeights = this.fBinEntries[bin];
1761-
if ( this.fBinSumw2 == null || this.fBinSumw2.length != this.fNcells) {
1761+
if ( !this.fBinSumw2 || this.fBinSumw2.length != this.fNcells) {
17621762
// this can happen when reading an old file
17631763
return sumOfWeights;
17641764
}
1765-
var sumOfWeightsSquare = this.fSumw2[bin];
1766-
return ( sumOfWeightsSquare > 0 ? sumOfWeights * sumOfWeights / sumOfWeightsSquare : 0 );
1765+
var sumOfWeightsSquare = this.fBinSumw2[bin];
1766+
return (sumOfWeightsSquare > 0) ? sumOfWeights * sumOfWeights / sumOfWeightsSquare : 0;
17671767
};
17681768
m.getBinError = function(bin) {
17691769
if (bin < 0 || bin >= this.fNcells) return 0;

0 commit comments

Comments
 (0)