diff --git a/benchmarks/eko/benchmark_evol_to_unity.py b/benchmarks/eko/benchmark_evol_to_unity.py index af9540734..dcd8728a5 100644 --- a/benchmarks/eko/benchmark_evol_to_unity.py +++ b/benchmarks/eko/benchmark_evol_to_unity.py @@ -21,11 +21,11 @@ def update_cards(theory: TheoryCard, operator: OperatorCard): max_num_flavs=6, num_flavs_ref=None, ) - theory.num_flavs_init = 4 - theory.intrinsic_flavors = [4, 5] - theory.quark_masses.c.value = 1.0 - theory.quark_masses.b.value = 4.75 - theory.quark_masses.t.value = 173.0 + theory.heavy.num_flavs_init = 4 + theory.heavy.intrinsic_flavors = [4, 5] + theory.heavy.masses.c.value = 1.0 + theory.heavy.masses.b.value = 4.75 + theory.heavy.masses.t.value = 173.0 operator.mu0 = float(np.sqrt(2)) operator.mugrid = [(10, 5)] operator.xgrid = XGrid(np.linspace(1e-1, 1, 30)) diff --git a/benchmarks/eko/benchmark_msbar_evolution.py b/benchmarks/eko/benchmark_msbar_evolution.py index b8998c4b3..e59856441 100644 --- a/benchmarks/eko/benchmark_msbar_evolution.py +++ b/benchmarks/eko/benchmark_msbar_evolution.py @@ -22,10 +22,10 @@ def update_theory(theory: TheoryCard): theory.couplings.alphas.scale = 91 theory.couplings.alphaem.value = 0.007496 theory.couplings.num_flavs_ref = 5 - theory.quark_masses_scheme = QuarkMassScheme.MSBAR - theory.quark_masses.c = QuarkMassRef([1.5, 18]) - theory.quark_masses.b = QuarkMassRef([4.1, 20]) - theory.quark_masses.t = QuarkMassRef([175.0, 175.0]) + theory.heavy.masses_scheme = QuarkMassScheme.MSBAR + theory.heavy.masses.c = QuarkMassRef([1.5, 18]) + theory.heavy.masses.b = QuarkMassRef([4.1, 20]) + theory.heavy.masses.t = QuarkMassRef([175.0, 175.0]) @pytest.mark.isolated @@ -35,10 +35,10 @@ def benchmark_APFEL_msbar_evolution( ): update_theory(theory_card) bench_values = dict(zip(np.power([1, 96, 150], 2), [3, 5, 5])) - theory_card.quark_masses.c = QuarkMassRef([1.4, 2.0]) - theory_card.quark_masses.b = QuarkMassRef([4.5, 4.5]) + theory_card.heavy.masses.c = QuarkMassRef([1.4, 2.0]) + theory_card.heavy.masses.b = QuarkMassRef([4.5, 4.5]) coupl = theory_card.couplings - qmasses = theory_card.quark_masses + qmasses = theory_card.heavy.masses apfel_vals_dict = { "exact": { @@ -106,16 +106,20 @@ def benchmark_APFEL_msbar_evolution( couplings=theory_card.couplings, order=theory_card.order, masses=msbar_masses.compute( - theory_card.quark_masses, + theory_card.heavy.masses, couplings=theory_card.couplings, order=theory_card.order, evmeth=couplevmeth, - matching=np.power(list(iter(theory_card.matching)), 2.0), + matching=np.power( + list(iter(theory_card.heavy.matching_ratios)), 2.0 + ), xif2=theory_card.xif**2, ).tolist(), - thresholds_ratios=np.power(list(iter(theory_card.matching)), 2.0), + thresholds_ratios=np.power( + list(iter(theory_card.heavy.matching_ratios)), 2.0 + ), method=couplevmeth, - hqm_scheme=theory_card.quark_masses_scheme, + hqm_scheme=theory_card.heavy.masses_scheme, ) my_vals = [] for Q2, nf_to in bench_values.items(): @@ -188,15 +192,15 @@ def benchmark_APFEL_msbar_solution( theory = theory_card operator = operator_card coupl = theory_card.couplings - qmasses = theory_card.quark_masses + qmasses = theory_card.heavy.masses for order in [1, 2, 3]: theory.order = (order, 0) my_masses = msbar_masses.compute( - theory.quark_masses, + theory.heavy.masses, couplings=theory_card.couplings, order=theory_card.order, evmeth=types.CouplingEvolutionMethod.EXACT, - matching=np.power(list(iter(theory_card.matching)), 2.0), + matching=np.power(list(iter(theory_card.heavy.matching_ratios)), 2.0), xif2=theory_card.xif**2, ) # get APFEL numbers - if available else use cache @@ -231,26 +235,26 @@ def benchmark_msbar_solution_kthr(self, theory_card: TheoryCard): """ update_theory(theory_card) theory_card.order = (1, 0) - theory_card.matching.c = 1.2 - theory_card.matching.b = 1.8 - theory_card.matching.t = 1.0 + theory_card.heavy.matching_ratios.c = 1.2 + theory_card.heavy.matching_ratios.b = 1.8 + theory_card.heavy.matching_ratios.t = 1.0 my_masses_thr = msbar_masses.compute( - theory_card.quark_masses, + theory_card.heavy.masses, couplings=theory_card.couplings, order=theory_card.order, evmeth=types.CouplingEvolutionMethod.EXACT, - matching=np.power(list(iter(theory_card.matching)), 2.0), + matching=np.power(list(iter(theory_card.heavy.matching_ratios)), 2.0), xif2=theory_card.xif**2, ) apfel_masses_thr = [1.9891, 4.5102, 175.0000] - theory_card.matching.c = 1.0 - theory_card.matching.b = 1.0 + theory_card.heavy.matching_ratios.c = 1.0 + theory_card.heavy.matching_ratios.b = 1.0 my_masses_plain = msbar_masses.compute( - theory_card.quark_masses, + theory_card.heavy.masses, couplings=theory_card.couplings, order=theory_card.order, evmeth=types.CouplingEvolutionMethod.EXACT, - matching=np.power(list(iter(theory_card.matching)), 2.0), + matching=np.power(list(iter(theory_card.heavy.matching_ratios)), 2.0), xif2=theory_card.xif**2, ) diff --git a/benchmarks/eko/benchmark_strong_coupling.py b/benchmarks/eko/benchmark_strong_coupling.py index fb02d06ba..b23e3f382 100644 --- a/benchmarks/eko/benchmark_strong_coupling.py +++ b/benchmarks/eko/benchmark_strong_coupling.py @@ -839,14 +839,14 @@ def benchmark_APFEL_fact_to_ren_lha_settings(self, theory_card: TheoryCard): theory.couplings.alphas.scale = float(np.sqrt(2)) theory.couplings.alphaem.value = 0.007496 theory.couplings.num_flavs_ref = 4 - theory.num_flavs_init = 3 + theory.heavy.num_flavs_init = 3 theory.xif = np.sqrt(2.0) - theory.quark_masses.c.value = np.sqrt(2.0) - theory.quark_masses.b.value = 4.5 - theory.quark_masses.t.value = 175.0 - qmasses = theory.quark_masses + theory.heavy.masses.c.value = np.sqrt(2.0) + theory.heavy.masses.b.value = 4.5 + theory.heavy.masses.t.value = 175.0 + qmasses = theory.heavy.masses - masses = tuple(mq.value**2 for mq in theory.quark_masses) + masses = tuple(mq.value**2 for mq in theory.heavy.masses) mu2s = [2.0] sc = Couplings( @@ -855,7 +855,7 @@ def benchmark_APFEL_fact_to_ren_lha_settings(self, theory_card: TheoryCard): method=types.CouplingEvolutionMethod.EXACT, masses=[m2 / theory.xif**2 for m2 in masses], hqm_scheme=QuarkMassScheme.POLE, - thresholds_ratios=np.power(list(iter(theory.matching)), 2.0), + thresholds_ratios=np.power(list(iter(theory.heavy.matching_ratios)), 2.0), ) xif2 = theory.xif**2 for mu2 in mu2s: @@ -888,7 +888,9 @@ def benchmark_APFEL_fact_to_ren_lha_settings(self, theory_card: TheoryCard): apfel.SetVFNS() apfel.SetPoleMasses(qmasses.c.value, qmasses.b.value, qmasses.t.value) apfel.SetMassMatchingScales( - theory.matching.c, theory.matching.b, theory.matching.t + theory.heavy.matching_ratios.c, + theory.heavy.matching_ratios.b, + theory.heavy.matching_ratios.t, ) apfel.SetRenFacRatio(1.0 / theory.xif) apfel.InitializeAPFEL() diff --git a/benchmarks/ekobox/benchmark_evol_pdf.py b/benchmarks/ekobox/benchmark_evol_pdf.py index 1b7cf0a8e..9eb2981f8 100644 --- a/benchmarks/ekobox/benchmark_evol_pdf.py +++ b/benchmarks/ekobox/benchmark_evol_pdf.py @@ -24,10 +24,10 @@ def benchmark_evolve_single_member( theory.couplings.alphas.scale = 91.1876 theory.couplings.alphaem.value = 0.007496 theory.couplings.max_num_flavs = 3 - theory.num_flavs_max_pdf = 3 - theory.quark_masses.c.value = 1.3 - theory.quark_masses.b.value = 4.75 - theory.quark_masses.t.value = 172 + theory.heavy.num_flavs_max_pdf = 3 + theory.heavy.masses.c.value = 1.3 + theory.heavy.masses.b.value = 4.75 + theory.heavy.masses.t.value = 172 op = operator_card op.mu0 = 5.0 op.mugrid = mugrid diff --git a/tests/ekobox/test_info_file.py b/tests/ekobox/test_info_file.py index 58a295446..64dd8b9b8 100644 --- a/tests/ekobox/test_info_file.py +++ b/tests/ekobox/test_info_file.py @@ -19,7 +19,7 @@ def test_build(): assert info["SetDesc"] == "Prova" assert info["NewArg"] == 15.3 assert info["NumMembers"] == 4 - assert info["MTop"] == theory.quark_masses.t.value + assert info["MTop"] == theory.heavy.masses.t.value np.testing.assert_allclose(info["QMin"], math.sqrt(op.mu2grid[0]), rtol=1e-5) assert info["XMin"] == op.xgrid.raw[0] assert info["XMax"] == op.xgrid.raw[-1] == 1.0