Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Time-like Anomalous dimensions #200

Closed
wants to merge 22 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
146 changes: 146 additions & 0 deletions benchmarks/FF_LHAPDF_bench.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
r"""Benchmark FFs from LHAPDF"""

from banana import register

from eko import interpolation
from ekomark.benchmark.runner import Runner

register(__file__)

base_operator = {"ev_op_iterations": 1, "backward_inversion": "exact"}

base_theory = {
"Qref": 91.2,
"mc": 1.51,
"mb": 4.92,
"mt": 172.5,
"kcThr": 1.0,
"kbThr": 1.0,
"ktThr": 1.0,
"alphas": 0.118000,
"alphaqed": 0.007496,
"FNS": "ZM-VFNS",
"ModEv": "TRN",
}

FF_sets_lo = [
"NNFF10_PIm_lo",
"NNFF10_PIp_lo",
"NNFF10_PIsum_lo",
"NNFF10_KAm_lo",
"NNFF10_KAp_lo",
"NNFF10_KAsum_lo",
"NNFF10_PRm_lo",
"NNFF10_PRp_lo",
"NNFF10_PRsum_lo",
]
FF_sets_nlo = [
"NNFF10_PIm_nlo",
"NNFF10_PIp_nlo",
"NNFF10_PIsum_nlo",
"NNFF10_KAm_nlo",
"NNFF10_KAp_nlo",
"NNFF10_KAsum_nlo",
"NNFF10_PRm_nlo",
"NNFF10_PRp_nlo",
"NNFF10_PRsum_nlo",
"MAPFF10NLOPIm",
"MAPFF10NLOPIp",
"MAPFF10NLOPIsum",
"MAPFF10NLOKAm",
"MAPFF10NLOKAp",
"MAPFF10NLOKAsum",
]
FF_sets_nnlo = [
"NNFF10_PIm_nnlo",
"NNFF10_PIp_nnlo",
"NNFF10_PIsum_nnlo",
"NNFF10_KAm_nnlo",
"NNFF10_KAp_nnlo",
"NNFF10_KAsum_nnlo",
"NNFF10_PRm_nnlo",
"NNFF10_PRp_nnlo",
"NNFF10_PRsum_nnlo",
"MAPFF10NNLOPIm",
"MAPFF10NNLOPIp",
"MAPFF10NNLOPIsum",
"MAPFF10NNLOKAm",
"MAPFF10NNLOKAp",
"MAPFF10NNLOKAsum",
]


class BenchmarkFF(Runner):
external = "LHAPDF"
rotate_to_evolution_basis = True

def skip_pdfs(self, _theory):
return [
-6,
6,
22,
"ph",
"T35",
"V35",
]

def benchmark_lo(self, Q0=10, Q2grid=(10000, 1000000)):
theory_card = {
**base_theory,
"PTO": 0,
"QED": 0,
"Q0": Q0,
"MaxNfPdf": 5,
"MaxNfAs": 5,
}

operator_card = {
**base_operator,
"Q2grid": list(Q2grid),
"time_like": [True],
"interpolation_xgrid": interpolation.lambertgrid(100, 0.01),
}

self.run([theory_card], [operator_card], [FF_sets_lo[7]])

def benchmark_nlo(self, Q0=1.65, Q2grid=(10000,)):
theory_card = {
**base_theory,
"PTO": 1,
"QED": 0,
"Q0": Q0,
"MaxNfPdf": 5,
"MaxNfAs": 5,
}

operator_card = {
**base_operator,
"Q2grid": list(Q2grid),
"time_like": [True],
"interpolation_xgrid": interpolation.lambertgrid(5, 0.01),
}

self.run([theory_card], [operator_card], [FF_sets_nlo[11]])

def benchmark_nnlo(self, Q0=10, Q2grid=(10000,)):
theory_card = {
**base_theory,
"PTO": 2,
"QED": 0,
"Q0": Q0,
"MaxNfPdf": 5,
"MaxNfAs": 5,
}

operator_card = {
**base_operator,
"Q2grid": list(Q2grid),
"time_like": [True],
"interpolation_xgrid": interpolation.lambertgrid(100, 0.01),
}

self.run([theory_card], [operator_card], [FF_sets_nnlo[10]])


if __name__ == "__main__":
BenchmarkFF().benchmark_nlo()
61 changes: 59 additions & 2 deletions benchmarks/NNPDF_bench.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import numpy as np
from banana import register

from eko import interpolation
from ekomark.benchmark.runner import Runner

