Skip to content

Commit

Permalink
Merge pull request #242 from NNPDF/raw-jets
Browse files Browse the repository at this point in the history
  • Loading branch information
alecandido authored May 19, 2023
2 parents a2cbd57 + d32d95b commit 67fa988
Show file tree
Hide file tree
Showing 87 changed files with 3,476 additions and 2,633 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 @@ -8,6 +8,7 @@
from eko.interpolation import XGrid
from eko.io import types
from eko.io.runcards import OperatorCard, TheoryCard
from eko.matchings import Segment
from eko.quantities.couplings import CouplingsInfo
from eko.runner.legacy import Runner

Expand Down Expand Up @@ -53,11 +54,10 @@ def test_operator_grid(
path=tmp_path / "eko.tar",
).op_grid

q20 = 30
q21 = 50
nf = 4
o = Operator(g.config, g.managers, nf, q20, q21)
o_back = Operator(g.config, g.managers, nf, q21, q20)
seg = Segment(30, 50, 4)
seg_back = Segment(50, 30, 4)
o = Operator(g.config, g.managers, seg)
o_back = Operator(g.config, g.managers, seg_back)
o.compute()
o_back.compute()

Expand Down
7 changes: 5 additions & 2 deletions benchmarks/eko/benchmark_msbar_evolution.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ def benchmark_APFEL_msbar_evolution(
order=theory_card.order,
evmeth=couplevmeth,
matching=np.power(
list(iter(theory_card.heavy.matching_ratios)), 2.0
),
theory_card.heavy.matching_ratios, 2.0
).tolist(),
xif2=theory_card.xif**2,
).tolist(),
thresholds_ratios=np.power(
Expand All @@ -131,6 +131,9 @@ def benchmark_APFEL_msbar_evolution(
qmasses[n].value ** 2,
qmasses[n].scale ** 2,
strong_coupling=as_VFNS,
thresholds_ratios=np.power(
theory_card.heavy.matching_ratios, 2.0
).tolist(),
xif2=1.0,
q2_to=Q2,
nf_ref=n + 3,
Expand Down
30 changes: 14 additions & 16 deletions benchmarks/eko/benchmark_strong_coupling.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import numpy as np
import pytest

from eko import thresholds
from eko import matchings
from eko.beta import beta_qcd
from eko.couplings import Couplings
from eko.io.runcards import TheoryCard
Expand Down Expand Up @@ -138,13 +138,13 @@ def benchmark_APFEL_ffns(self):
),
}
# collect my values
threshold_holder = thresholds.ThresholdsAtlas.ffns(nf)
threshold_holder = matchings.Atlas.ffns(nf, 0.0)
for order in [1, 2, 3]:
as_FFNS = Couplings(
couplings=ref_couplings(coupling_ref, scale_ref),
order=(order, 0),
method=CouplingEvolutionMethod.EXPANDED,
masses=threshold_holder.area_walls[1:-1],
masses=threshold_holder.walls[1:-1],
hqm_scheme=QuarkMassScheme.POLE,
thresholds_ratios=[1.0, 1.0, 1.0],
)
Expand Down Expand Up @@ -211,15 +211,15 @@ def benchmark_pegasus_ffns(self):
),
}
# collect my values
threshold_holder = thresholds.ThresholdsAtlas.ffns(nf)
threshold_holder = matchings.Atlas.ffns(nf, 0.0)
couplings = ref_couplings(coupling_ref, scale_ref)
couplings.max_num_flavs = 4
for order in [1, 2, 3, 4]:
as_FFNS = Couplings(
couplings=couplings,
order=(order, 0),
method=CouplingEvolutionMethod.EXACT,
masses=threshold_holder.area_walls[1:-1],
masses=threshold_holder.walls[1:-1],
hqm_scheme=QuarkMassScheme.POLE,
thresholds_ratios=[1.0, 1.0, 1.0],
)
Expand Down Expand Up @@ -584,12 +584,12 @@ def benchmark_lhapdf_ffns_lo(self):
scale_ref = 91.0
nf = 4
# collect my values
threshold_holder = thresholds.ThresholdsAtlas.ffns(nf)
threshold_holder = matchings.Atlas.ffns(nf, 0.0)
as_FFNS_LO = Couplings(
couplings=ref_couplings(coupling_ref, scale_ref),
order=(1, 0),
method=CouplingEvolutionMethod.EXACT,
masses=threshold_holder.area_walls[1:-1],
masses=threshold_holder.walls[1:-1],
hqm_scheme=QuarkMassScheme.POLE,
thresholds_ratios=[1.0, 1.0, 1.0],
)
Expand Down Expand Up @@ -630,7 +630,7 @@ def benchmark_apfel_exact(self):
coupling_ref = np.array([0.118, 0.007496])
scale_ref = 90
# collect my values
threshold_holder = thresholds.ThresholdsAtlas.ffns(3)
threshold_holder = matchings.Atlas.ffns(3, 0.0)
# LHAPDF cache
apfel_vals_dict = {
1: np.array(
Expand Down Expand Up @@ -663,7 +663,7 @@ def benchmark_apfel_exact(self):
couplings=ref_couplings(coupling_ref, scale_ref),
order=(order, 0),
method=CouplingEvolutionMethod.EXACT,
masses=threshold_holder.area_walls[1:-1],
masses=threshold_holder.walls[1:-1],
hqm_scheme=QuarkMassScheme.POLE,
thresholds_ratios=[1.0, 1.0, 1.0],
)
Expand Down Expand Up @@ -697,7 +697,7 @@ def benchmark_lhapdf_exact(self):
coupling_ref = np.array([0.118, 0.007496])
scale_ref = 90
# collect my values
threshold_holder = thresholds.ThresholdsAtlas.ffns(3)
threshold_holder = matchings.Atlas.ffns(3, 0.0)
# LHAPDF cache
lhapdf_vals_dict = {
1: np.array(
Expand Down Expand Up @@ -738,7 +738,7 @@ def benchmark_lhapdf_exact(self):
couplings=ref_couplings(coupling_ref, scale_ref),
order=(order, 0),
method=CouplingEvolutionMethod.EXACT,
masses=threshold_holder.area_walls[1:-1],
masses=threshold_holder.walls[1:-1],
hqm_scheme=QuarkMassScheme.POLE,
thresholds_ratios=[1.0, 1.0, 1.0],
)
Expand Down Expand Up @@ -861,20 +861,18 @@ def benchmark_APFEL_fact_to_ren_lha_settings(self, theory_card: TheoryCard):
)
for mu2 in mu2s:
my_val = sc.a(mu2 * xif2)[0]
path = sc.thresholds.path(mu2 * xif2)
my_val_4 = sc.a(mu2 * xif2, nf_to=4)[0]
path_4 = sc.thresholds.path(mu2 * xif2, 4)
path_4 = sc.atlas.path((mu2 * xif2, 4))
my_val_3 = sc.a(mu2 * xif2, nf_to=3)[0]
path_3 = sc.thresholds.path(mu2 * xif2, 3)
path_3 = sc.atlas.path((mu2 * xif2, 3))

# path_4 it's not matched
assert len(path_4) == 1

# path_3 is the same as path backward in nf and in q2.
assert len(path_3) == 2
assert len(path) == 2
assert path_3[1].nf < path_3[0].nf
assert path_3[1].q2_from < path_3[0].q2_from
assert path_3[1].origin < path_3[0].origin

apfel_val_ref = 0.03478112968976964
if use_APFEL:
Expand Down
1 change: 0 additions & 1 deletion benchmarks/lha_paper_bench.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
"""
Benchmark to :cite:`Giele:2002hx` (LO + NLO) and :cite:`Dittmar:2005ed` (NNLO).
"""
import argparse
import os
from math import nan

Expand Down
32 changes: 14 additions & 18 deletions doc/source/overview/tutorials/alpha_s.ipynb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

45 changes: 21 additions & 24 deletions doc/source/overview/tutorials/dglap.ipynb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 67fa988

Please sign in to comment.