Skip to content

Commit 041e04d

Browse files
committed
allow non-strict monotony of efficiency vector
1 parent b6e8f90 commit 041e04d

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎PWGHF/D2H/Macros/compute_fraction_cutvar.py‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,9 +251,11 @@ def main(config):
251251
all_vectors_monotonous = MinimisationStatus.MonotonyViolation
252252
print("\0\33[33mWARNING! main(): the raw yield uncertainties vector is not monotonous. Check the input for stability.\0\33[0m")
253253
print(f"raw yield uncertainties vector elements = {unc_rawy}\n")
254-
if not (np.all(effp[1:] > effp[:-1]) or np.all(effp[1:] < effp[:-1])):
254+
if not (np.all(effp[1:] >= effp[:-1]) or np.all(effp[1:] <= effp[:-1])):
255+
print(f"prompt efficiency vector elements = {effp}\n")
255256
sys.exit("\33[31mFatal error: the prompt efficiency vector is not monotonous. Check the input. Exit.\33[0m")
256-
if not (np.all(effnp[1:] > effnp[:-1]) or np.all(effnp[1:] < effnp[:-1])):
257+
if not (np.all(effnp[1:] >= effnp[:-1]) or np.all(effnp[1:] <= effnp[:-1])):
258+
print(f"nonprompt efficiency vector elements = {effnp}\n")
257259
sys.exit("\33[31mFatal error: the nonprompt efficiency vector is not monotonous. Check the input. Exit.\33[0m")
258260

259261
minimiser = CutVarMinimiser(rawy, effp, effnp, unc_rawy, unc_effp, unc_effnp)

0 commit comments

Comments
 (0)