Skip to content

Commit

Permalink
Updated isolated benchmarks with heavy quarks theory section
Browse files Browse the repository at this point in the history
  • Loading branch information
alecandido committed Mar 26, 2023
1 parent e4dd7cd commit 1166680
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 41 deletions.
10 changes: 5 additions & 5 deletions benchmarks/eko/benchmark_evol_to_unity.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
50 changes: 27 additions & 23 deletions benchmarks/eko/benchmark_msbar_evolution.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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": {
Expand Down Expand Up @@ -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():
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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,
)

Expand Down
18 changes: 10 additions & 8 deletions benchmarks/eko/benchmark_strong_coupling.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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:
Expand Down Expand Up @@ -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()
Expand Down
8 changes: 4 additions & 4 deletions benchmarks/ekobox/benchmark_evol_pdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/ekobox/test_info_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 1166680

Please sign in to comment.