From 531e5f623e3c2fda618a3205829eac89a73b5684 Mon Sep 17 00:00:00 2001 From: Vanya Belyaev Date: Mon, 5 Aug 2024 07:35:43 +0200 Subject: [PATCH] tiny tweak --- ostap/histos/histos.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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