register(__file__)
Expand All @@ -30,6 +31,21 @@ def skip_pdfs(self, _theory):
]


class BenchmarkNNFF(Runner):
external = "LHAPDF"
rotate_to_evolution_basis = True

def skip_pdfs(self, _theory):
return [
-6,
6,
22,
"ph",
"T35",
"V35",
]


base_operator = {"ev_op_iterations": 1, "backward_inversion": "exact"}

base_theory = {
Expand Down Expand Up @@ -90,6 +106,44 @@ def benchmark_nnlo(self, Q0=1.65, Q2grid=(100,)):
self.run([theory_card], [operator_card], ["NNPDF40_nnlo_as_01180"])


class BenchmarkNNFF10(BenchmarkNNFF):
def benchmark_lo(self, Q0=1.65, Q2grid=(100,)):
theory_card = {**base_theory, "PTO": 0, "QED": 0, "Q0": Q0, "MaxNfPdf": 5}

operator_card = {
**base_operator,
"Q2grid": list(Q2grid),
"time_like": [True],
"interpolation_xgrid": interpolation.lambertgrid(50, 0.01),
}

self.run([theory_card], [operator_card], ["NNFF10_PIm_lo"])

def benchmark_nlo(self, Q0=10, Q2grid=(10000,)):
theory_card = {**base_theory, "PTO": 1, "QED": 0, "Q0": Q0, "MaxNfPdf": 5}

operator_card = {
**base_operator,
"Q2grid": list(Q2grid),
"time_like": [True],
"interpolation_xgrid": interpolation.lambertgrid(50, 0.01),
}

self.run([theory_card], [operator_card], ["MAPFF10NLOPIp"])

def benchmark_nnlo(self, Q0=100, Q2grid=(1000000,)):
theory_card = {**base_theory, "PTO": 2, "QED": 0, "Q0": Q0, "MaxNfPdf": 5}

operator_card = {
**base_operator,
"Q2grid": list(Q2grid),
"time_like": [True],
"interpolation_xgrid": interpolation.lambertgrid(100, 0.01),
}

self.run([theory_card], [operator_card], ["MAPFF10NNLOPIp"])


if __name__ == "__main__":
low2 = 4**2
high2 = 30**2
Expand All @@ -98,6 +152,9 @@ def benchmark_nnlo(self, Q0=1.65, Q2grid=(100,)):
# nn31.benchmark_nlo(Q0=np.sqrt(low2), Q2grid=[10])
# # test backward
# #nn31.benchmark_nlo(Q0=np.sqrt(high2), Q2grid=[low2])
nn40 = BenchmarkNNPDF40()
# nn40 = BenchmarkNNPDF40()
# nn40.benchmark_nnlo(Q2grid=[100])
nn40.benchmark_nnlo(Q0=np.sqrt(high2), Q2grid=[low2])
# nn40.benchmark_nnlo(Q0=np.sqrt(high2), Q2grid=[low2])
nnff10 = BenchmarkNNFF10()
# nnff10.benchmark_lo()
nnff10.benchmark_nnlo()
18 changes: 14 additions & 4 deletions benchmarks/apfel_bench.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,16 @@ def benchmark_plain(self, pto):
cartesian_product(th), operators.build(operators.apfel_config), ["ToyLH"]
)

def benchmark_plain_tl(self, pto):
"""Plain configuration"""

th = self.ffns_theory.copy()
th.update({"PTO": [pto]})
th["ModEv"] = ["EXA"] # TODO for the time one is sufficient
op = operators.apfel_config.copy()
op["time_like"] = [True]
self.run(cartesian_product(th), operators.build(op), ["ToyLH"])

def benchmark_sv(self, pto, svmode):
"""Scale Variation"""

Expand Down Expand Up @@ -188,11 +198,11 @@ def benchmark_sv(self, pto, svmode):


if __name__ == "__main__":

obj = BenchmarkVFNS()
# obj = BenchmarkFFNS()
# obj = BenchmarkVFNS()
obj = BenchmarkFFNS()

