From 8601f5ac57d055233528e43c3b98da032a49e971 Mon Sep 17 00:00:00 2001 From: t7phy Date: Mon, 10 Apr 2023 13:12:00 +0200 Subject: [PATCH 01/22] tl ome as1 --- doc/source/refs.bib | 13 ++++ .../unpolarized/time_like/as1.py | 2 +- .../unpolarized/time_like/as1.py | 76 +++++++++++++++++++ 3 files changed, 90 insertions(+), 1 deletion(-) create mode 100644 src/ekore/operator_matrix_elements/unpolarized/time_like/as1.py diff --git a/doc/source/refs.bib b/doc/source/refs.bib index 5c720a857..c26c631c0 100644 --- a/doc/source/refs.bib +++ b/doc/source/refs.bib @@ -894,3 +894,16 @@ @article{Almasy:2011eq pages = "133--152", year = "2012" } + +@article{Cacciari:2005ry, + author = "Cacciari, Matteo and Nason, Paolo and Oleari, Carlo", + title = "{Crossing heavy-flavor thresholds in fragmentation functions}", + eprint = "hep-ph/0504192", + archivePrefix = "arXiv", + reportNumber = "BICOCCA-FT-05-8, LPTHE-05-09", + doi = "10.1088/1126-6708/2005/10/034", + journal = "JHEP", + volume = "10", + pages = "034", + year = "2005" +} diff --git a/src/ekore/anomalous_dimensions/unpolarized/time_like/as1.py b/src/ekore/anomalous_dimensions/unpolarized/time_like/as1.py index 43d33bbee..a71bc0a6c 100644 --- a/src/ekore/anomalous_dimensions/unpolarized/time_like/as1.py +++ b/src/ekore/anomalous_dimensions/unpolarized/time_like/as1.py @@ -1,4 +1,4 @@ -"""The unpolarized |LO| Altarelli-Parisi splitting kernels.""" +"""The unpolarized time-like |LO| Altarelli-Parisi splitting kernels.""" import numba as nb import numpy as np diff --git a/src/ekore/operator_matrix_elements/unpolarized/time_like/as1.py b/src/ekore/operator_matrix_elements/unpolarized/time_like/as1.py new file mode 100644 index 000000000..f721ddb51 --- /dev/null +++ b/src/ekore/operator_matrix_elements/unpolarized/time_like/as1.py @@ -0,0 +1,76 @@ +"""The unpolarized |NLO| matching conditions.""" + +import numba as nb +import numpy as np + +from eko.constants import CF + + +@nb.njit(cache=True) +def A_hg(N, L): + r"""Compute the |NLO| heavy-gluon |OME|. + + Implements :eqref:`27` from :cite:`Cacciari:2005ry` + + Parameters + ---------- + N : complex + Mellin moment + L : float + :math:`\ln(\mu_F^2 / m_h^2) + + Returns + ------- + A_hg : complex + |NLO| heavy-gluon |OME| + :math:`A_{Hg}^{S,(1)} + + """ + result = ( + 2 + * CF + * ( + (2 + N + N**2) / (N * (N**2 - 1)) * (L - 1) + + 4 / (N - 1) ** 2 + - 4 / N**2 + + 2 / (N + 1) ** 2 + ) + ) + return result + + +@nb.njit(cache=True) +def A_singlet(N, L): + r"""Compute the |NLO| singlet |OME|. + + Parameters + ---------- + N : complex + Mellin moment + L : float + :math:`\ln(\mu_F^2 / m_h^2) + + Returns + ------- + A_singlet : numpy.ndarray + |NLO| singlet |OME| + :math:`A^{S,(1)}` + + """ + result = np.array([[0, 0, 0], [0, 0, 0], [A_hg(N, L), 0, 0]], np.complex_) + return result + + +@nb.njit(cache=True) +def A_ns(): + r"""Compute the |NLO| non-singlet |OME|. + + Returns + ------- + A_ns : numpy.ndarray + |NLO| non-singlet |OME| + :math:`A^{S,(1)} + + """ + result = np.array([[0, 0], [0, 0]], np.complex_) + return result From e1e781e554124ad2ec7ca0ca16ef31b1ac54c65f Mon Sep 17 00:00:00 2001 From: t7phy Date: Mon, 10 Apr 2023 13:14:13 +0200 Subject: [PATCH 02/22] fix title --- src/ekore/operator_matrix_elements/unpolarized/time_like/as1.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ekore/operator_matrix_elements/unpolarized/time_like/as1.py b/src/ekore/operator_matrix_elements/unpolarized/time_like/as1.py index f721ddb51..0fdac5c72 100644 --- a/src/ekore/operator_matrix_elements/unpolarized/time_like/as1.py +++ b/src/ekore/operator_matrix_elements/unpolarized/time_like/as1.py @@ -1,4 +1,4 @@ -"""The unpolarized |NLO| matching conditions.""" +"""The unpolarized time-like |NLO| matching conditions.""" import numba as nb import numpy as np From 0e17578bebbab449c966ae4ba468555629234537 Mon Sep 17 00:00:00 2001 From: t7phy Date: Mon, 10 Apr 2023 13:43:19 +0200 Subject: [PATCH 03/22] tl ome init --- .../operator_matrix_element.py | 4 +- .../unpolarized/time_like/__init__.py | 57 +++++++++++++++++-- .../unpolarized/time_like/as1.py | 8 +-- 3 files changed, 57 insertions(+), 12 deletions(-) diff --git a/src/eko/evolution_operator/operator_matrix_element.py b/src/eko/evolution_operator/operator_matrix_element.py index 95e4ddff9..7ab021da9 100644 --- a/src/eko/evolution_operator/operator_matrix_element.py +++ b/src/eko/evolution_operator/operator_matrix_element.py @@ -167,7 +167,7 @@ def quad_ker( A = ome_ps.A_singlet(order, ker_base.n, sx, nf, L, is_msbar, sx_ns) else: if is_time_like: - A = ome_ut.A_singlet(order, ker_base.n, sx, nf, L, is_msbar, sx_ns) + A = ome_ut.A_singlet(order, ker_base.n, L) else: A = ome_us.A_singlet(order, ker_base.n, sx, nf, L, is_msbar, sx_ns) else: @@ -179,7 +179,7 @@ def quad_ker( A = ome_ps.A_non_singlet(order, ker_base.n, sx, nf, L) else: if is_time_like: - A = ome_ut.A_non_singlet(order, ker_base.n, sx, nf, L) + A = ome_ut.A_non_singlet(order, ker_base.n, L) else: A = ome_us.A_non_singlet(order, ker_base.n, sx, nf, L) diff --git a/src/ekore/operator_matrix_elements/unpolarized/time_like/__init__.py b/src/ekore/operator_matrix_elements/unpolarized/time_like/__init__.py index bb20ff58b..bcde46b45 100644 --- a/src/ekore/operator_matrix_elements/unpolarized/time_like/__init__.py +++ b/src/ekore/operator_matrix_elements/unpolarized/time_like/__init__.py @@ -1,15 +1,60 @@ r"""The polarized, time-like |OME|.""" import numba as nb +import numpy as np + +from . import as1 @nb.njit(cache=True) -def A_non_singlet(_matching_order, _n, _sx, _nf, _L): - """Compute the non-singlet |OME|.""" - raise NotImplementedError("Time-like is not yet implemented") +def A_non_singlet(matching_order, N, L): + r"""Compute the non-singlet |OME|. + + Parameters + ---------- + matching_order : tuple(int, int) + perturbative matching order + N : complex + Mellin moment + L : float + :math:`\ln(\mu_F^2 / m_h^2)` + + Returns + ------- + A_non_singlet : numpy.ndarray + non-singlet |OME| + + """ + A_ns = np.zeros((matching_order[0], 2, 2), np.complex_) + if matching_order[0] > 1: + raise Exception("Time-like matching conditions are only known upto NLO") + else: + A_ns[0] = as1.A_ns() + return A_ns @nb.njit(cache=True) -def A_singlet(_matching_order, _n, _sx, _nf, _L, _is_msbar, _sx_ns=None): - """Compute the singlet |OME|.""" - raise NotImplementedError("Time-like is not yet implemented") +def A_singlet(matching_order, N, L): + r"""Compute the singlet |OME|. + + Parameters + ---------- + matching_order : tuple(int, int) + perturbative matching order + N : complex + Mellin moment + L : float + :math:`\ln(\mu_F^2 / m_h^2)` + + Returns + ------- + A_singlet : numpy.ndarray + singlet |OME| + + """ + A_singlet = np.zeros((matching_order[0], 3, 3), np.complex_) + if matching_order[0] > 1: + raise Exception("Time-like matching conditions are only known upto NLO") + else: + A_singlet[0] = as1.A_singlet(N, L) + return A_singlet diff --git a/src/ekore/operator_matrix_elements/unpolarized/time_like/as1.py b/src/ekore/operator_matrix_elements/unpolarized/time_like/as1.py index 0fdac5c72..b5237a551 100644 --- a/src/ekore/operator_matrix_elements/unpolarized/time_like/as1.py +++ b/src/ekore/operator_matrix_elements/unpolarized/time_like/as1.py @@ -17,13 +17,13 @@ def A_hg(N, L): N : complex Mellin moment L : float - :math:`\ln(\mu_F^2 / m_h^2) + :math:`\ln(\mu_F^2 / m_h^2)` Returns ------- A_hg : complex |NLO| heavy-gluon |OME| - :math:`A_{Hg}^{S,(1)} + :math:`A_{hg}^{S,(1)}` """ result = ( @@ -48,7 +48,7 @@ def A_singlet(N, L): N : complex Mellin moment L : float - :math:`\ln(\mu_F^2 / m_h^2) + :math:`\ln(\mu_F^2 / m_h^2)` Returns ------- @@ -69,7 +69,7 @@ def A_ns(): ------- A_ns : numpy.ndarray |NLO| non-singlet |OME| - :math:`A^{S,(1)} + :math:`A^{S,(1)}` """ result = np.array([[0, 0], [0, 0]], np.complex_) From 833801b409d8bababfd14a7382e8c7d65a35d20d Mon Sep 17 00:00:00 2001 From: t7phy Date: Mon, 10 Apr 2023 15:03:42 +0200 Subject: [PATCH 04/22] fix test_ome --- tests/eko/evolution_operator/test_ome.py | 117 ++++++++++++----------- 1 file changed, 59 insertions(+), 58 deletions(-) diff --git a/tests/eko/evolution_operator/test_ome.py b/tests/eko/evolution_operator/test_ome.py index 2c0fdf644..af30072ee 100644 --- a/tests/eko/evolution_operator/test_ome.py +++ b/tests/eko/evolution_operator/test_ome.py @@ -81,7 +81,7 @@ def test_build_ome_nlo(): def test_quad_ker_errors(): - for p, t in [(True, False), (False, True), (True, True)]: + for p, t in [(True, False), (True, True)]: for mode0, mode1 in [ (21, br.matching_hplus_pid), (200, br.matching_hminus_pid), @@ -128,63 +128,64 @@ def test_quad_ker(monkeypatch): lambda *args: np.array([zeros, zeros, zeros]), ) for is_log in [True, False]: - res_ns = quad_ker( - u=0, - order=(3, 0), - mode0=200, - mode1=200, - is_log=is_log, - logx=0.123, - areas=np.zeros(3), - backward_method=None, - a_s=0.0, - nf=3, - L=0.0, - sv_mode=sv.Modes.expanded, - Lsv=0.0, - is_msbar=False, - is_polarized=False, - is_time_like=False, - ) - np.testing.assert_allclose(res_ns, 1.0) - res_s = quad_ker( - u=0, - order=(3, 0), - mode0=100, - mode1=100, - is_log=is_log, - logx=0.123, - areas=np.zeros(3), - backward_method=None, - a_s=0.0, - nf=3, - L=0.0, - sv_mode=sv.Modes.expanded, - Lsv=0.0, - is_msbar=False, - is_polarized=False, - is_time_like=False, - ) - np.testing.assert_allclose(res_s, 1.0) - res_s = quad_ker( - u=0, - order=(3, 0), - mode0=100, - mode1=21, - is_log=is_log, - logx=0.0, - areas=np.zeros(3), - backward_method=None, - a_s=0.0, - nf=3, - L=0.0, - sv_mode=sv.Modes.expanded, - Lsv=0.0, - is_msbar=False, - is_polarized=False, - is_time_like=False, - ) - np.testing.assert_allclose(res_s, 0.0) + for p, t in [(False, False), (False, True)]: + res_ns = quad_ker( + u=0, + order=(3, 0), + mode0=200, + mode1=200, + is_log=is_log, + logx=0.123, + areas=np.zeros(3), + backward_method=None, + a_s=0.0, + nf=3, + L=0.0, + sv_mode=sv.Modes.expanded, + Lsv=0.0, + is_msbar=False, + is_polarized=p, + is_time_like=t, + ) + np.testing.assert_allclose(res_ns, 1.0) + res_s = quad_ker( + u=0, + order=(3, 0), + mode0=100, + mode1=100, + is_log=is_log, + logx=0.123, + areas=np.zeros(3), + backward_method=None, + a_s=0.0, + nf=3, + L=0.0, + sv_mode=sv.Modes.expanded, + Lsv=0.0, + is_msbar=False, + is_polarized=p, + is_time_like=t, + ) + np.testing.assert_allclose(res_s, 1.0) + res_s = quad_ker( + u=0, + order=(3, 0), + mode0=100, + mode1=21, + is_log=is_log, + logx=0.0, + areas=np.zeros(3), + backward_method=None, + a_s=0.0, + nf=3, + L=0.0, + sv_mode=sv.Modes.expanded, + Lsv=0.0, + is_msbar=False, + is_polarized=p, + is_time_like=t, + ) + np.testing.assert_allclose(res_s, 0.0) # test expanded intrisic inverse kernels labels = [(200, 200), *br.singlet_labels] From a343085f18ccce536d2a31e7c5c782b20792d0ed Mon Sep 17 00:00:00 2001 From: t7phy Date: Mon, 10 Apr 2023 15:17:59 +0200 Subject: [PATCH 05/22] fix test_ome order --- tests/eko/evolution_operator/test_ome.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/eko/evolution_operator/test_ome.py b/tests/eko/evolution_operator/test_ome.py index af30072ee..e2e6d7b8b 100644 --- a/tests/eko/evolution_operator/test_ome.py +++ b/tests/eko/evolution_operator/test_ome.py @@ -128,10 +128,10 @@ def test_quad_ker(monkeypatch): lambda *args: np.array([zeros, zeros, zeros]), ) for is_log in [True, False]: - for p, t in [(False, False), (False, True)]: + for order, p, t in [((3, 0), False, False), ((2, 0), False, True)]: res_ns = quad_ker( u=0, - order=(3, 0), + order=order, mode0=200, mode1=200, is_log=is_log, @@ -150,7 +150,7 @@ def test_quad_ker(monkeypatch): np.testing.assert_allclose(res_ns, 1.0) res_s = quad_ker( u=0, - order=(3, 0), + order=order, mode0=100, mode1=100, is_log=is_log, @@ -169,7 +169,7 @@ def test_quad_ker(monkeypatch): np.testing.assert_allclose(res_s, 1.0) res_s = quad_ker( u=0, - order=(3, 0), + order=order, mode0=100, mode1=21, is_log=is_log, From 4cc95b6a7ab7218df87f21d67fb08e5b1bd653e3 Mon Sep 17 00:00:00 2001 From: t7phy Date: Mon, 10 Apr 2023 15:32:41 +0200 Subject: [PATCH 06/22] fix typo --- tests/eko/evolution_operator/test_ome.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/eko/evolution_operator/test_ome.py b/tests/eko/evolution_operator/test_ome.py index e2e6d7b8b..5d8c2e23b 100644 --- a/tests/eko/evolution_operator/test_ome.py +++ b/tests/eko/evolution_operator/test_ome.py @@ -128,7 +128,7 @@ def test_quad_ker(monkeypatch): lambda *args: np.array([zeros, zeros, zeros]), ) for is_log in [True, False]: - for order, p, t in [((3, 0), False, False), ((2, 0), False, True)]: + for order, p, t in [((3, 0), False, False), ((1, 0), False, True)]: res_ns = quad_ker( u=0, order=order, From 79690809e1f2b76658f9a874130de47f77ae73ff Mon Sep 17 00:00:00 2001 From: t7phy Date: Mon, 10 Apr 2023 17:19:19 +0200 Subject: [PATCH 07/22] add test_init --- .../unpolarized/time_like/__init__.py | 4 ++-- .../unpolarized/time_like/as1.py | 5 +++-- .../unpolarized/time_like/test_init.py | 12 ++++-------- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/src/ekore/operator_matrix_elements/unpolarized/time_like/__init__.py b/src/ekore/operator_matrix_elements/unpolarized/time_like/__init__.py index bcde46b45..269ba7c0f 100644 --- a/src/ekore/operator_matrix_elements/unpolarized/time_like/__init__.py +++ b/src/ekore/operator_matrix_elements/unpolarized/time_like/__init__.py @@ -52,9 +52,9 @@ def A_singlet(matching_order, N, L): singlet |OME| """ - A_singlet = np.zeros((matching_order[0], 3, 3), np.complex_) if matching_order[0] > 1: raise Exception("Time-like matching conditions are only known upto NLO") else: - A_singlet[0] = as1.A_singlet(N, L) + A_singlet = np.zeros((matching_order[0], 3, 3), np.complex_) + # A_singlet[0] = as1.A_singlet(N, L) return A_singlet diff --git a/src/ekore/operator_matrix_elements/unpolarized/time_like/as1.py b/src/ekore/operator_matrix_elements/unpolarized/time_like/as1.py index b5237a551..0bf702cb1 100644 --- a/src/ekore/operator_matrix_elements/unpolarized/time_like/as1.py +++ b/src/ekore/operator_matrix_elements/unpolarized/time_like/as1.py @@ -3,7 +3,8 @@ import numba as nb import numpy as np -from eko.constants import CF +# from eko.constants import CF +CF = 4 / 3 @nb.njit(cache=True) @@ -57,7 +58,7 @@ def A_singlet(N, L): :math:`A^{S,(1)}` """ - result = np.array([[0, 0, 0], [0, 0, 0], [A_hg(N, L), 0, 0]], np.complex_) + result = np.array([[0 + 0j, 0, 0], [0 + 0j, 0, 0], [A_hg(N, L), 0, 0]], np.complex_) return result diff --git a/tests/ekore/operator_matrix_elements/unpolarized/time_like/test_init.py b/tests/ekore/operator_matrix_elements/unpolarized/time_like/test_init.py index b10e3ecf3..eedc47ed2 100644 --- a/tests/ekore/operator_matrix_elements/unpolarized/time_like/test_init.py +++ b/tests/ekore/operator_matrix_elements/unpolarized/time_like/test_init.py @@ -1,10 +1,6 @@ -import pytest +import ekore.operator_matrix_elements.unpolarized.time_like as ome -import ekore.operator_matrix_elements.unpolarized.time_like as ome_ut - -def test_init(): - with pytest.raises(NotImplementedError): - ome_ut.A_non_singlet((1, 0), 1.0, [], 4, 0.0) - with pytest.raises(NotImplementedError): - ome_ut.A_singlet((1, 0), 1.0, [], 4, 0.0, False) +def test_shapes(): + assert ome.A_singlet((1, 0), complex(0, 1), 0).shape == (1, 3, 3) + assert ome.A_non_singlet((1, 0), complex(0, 1), 0).shape == (1, 2, 2) From 9fff9e70e4c5562dc031a18c880065a17d7b68e8 Mon Sep 17 00:00:00 2001 From: t7phy Date: Mon, 10 Apr 2023 17:58:49 +0200 Subject: [PATCH 08/22] test_as1 added --- .../unpolarized/time_like/test_as1.py | 19 +++++++++++++++++++ .../unpolarized/time_like/test_init.py | 2 ++ 2 files changed, 21 insertions(+) create mode 100644 tests/ekore/operator_matrix_elements/unpolarized/time_like/test_as1.py diff --git a/tests/ekore/operator_matrix_elements/unpolarized/time_like/test_as1.py b/tests/ekore/operator_matrix_elements/unpolarized/time_like/test_as1.py new file mode 100644 index 000000000..971110588 --- /dev/null +++ b/tests/ekore/operator_matrix_elements/unpolarized/time_like/test_as1.py @@ -0,0 +1,19 @@ +r"""Test NLO |OME|.""" + +import numpy as np + +import ekore.operator_matrix_elements.unpolarized.time_like.as1 as ome_as1 + + +def test_A_hg(): + res = [ + complex(-752 / 75, 112 / 25), + complex(-3268 / 4225, -24872 / 12675), + complex(437984 / 950625, -4829264 / 2851875), + ] + for i, N, L in [ + (0, complex(1, 1), 1), + (1, complex(2, 2), 2), + (2, complex(3, 3), 3), + ]: + np.testing.assert_almost_equal(ome_as1.A_hg(N, L), res[i]) diff --git a/tests/ekore/operator_matrix_elements/unpolarized/time_like/test_init.py b/tests/ekore/operator_matrix_elements/unpolarized/time_like/test_init.py index eedc47ed2..051274596 100644 --- a/tests/ekore/operator_matrix_elements/unpolarized/time_like/test_init.py +++ b/tests/ekore/operator_matrix_elements/unpolarized/time_like/test_init.py @@ -1,3 +1,5 @@ +r"""Test |OME|.""" + import ekore.operator_matrix_elements.unpolarized.time_like as ome From 5c4966b72c63a8b829158a0f0bf1ca30e2b2b2c4 Mon Sep 17 00:00:00 2001 From: t7phy Date: Mon, 10 Apr 2023 18:04:31 +0200 Subject: [PATCH 09/22] modify docs --- doc/source/theory/TimeLike.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/source/theory/TimeLike.rst b/doc/source/theory/TimeLike.rst index 7397e0c73..1a2084a98 100644 --- a/doc/source/theory/TimeLike.rst +++ b/doc/source/theory/TimeLike.rst @@ -19,6 +19,9 @@ The relevant setting in the operator card is thus called ``time_like = True``. We implement the time-like |DGLAP| anomalous dimensions up to |NNLO| in :class:`~ekore.anomalous_dimensions.unpolarized.time_like`. The implementation for the |LO| and |NLO| splitting functions is based on :cite:`Mitov:2006wy, Gluck:1992zx` and the implementation for the |NNLO| splitting functions is based on :cite:`Mitov:2006ic, Moch:2007tx, Almasy:2011eq`. +We also implement the time-like matching conditions up to |NLO| in :class:`~ekore.operator_matrix_elements.unpolarized.time_like` which +are based on :cite:`Cacciari:2005ry`. The time-like matching conditions for |NNLO| are not known. + Supplying new anomalous dimensions and new matching conditions is the only change required for the eko program (e.g. the solution strategies are unaffected). From 7854ad8731f4ec9a0cd196ce89b6089e175152c0 Mon Sep 17 00:00:00 2001 From: t7phy Date: Mon, 10 Apr 2023 23:31:42 +0200 Subject: [PATCH 10/22] few corrections --- benchmarks/FF_LHAPDF_bench.py | 2 +- doc/source/theory/TimeLike.rst | 1 - .../unpolarized/time_like/__init__.py | 4 ++-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/benchmarks/FF_LHAPDF_bench.py b/benchmarks/FF_LHAPDF_bench.py index c9c9816a6..9bcdb2e2b 100644 --- a/benchmarks/FF_LHAPDF_bench.py +++ b/benchmarks/FF_LHAPDF_bench.py @@ -104,7 +104,7 @@ def benchmark_lo(self, ff_index, Q0=10, mugrid=(100,)): self.run([theory_card], [operator_card], [FF_sets_lo[ff_index]]) - def benchmark_nlo(self, ff_index, Q0=10, mugrid=(100,)): + def benchmark_nlo(self, ff_index, Q0=10, mugrid=(1.65,)): theory_card = { **base_theory, "PTO": 1, diff --git a/doc/source/theory/TimeLike.rst b/doc/source/theory/TimeLike.rst index 1a2084a98..6287bf57a 100644 --- a/doc/source/theory/TimeLike.rst +++ b/doc/source/theory/TimeLike.rst @@ -21,7 +21,6 @@ The implementation for the |LO| and |NLO| splitting functions is based on :cite: the |NNLO| splitting functions is based on :cite:`Mitov:2006ic, Moch:2007tx, Almasy:2011eq`. We also implement the time-like matching conditions up to |NLO| in :class:`~ekore.operator_matrix_elements.unpolarized.time_like` which are based on :cite:`Cacciari:2005ry`. The time-like matching conditions for |NNLO| are not known. - Supplying new anomalous dimensions and new matching conditions is the only change required for the eko program (e.g. the solution strategies are unaffected). diff --git a/src/ekore/operator_matrix_elements/unpolarized/time_like/__init__.py b/src/ekore/operator_matrix_elements/unpolarized/time_like/__init__.py index 269ba7c0f..20e2609eb 100644 --- a/src/ekore/operator_matrix_elements/unpolarized/time_like/__init__.py +++ b/src/ekore/operator_matrix_elements/unpolarized/time_like/__init__.py @@ -25,10 +25,10 @@ def A_non_singlet(matching_order, N, L): non-singlet |OME| """ - A_ns = np.zeros((matching_order[0], 2, 2), np.complex_) if matching_order[0] > 1: raise Exception("Time-like matching conditions are only known upto NLO") else: + A_ns = np.zeros((matching_order[0], 2, 2), np.complex_) A_ns[0] = as1.A_ns() return A_ns @@ -56,5 +56,5 @@ def A_singlet(matching_order, N, L): raise Exception("Time-like matching conditions are only known upto NLO") else: A_singlet = np.zeros((matching_order[0], 3, 3), np.complex_) - # A_singlet[0] = as1.A_singlet(N, L) + A_singlet[0] = as1.A_singlet(N, L) return A_singlet From 0f53e86bc2617ce0acb88aa3a95bed3e1617aaae Mon Sep 17 00:00:00 2001 From: t7phy Date: Tue, 11 Apr 2023 14:48:04 +0200 Subject: [PATCH 11/22] commas and full stops --- .../anomalous_dimensions/unpolarized/time_like/__init__.py | 2 +- src/ekore/anomalous_dimensions/unpolarized/time_like/as1.py | 2 +- src/ekore/anomalous_dimensions/unpolarized/time_like/as2.py | 2 +- src/ekore/anomalous_dimensions/unpolarized/time_like/as3.py | 2 +- .../unpolarized/time_like/__init__.py | 2 +- .../operator_matrix_elements/unpolarized/time_like/as1.py | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/ekore/anomalous_dimensions/unpolarized/time_like/__init__.py b/src/ekore/anomalous_dimensions/unpolarized/time_like/__init__.py index 293f62a0c..59b69e478 100644 --- a/src/ekore/anomalous_dimensions/unpolarized/time_like/__init__.py +++ b/src/ekore/anomalous_dimensions/unpolarized/time_like/__init__.py @@ -1,4 +1,4 @@ -"""The unpolarized time-like Altarelli-Parisi splitting kernels.""" +"""The unpolarized, time-like Altarelli-Parisi splitting kernels.""" import numba as nb import numpy as np diff --git a/src/ekore/anomalous_dimensions/unpolarized/time_like/as1.py b/src/ekore/anomalous_dimensions/unpolarized/time_like/as1.py index a71bc0a6c..44913ba05 100644 --- a/src/ekore/anomalous_dimensions/unpolarized/time_like/as1.py +++ b/src/ekore/anomalous_dimensions/unpolarized/time_like/as1.py @@ -1,4 +1,4 @@ -"""The unpolarized time-like |LO| Altarelli-Parisi splitting kernels.""" +"""The unpolarized, time-like |LO| Altarelli-Parisi splitting kernels.""" import numba as nb import numpy as np diff --git a/src/ekore/anomalous_dimensions/unpolarized/time_like/as2.py b/src/ekore/anomalous_dimensions/unpolarized/time_like/as2.py index 8afd836b8..68c3955b1 100644 --- a/src/ekore/anomalous_dimensions/unpolarized/time_like/as2.py +++ b/src/ekore/anomalous_dimensions/unpolarized/time_like/as2.py @@ -1,4 +1,4 @@ -"""The unpolarized time-like |NLO| Altarelli-Parisi splitting kernels.""" +"""The unpolarized, time-like |NLO| Altarelli-Parisi splitting kernels.""" import numba as nb import numpy as np diff --git a/src/ekore/anomalous_dimensions/unpolarized/time_like/as3.py b/src/ekore/anomalous_dimensions/unpolarized/time_like/as3.py index 4e16cb556..fdd8a8daf 100644 --- a/src/ekore/anomalous_dimensions/unpolarized/time_like/as3.py +++ b/src/ekore/anomalous_dimensions/unpolarized/time_like/as3.py @@ -1,4 +1,4 @@ -"""The unpolarized time-like |NNLO| Altarelli-Parisi splitting kernels.""" +"""The unpolarized, time-like |NNLO| Altarelli-Parisi splitting kernels.""" import numba as nb import numpy as np diff --git a/src/ekore/operator_matrix_elements/unpolarized/time_like/__init__.py b/src/ekore/operator_matrix_elements/unpolarized/time_like/__init__.py index 20e2609eb..ca75297e3 100644 --- a/src/ekore/operator_matrix_elements/unpolarized/time_like/__init__.py +++ b/src/ekore/operator_matrix_elements/unpolarized/time_like/__init__.py @@ -1,4 +1,4 @@ -r"""The polarized, time-like |OME|.""" +r"""The unpolarized, time-like |OME|.""" import numba as nb import numpy as np diff --git a/src/ekore/operator_matrix_elements/unpolarized/time_like/as1.py b/src/ekore/operator_matrix_elements/unpolarized/time_like/as1.py index 0bf702cb1..81f03542f 100644 --- a/src/ekore/operator_matrix_elements/unpolarized/time_like/as1.py +++ b/src/ekore/operator_matrix_elements/unpolarized/time_like/as1.py @@ -1,4 +1,4 @@ -"""The unpolarized time-like |NLO| matching conditions.""" +"""The unpolarized, time-like |NLO| matching conditions.""" import numba as nb import numpy as np @@ -11,7 +11,7 @@ def A_hg(N, L): r"""Compute the |NLO| heavy-gluon |OME|. - Implements :eqref:`27` from :cite:`Cacciari:2005ry` + Implements :eqref:`27` from :cite:`Cacciari:2005ry`. Parameters ---------- From c58185744fc515c4855760abf4001254187fbd71 Mon Sep 17 00:00:00 2001 From: t7phy Date: Tue, 11 Apr 2023 15:26:58 +0200 Subject: [PATCH 12/22] A_gg added --- .../unpolarized/time_like/as1.py | 24 ++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/src/ekore/operator_matrix_elements/unpolarized/time_like/as1.py b/src/ekore/operator_matrix_elements/unpolarized/time_like/as1.py index 81f03542f..0b328a01f 100644 --- a/src/ekore/operator_matrix_elements/unpolarized/time_like/as1.py +++ b/src/ekore/operator_matrix_elements/unpolarized/time_like/as1.py @@ -40,6 +40,26 @@ def A_hg(N, L): return result +@nb.njit(cache=True) +def A_gg(L): + r"""Compute the |NLO| gluon-gluon |OME|. + + They are defined as the Mellin transform of :eqref:`B.6` from :cite:`Buza_1998`. + + Parameters + ---------- + L : float + :math:`\ln(\mu_F^2 / m_h^2)` + + Returns + ------- + A_gg : complex + |NLO| gluon-gluon |OME| :math:`A_{gg,H}^{S,(1)}` + + """ + return -2.0 / 3.0 * L + + @nb.njit(cache=True) def A_singlet(N, L): r"""Compute the |NLO| singlet |OME|. @@ -58,7 +78,9 @@ def A_singlet(N, L): :math:`A^{S,(1)}` """ - result = np.array([[0 + 0j, 0, 0], [0 + 0j, 0, 0], [A_hg(N, L), 0, 0]], np.complex_) + result = np.array( + [[A_gg(L), 0, 0], [0 + 0j, 0, 0], [A_hg(N, L), 0, 0]], np.complex_ + ) return result From d9089d12868725c6830f2eb292315770867efa8c Mon Sep 17 00:00:00 2001 From: t7phy Date: Tue, 11 Apr 2023 15:29:51 +0200 Subject: [PATCH 13/22] use CF from eko --- .../operator_matrix_elements/unpolarized/time_like/as1.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/ekore/operator_matrix_elements/unpolarized/time_like/as1.py b/src/ekore/operator_matrix_elements/unpolarized/time_like/as1.py index 0b328a01f..066e57a41 100644 --- a/src/ekore/operator_matrix_elements/unpolarized/time_like/as1.py +++ b/src/ekore/operator_matrix_elements/unpolarized/time_like/as1.py @@ -3,8 +3,7 @@ import numba as nb import numpy as np -# from eko.constants import CF -CF = 4 / 3 +from eko.constants import CF @nb.njit(cache=True) From b2d79a8e315f8e98c0670a462da572d98f249b40 Mon Sep 17 00:00:00 2001 From: t7phy Date: Tue, 11 Apr 2023 15:32:39 +0200 Subject: [PATCH 14/22] source of values in tests --- .../operator_matrix_elements/unpolarized/time_like/test_as1.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/ekore/operator_matrix_elements/unpolarized/time_like/test_as1.py b/tests/ekore/operator_matrix_elements/unpolarized/time_like/test_as1.py index 971110588..c5c224e82 100644 --- a/tests/ekore/operator_matrix_elements/unpolarized/time_like/test_as1.py +++ b/tests/ekore/operator_matrix_elements/unpolarized/time_like/test_as1.py @@ -1,4 +1,4 @@ -r"""Test NLO |OME|.""" +"""Testing values obtained from Mathematica.""" import numpy as np From 7937aa183cf181c8063487cdfa4c87e31460296b Mon Sep 17 00:00:00 2001 From: t7phy Date: Tue, 11 Apr 2023 15:39:42 +0200 Subject: [PATCH 15/22] add 0j --- src/ekore/operator_matrix_elements/unpolarized/time_like/as1.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ekore/operator_matrix_elements/unpolarized/time_like/as1.py b/src/ekore/operator_matrix_elements/unpolarized/time_like/as1.py index 066e57a41..bc9aacdbc 100644 --- a/src/ekore/operator_matrix_elements/unpolarized/time_like/as1.py +++ b/src/ekore/operator_matrix_elements/unpolarized/time_like/as1.py @@ -78,7 +78,7 @@ def A_singlet(N, L): """ result = np.array( - [[A_gg(L), 0, 0], [0 + 0j, 0, 0], [A_hg(N, L), 0, 0]], np.complex_ + [[A_gg(L), 0 + 0j, 0], [0 + 0j, 0, 0], [A_hg(N, L), 0, 0]], np.complex_ ) return result From e4d5c33f0286314160a3d8bff22461aca12c3e78 Mon Sep 17 00:00:00 2001 From: t7phy Date: Tue, 11 Apr 2023 15:59:22 +0200 Subject: [PATCH 16/22] simplify init --- .../unpolarized/time_like/__init__.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/ekore/operator_matrix_elements/unpolarized/time_like/__init__.py b/src/ekore/operator_matrix_elements/unpolarized/time_like/__init__.py index ca75297e3..6eecc372c 100644 --- a/src/ekore/operator_matrix_elements/unpolarized/time_like/__init__.py +++ b/src/ekore/operator_matrix_elements/unpolarized/time_like/__init__.py @@ -27,9 +27,8 @@ def A_non_singlet(matching_order, N, L): """ if matching_order[0] > 1: raise Exception("Time-like matching conditions are only known upto NLO") - else: - A_ns = np.zeros((matching_order[0], 2, 2), np.complex_) - A_ns[0] = as1.A_ns() + A_ns = np.zeros((matching_order[0], 2, 2), np.complex_) + A_ns[0] = as1.A_ns() return A_ns @@ -54,7 +53,6 @@ def A_singlet(matching_order, N, L): """ if matching_order[0] > 1: raise Exception("Time-like matching conditions are only known upto NLO") - else: - A_singlet = np.zeros((matching_order[0], 3, 3), np.complex_) - A_singlet[0] = as1.A_singlet(N, L) + A_singlet = np.zeros((matching_order[0], 3, 3), np.complex_) + A_singlet[0] = as1.A_singlet(N, L) return A_singlet From e879f4b00712b439a8bb9be5167bc329c5e0e418 Mon Sep 17 00:00:00 2001 From: t7phy Date: Tue, 11 Apr 2023 16:45:25 +0200 Subject: [PATCH 17/22] change cite --- src/ekore/operator_matrix_elements/unpolarized/time_like/as1.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ekore/operator_matrix_elements/unpolarized/time_like/as1.py b/src/ekore/operator_matrix_elements/unpolarized/time_like/as1.py index bc9aacdbc..e52127349 100644 --- a/src/ekore/operator_matrix_elements/unpolarized/time_like/as1.py +++ b/src/ekore/operator_matrix_elements/unpolarized/time_like/as1.py @@ -43,7 +43,7 @@ def A_hg(N, L): def A_gg(L): r"""Compute the |NLO| gluon-gluon |OME|. - They are defined as the Mellin transform of :eqref:`B.6` from :cite:`Buza_1998`. + Implements the Mellin transform of :eqref:`24` from :cite:`Cacciari:2005ry`. Parameters ---------- From 1d5232fdd267cda15a10db8cb732feb345902ff0 Mon Sep 17 00:00:00 2001 From: t7phy Date: Tue, 11 Apr 2023 16:50:40 +0200 Subject: [PATCH 18/22] test A_gg --- .../unpolarized/time_like/test_as1.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/ekore/operator_matrix_elements/unpolarized/time_like/test_as1.py b/tests/ekore/operator_matrix_elements/unpolarized/time_like/test_as1.py index c5c224e82..ca9c7e4a3 100644 --- a/tests/ekore/operator_matrix_elements/unpolarized/time_like/test_as1.py +++ b/tests/ekore/operator_matrix_elements/unpolarized/time_like/test_as1.py @@ -17,3 +17,9 @@ def test_A_hg(): (2, complex(3, 3), 3), ]: np.testing.assert_almost_equal(ome_as1.A_hg(N, L), res[i]) + + +def test_A_gg(): + res = [-2 / 3, -4 / 3, -2] + for L in [1, 2, 3]: + np.testing.assert_equal(ome_as1.A_gg(L), res[L - 1]) From 0f93689d635ac4a7f53733125f5a55c8e62a3cc2 Mon Sep 17 00:00:00 2001 From: t7phy Date: Tue, 11 Apr 2023 16:52:44 +0200 Subject: [PATCH 19/22] add comment on SL A_gg --- src/ekore/operator_matrix_elements/unpolarized/time_like/as1.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ekore/operator_matrix_elements/unpolarized/time_like/as1.py b/src/ekore/operator_matrix_elements/unpolarized/time_like/as1.py index e52127349..527d262fd 100644 --- a/src/ekore/operator_matrix_elements/unpolarized/time_like/as1.py +++ b/src/ekore/operator_matrix_elements/unpolarized/time_like/as1.py @@ -44,6 +44,7 @@ def A_gg(L): r"""Compute the |NLO| gluon-gluon |OME|. Implements the Mellin transform of :eqref:`24` from :cite:`Cacciari:2005ry`. + It is identical to the one in :class:`~ekore.operator_matrix_elements.unpolarized.space_like.as1`. Parameters ---------- From cdc0ae0e2e56ece901e82c3aa10663e42aa0ccb4 Mon Sep 17 00:00:00 2001 From: t7phy Date: Tue, 11 Apr 2023 16:54:06 +0200 Subject: [PATCH 20/22] formatting changes --- .../operator_matrix_elements/unpolarized/time_like/as1.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ekore/operator_matrix_elements/unpolarized/time_like/as1.py b/src/ekore/operator_matrix_elements/unpolarized/time_like/as1.py index 527d262fd..9d5b0c032 100644 --- a/src/ekore/operator_matrix_elements/unpolarized/time_like/as1.py +++ b/src/ekore/operator_matrix_elements/unpolarized/time_like/as1.py @@ -43,8 +43,10 @@ def A_hg(N, L): def A_gg(L): r"""Compute the |NLO| gluon-gluon |OME|. - Implements the Mellin transform of :eqref:`24` from :cite:`Cacciari:2005ry`. - It is identical to the one in :class:`~ekore.operator_matrix_elements.unpolarized.space_like.as1`. + Implements the Mellin transform of + :eqref:`24` from :cite:`Cacciari:2005ry`. + It is identical to the one in + :class:`~ekore.operator_matrix_elements.unpolarized.space_like.as1`. Parameters ---------- From b7531f164b02371d344ee893771224ec3a8e8e43 Mon Sep 17 00:00:00 2001 From: t7phy Date: Wed, 19 Apr 2023 23:38:53 +0200 Subject: [PATCH 21/22] use as1 matching conditions for nnlo ADs --- .../unpolarized/time_like/__init__.py | 14 ++++++++------ .../unpolarized/time_like/test_init.py | 2 ++ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/ekore/operator_matrix_elements/unpolarized/time_like/__init__.py b/src/ekore/operator_matrix_elements/unpolarized/time_like/__init__.py index 6eecc372c..edde304f5 100644 --- a/src/ekore/operator_matrix_elements/unpolarized/time_like/__init__.py +++ b/src/ekore/operator_matrix_elements/unpolarized/time_like/__init__.py @@ -25,10 +25,11 @@ def A_non_singlet(matching_order, N, L): non-singlet |OME| """ - if matching_order[0] > 1: - raise Exception("Time-like matching conditions are only known upto NLO") A_ns = np.zeros((matching_order[0], 2, 2), np.complex_) - A_ns[0] = as1.A_ns() + if matching_order[0] >= 1: + A_ns[0] = as1.A_ns() + if matching_order[0] == 2: + A_ns[1] = as1.A_ns() return A_ns @@ -51,8 +52,9 @@ def A_singlet(matching_order, N, L): singlet |OME| """ - if matching_order[0] > 1: - raise Exception("Time-like matching conditions are only known upto NLO") A_singlet = np.zeros((matching_order[0], 3, 3), np.complex_) - A_singlet[0] = as1.A_singlet(N, L) + if matching_order[0] >= 1: + A_singlet[0] = as1.A_singlet(N, L) + if matching_order[0] >= 2: + A_singlet[0] = as1.A_singlet(N, L) return A_singlet diff --git a/tests/ekore/operator_matrix_elements/unpolarized/time_like/test_init.py b/tests/ekore/operator_matrix_elements/unpolarized/time_like/test_init.py index 051274596..9ce5f3d2e 100644 --- a/tests/ekore/operator_matrix_elements/unpolarized/time_like/test_init.py +++ b/tests/ekore/operator_matrix_elements/unpolarized/time_like/test_init.py @@ -6,3 +6,5 @@ def test_shapes(): assert ome.A_singlet((1, 0), complex(0, 1), 0).shape == (1, 3, 3) assert ome.A_non_singlet((1, 0), complex(0, 1), 0).shape == (1, 2, 2) + assert ome.A_singlet((2, 0), complex(0, 1), 0).shape == (2, 3, 3) + assert ome.A_non_singlet((2, 0), complex(0, 1), 0).shape == (2, 2, 2) From a01e3ed603b15fa0301e6b58b7e9d51142c97c84 Mon Sep 17 00:00:00 2001 From: Tanishq Sharma <99052355+t7phy@users.noreply.github.com> Date: Thu, 20 Apr 2023 01:51:34 +0200 Subject: [PATCH 22/22] correct typos --- .../unpolarized/time_like/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ekore/operator_matrix_elements/unpolarized/time_like/__init__.py b/src/ekore/operator_matrix_elements/unpolarized/time_like/__init__.py index edde304f5..ff0c7e986 100644 --- a/src/ekore/operator_matrix_elements/unpolarized/time_like/__init__.py +++ b/src/ekore/operator_matrix_elements/unpolarized/time_like/__init__.py @@ -28,7 +28,7 @@ def A_non_singlet(matching_order, N, L): A_ns = np.zeros((matching_order[0], 2, 2), np.complex_) if matching_order[0] >= 1: A_ns[0] = as1.A_ns() - if matching_order[0] == 2: + if matching_order[0] >= 2: A_ns[1] = as1.A_ns() return A_ns @@ -56,5 +56,5 @@ def A_singlet(matching_order, N, L): if matching_order[0] >= 1: A_singlet[0] = as1.A_singlet(N, L) if matching_order[0] >= 2: - A_singlet[0] = as1.A_singlet(N, L) + A_singlet[1] = as1.A_singlet(N, L) return A_singlet