Commit 2f142fc
committed
[hist] Fix computation of number of entries in ResetStats
When computing the number of entries in TH1::ResetStats always include underflow/overflow. Also, in case of weighted histogram, fEntries is set to the effective entries inclusing underflow/overflow. Note that GetEffectiveEntries() will return the underflow or overflow depending on the flag used for computing the statistics.
Fix a bug in the computation of GetAllSumOfWeights() and improve the function to return (as an optional parameter) the total sum of weight square (including underflow/overflows).
The bug was happening for dimensions < 2. (see ROOT-21253)
Remove in UHI indexing test the check that number of effective entries is equal to number of entries. With the current changes the number of entries will contain underflows/overflows while number of effective entries not, because it follows the convention used for the statistics (mean,std, etc..) including what is in the current histogram range
In stressHistogram add test to check sumofallweights including underflow/overflow and compare with GetEntries for unweighted histograms (not for TProfile's which are different)1 parent ef81d2b commit 2f142fc
File tree
5 files changed
+87
-21
lines changed- bindings/pyroot/pythonizations/test
- hist/hist
- inc
- src
- test
5 files changed
+87
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
296 | 296 | | |
297 | 297 | | |
298 | 298 | | |
299 | | - | |
300 | 299 | | |
301 | 300 | | |
302 | 301 | | |
| |||
307 | 306 | | |
308 | 307 | | |
309 | 308 | | |
310 | | - | |
311 | 309 | | |
312 | 310 | | |
313 | 311 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
553 | 553 | | |
554 | 554 | | |
555 | 555 | | |
556 | | - | |
| 556 | + | |
557 | 557 | | |
558 | 558 | | |
559 | 559 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
973 | 973 | | |
974 | 974 | | |
975 | 975 | | |
976 | | - | |
| 976 | + | |
977 | 977 | | |
| 978 | + | |
| 979 | + | |
978 | 980 | | |
979 | | - | |
980 | | - | |
| 981 | + | |
| 982 | + | |
981 | 983 | | |
982 | 984 | | |
983 | 985 | | |
| |||
1054 | 1056 | | |
1055 | 1057 | | |
1056 | 1058 | | |
1057 | | - | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
1058 | 1068 | | |
1059 | 1069 | | |
1060 | 1070 | | |
| |||
1139 | 1149 | | |
1140 | 1150 | | |
1141 | 1151 | | |
1142 | | - | |
| 1152 | + | |
| 1153 | + | |
1143 | 1154 | | |
1144 | 1155 | | |
1145 | 1156 | | |
| |||
1246 | 1257 | | |
1247 | 1258 | | |
1248 | 1259 | | |
1249 | | - | |
| 1260 | + | |
1250 | 1261 | | |
1251 | | - | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
1252 | 1272 | | |
1253 | 1273 | | |
1254 | 1274 | | |
| |||
7981 | 8001 | | |
7982 | 8002 | | |
7983 | 8003 | | |
7984 | | - | |
7985 | | - | |
7986 | | - | |
| 8004 | + | |
| 8005 | + | |
| 8006 | + | |
| 8007 | + | |
| 8008 | + | |
| 8009 | + | |
| 8010 | + | |
| 8011 | + | |
| 8012 | + | |
| 8013 | + | |
7987 | 8014 | | |
7988 | 8015 | | |
7989 | 8016 | | |
7990 | | - | |
| 8017 | + | |
7991 | 8018 | | |
7992 | 8019 | | |
7993 | 8020 | | |
7994 | | - | |
| 8021 | + | |
7995 | 8022 | | |
7996 | 8023 | | |
7997 | 8024 | | |
7998 | 8025 | | |
7999 | 8026 | | |
8000 | | - | |
8001 | | - | |
| 8027 | + | |
| 8028 | + | |
8002 | 8029 | | |
| 8030 | + | |
8003 | 8031 | | |
8004 | 8032 | | |
8005 | 8033 | | |
8006 | 8034 | | |
8007 | | - | |
| 8035 | + | |
| 8036 | + | |
8008 | 8037 | | |
8009 | 8038 | | |
8010 | 8039 | | |
| 8040 | + | |
| 8041 | + | |
| 8042 | + | |
| 8043 | + | |
| 8044 | + | |
| 8045 | + | |
8011 | 8046 | | |
8012 | 8047 | | |
8013 | 8048 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| 111 | + | |
| 112 | + | |
111 | 113 | | |
112 | 114 | | |
113 | 115 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | | - | |
| 130 | + | |
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
145 | | - | |
| 145 | + | |
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
| |||
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
184 | | - | |
185 | 184 | | |
186 | 185 | | |
187 | 186 | | |
| |||
11106 | 11105 | | |
11107 | 11106 | | |
11108 | 11107 | | |
| 11108 | + | |
| 11109 | + | |
| 11110 | + | |
| 11111 | + | |
| 11112 | + | |
11109 | 11113 | | |
11110 | 11114 | | |
11111 | 11115 | | |
| |||
11126 | 11130 | | |
11127 | 11131 | | |
11128 | 11132 | | |
| 11133 | + | |
| 11134 | + | |
11129 | 11135 | | |
11130 | 11136 | | |
11131 | 11137 | | |
| |||
11911 | 11917 | | |
11912 | 11918 | | |
11913 | 11919 | | |
| 11920 | + | |
| 11921 | + | |
| 11922 | + | |
| 11923 | + | |
| 11924 | + | |
| 11925 | + | |
| 11926 | + | |
| 11927 | + | |
| 11928 | + | |
| 11929 | + | |
| 11930 | + | |
| 11931 | + | |
| 11932 | + | |
| 11933 | + | |
| 11934 | + | |
11914 | 11935 | | |
11915 | 11936 | | |
11916 | 11937 | | |
| |||
11920 | 11941 | | |
11921 | 11942 | | |
11922 | 11943 | | |
| 11944 | + | |
| 11945 | + | |
| 11946 | + | |
| 11947 | + | |
| 11948 | + | |
| 11949 | + | |
| 11950 | + | |
| 11951 | + | |
| 11952 | + | |
| 11953 | + | |
11923 | 11954 | | |
11924 | 11955 | | |
11925 | 11956 | | |
| |||
0 commit comments