# obj.benchmark_plain(2)
obj.benchmark_sv(2, "exponentiated")
# obj.benchmark_sv(2, "exponentiated")
# obj.benchmark_kthr(2)
# obj.benchmark_msbar(2)
obj.benchmark_plain_tl(1)
23 changes: 23 additions & 0 deletions doc/source/refs.bib
Original file line number Diff line number Diff line change
Expand Up @@ -776,3 +776,26 @@ @article{Albino:2000cp
pages = "93--102",
year = "2001"
}
@article{Mitov:2006wy,
author = "Mitov, Alexander and Moch, Sven-Olaf",
title = "{QCD Corrections to Semi-Inclusive Hadron Production in Electron-Positron Annihilation at Two Loops}",
eprint = "hep-ph/0604160",
archivePrefix = "arXiv",
reportNumber = "DESY-06-043",
doi = "10.1016/j.nuclphysb.2006.05.018",
journal = "Nucl. Phys. B",
volume = "751",
pages = "18--52",
year = "2006"
}
@article{Gluck:1992zx,
author = "Gluck, M. and Reya, E. and Vogt, A.",
title = "{Parton fragmentation into photons beyond the leading order}",
reportNumber = "DO-TH-92-23",
doi = "10.1103/PhysRevD.51.1427",
journal = "Phys. Rev. D",
volume = "48",
pages = "116",
year = "1993",
note = "[Erratum: Phys.Rev.D 51, 1427 (1995)]"
}
2 changes: 2 additions & 0 deletions src/eko/evolution_operator/grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ def __init__(
if order == (1, 0) and method != "iterate-exact":
logger.warning("Evolution: In LO we use the exact solution always!")

logger.info(("Time" if configs.time_like else "Space") + "-like evolution")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I proposed for polarized, let's make this machine-friendly:

Suggested change
logger.info(("Time" if configs.time_like else "Space") + "-like evolution")
logger.info(dict(evol_kind="time" if configs.time_like else "space"))

or, definitely simpler, not sure if better:

Suggested change
logger.info(("Time" if configs.time_like else "Space") + "-like evolution")
logger.info(dict(time_like=configs.time_like))

@felixhekhorn ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's follow #195 - so the latter


self.config = config
self.q2_grid = mu2grid
self.managers = dict(
Expand Down
2 changes: 0 additions & 2 deletions src/eko/evolution_operator/operator_matrix_element.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ def build_ome(A, matching_order, a_s, backward_method):
-------
ome : numpy.ndarray
matching operator matrix

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep these lines, they are part of our docstrings format.

"""
# to get the inverse one can use this FORM snippet
# Symbol a;
Expand Down Expand Up @@ -123,7 +122,6 @@ def quad_ker(
-------
ker : float
evaluated integration kernel

"""
ker_base = QuadKerBase(u, is_log, logx, mode0)
integrand = ker_base.integrand(areas)
Expand Down
3 changes: 1 addition & 2 deletions src/ekomark/benchmark/external/apfel_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,19 +66,18 @@ def compute_apfel_data(
# apfel.SetGridParameters(3, 50, 3, 8e-1)

# init evolution
apfel.SetTimeLikeEvolution(operators["time_like"])
apfel.InitializeAPFEL()
print(f"Loading APFEL took {(time.perf_counter() - apf_start)} s")

# Run
apf_tabs = {}
for q2 in operators["Q2grid"]:

apfel.EvolveAPFEL(theory["Q0"], np.sqrt(q2))
print(f"Executing APFEL took {(time.perf_counter() - apf_start)} s")

tab = {}
for pid in br.flavor_basis_pids:

if pid in skip_pdfs:
continue

Expand Down
5 changes: 2 additions & 3 deletions src/ekomark/benchmark/external/lhapdf_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,14 @@ def compute_LHAPDF_data(operators, pdf, skip_pdfs, rotate_to_evolution_basis=Fal
ref : dict
output containing: target_xgrid, values
"""
# import pdb; pdb.set_trace()

target_xgrid = operators["xgrid"]
target_xgrid = operators["interpolation_xgrid"]

out_tabs = {}
for q2 in operators["Q2grid"]:

tab = {}
for pid in br.flavor_basis_pids:

if pid in skip_pdfs:
continue

Expand Down
21 changes: 21 additions & 0 deletions src/ekore/anomalous_dimensions/polarized/time_like/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
r"""The polarized, time-like Altarelli-Parisi splitting kernels.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this file is deleted in master (likewise for OME)


Normalization is given by

.. math::
\mathbf{P}(x) = \sum\limits_{j=0} a_s^{j+1} \mathbf P^{(j)}(x)

with :math:`a_s = \frac{\alpha_S(\mu^2)}{4\pi}`.
"""

import numba as nb


@nb.njit(cache=True)
def gamma_ns(_order, _mode, _n, _nf):
raise NotImplementedError("Polarised, time-like is not yet implemented")


@nb.njit(cache=True)
def gamma_singlet(_order, _n, _nf):
raise NotImplementedError("Polarised, time-like is not yet implemented")
Loading