diff --git a/src/eko/msbar_masses.py b/src/eko/msbar_masses.py index 253d4c0b9..0f044cdf4 100644 --- a/src/eko/msbar_masses.py +++ b/src/eko/msbar_masses.py @@ -268,7 +268,16 @@ def rge(m2, q2m_ref, strong_coupling, xif2, nf_ref): return float(msbar_mass) -def evolve(m2_ref, q2m_ref, strong_coupling, xif2, q2_to, nf_ref=None, nf_to=None): +def evolve( + m2_ref, + q2m_ref, + strong_coupling, + thresholds_ratios, + xif2, + q2_to, + nf_ref=None, + nf_to=None, +): r"""Perform the |MSbar| mass evolution up to given scale. It allows for different number of active flavors. @@ -298,7 +307,7 @@ def evolve(m2_ref, q2m_ref, strong_coupling, xif2, q2_to, nf_ref=None, nf_to=Non """ matching_scales = np.array(strong_coupling.atlas.walls)[1:-1] * np.array( - strong_coupling.thresholds.thresholds_ratios + thresholds_ratios ) atlas = Atlas(matching_scales.tolist(), (q2m_ref, nf_ref)) path = atlas.path((q2_to, nf_to)) @@ -317,7 +326,7 @@ def evolve(m2_ref, q2m_ref, strong_coupling, xif2, q2_to, nf_ref=None, nf_to=Non # apply matching condition if k < len(path) - 1: # TODO: do we need to add np.log(fac_to_ren) here ??? - L = np.log(atlas.walls[seg.nf - shift + 1]) + L = np.log(thresholds_ratios[seg.nf - shift]) m_coeffs = ( compute_matching_coeffs_down(seg.nf - 1) if is_downward @@ -327,9 +336,9 @@ def evolve(m2_ref, q2m_ref, strong_coupling, xif2, q2_to, nf_ref=None, nf_to=Non for pto in range(1, strong_coupling.order[0]): # 0**0=1, from NNLO there is a matching also in this case for logpow in range(pto + 1): - as_thr = strong_coupling.a( + as_thr = strong_coupling.a_s( seg.target / xif2, seg.target, seg.nf - shift + 4 - )[0] + ) matching += as_thr**pto * L**logpow * m_coeffs[pto, logpow] ker_evol *= matching ev_mass *= ker_evol @@ -449,6 +458,7 @@ def sc(thr_masses): m2_ref, q2m_ref, sc(masses), + matching, xif2, q2_to, nf_ref=nf_ref_cur, diff --git a/tests/eko/test_msbar_masses.py b/tests/eko/test_msbar_masses.py index c35f4359c..b0c102ef8 100644 --- a/tests/eko/test_msbar_masses.py +++ b/tests/eko/test_msbar_masses.py @@ -64,11 +64,14 @@ def test_compute_msbar_mass(self, theory_card: TheoryCard): m2_ref, Q2m_ref, strong_coupling=strong_coupling, + thresholds_ratios=th.heavy.matching_ratios, xif2=th.xif**2, q2_to=m2_computed[nf - 3], ) ) - np.testing.assert_allclose(m2_computed, m2_test, rtol=6e-4) + np.testing.assert_allclose( + m2_computed, m2_test, rtol=6e-4, err_msg=f"{method=},{order=}" + ) def test_compute_msbar_mass_VFNS(self, theory_card: TheoryCard): # test the solution now with some initial contition @@ -107,6 +110,7 @@ def test_compute_msbar_mass_VFNS(self, theory_card: TheoryCard): m2_ref, Q2m_ref, strong_coupling=strong_coupling, + thresholds_ratios=th.heavy.matching_ratios, xif2=th.xif**2, q2_to=m2_computed[nf - 3], )