diff --git a/ostap/histos/histos.py b/ostap/histos/histos.py index becfebc8..ab9dce6b 100755 --- a/ostap/histos/histos.py +++ b/ostap/histos/histos.py @@ -4288,14 +4288,16 @@ def _my_eff_ ( a , r , c ) : return 1.0 / ( 1.0 + d ) - N = len ( h1 ) + N = len ( h1 ) sumi = VE ( 0 , 0 ) for i in h1 : c = h1 [ i ] rest = VE ( 0 , 0 ) - for j in range ( i + 1 , N + 1 ) : rest += h1 [ j ] + for j in reversed ( h1 ) : + if i < j : rest += h1 [ j ] + else : break a = sumi r = rest