Skip to content

Commit

Permalink
update fhmv to be fhmruvv
Browse files Browse the repository at this point in the history
  • Loading branch information
giacomomagni committed Dec 27, 2023
1 parent 36c69f0 commit d7f2124
Show file tree
Hide file tree
Showing 19 changed files with 49 additions and 51 deletions.
6 changes: 3 additions & 3 deletions extras/lh_bench_23/cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
xif=1.0,
n3lo_ad_variation=(0, 0, 0, 0, 0, 0, 0),
matching_order=[2, 0],
use_fhmv=False,
use_fhmruvv=False,
)


Expand Down Expand Up @@ -69,7 +69,7 @@ def ffns_theory(xif=1.0):
return runcards.TheoryCard.from_dict(tt)


def n3lo_theory(ad_variation, is_ffns, use_fhmv=False, xif=1.0):
def n3lo_theory(ad_variation, is_ffns, use_fhmruvv=False, xif=1.0):
"""Generate an N3LO theory card."""
base = _t_ffns if is_ffns else _t_vfns
tt = copy.deepcopy(base)
Expand All @@ -78,7 +78,7 @@ def n3lo_theory(ad_variation, is_ffns, use_fhmv=False, xif=1.0):
# here we keep the NNLO matching
tt["matching_order"] = [2, 0]
tt["n3lo_ad_variation"] = ad_variation
tt["use_fhmv"] = use_fhmv
tt["use_fhmruvv"] = use_fhmruvv
return runcards.TheoryCard.from_dict(tt)


Expand Down
16 changes: 8 additions & 8 deletions src/eko/evolution_operator/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ def quad_ker(
n3lo_ad_variation,
is_polarized,
is_time_like,
use_fhmv,
use_fhmruvv,
):
"""Raw evolution kernel inside quad.
Expand Down Expand Up @@ -261,7 +261,7 @@ def quad_ker(
is polarized evolution ?
is_time_like : boolean
is time-like evolution ?
use_fhmv : bool
use_fhmruvv : bool
if True use the Falcioni Herzog Moch Vogt N3LO anomalous dimension
Returns
Expand Down Expand Up @@ -291,7 +291,7 @@ def quad_ker(
is_polarized,
is_time_like,
n3lo_ad_variation,
use_fhmv,
use_fhmruvv,
)
else:
ker = quad_ker_qed(
Expand Down Expand Up @@ -336,7 +336,7 @@ def quad_ker_qcd(
is_polarized,
is_time_like,
n3lo_ad_variation,
use_fhmv,
use_fhmruvv,
):
"""Raw evolution kernel inside quad.
Expand Down Expand Up @@ -370,7 +370,7 @@ def quad_ker_qcd(
is this an itermediate threshold operator?
n3lo_ad_variation : tuple
|N3LO| anomalous dimension variation ``(gg_var, gq_var, qg_var, qq_var, nsp_var, nsm_var, nsv_var)``
use_fhmv : bool
use_fhmruvv : bool
if True use the Falcioni Herzog Moch Vogt N3LO anomalous dimensions
Returns
Expand All @@ -390,7 +390,7 @@ def quad_ker_qcd(
gamma_singlet = ad_ut.gamma_singlet(order, ker_base.n, nf)
else:
gamma_singlet = ad_us.gamma_singlet(
order, ker_base.n, nf, n3lo_ad_variation, use_fhmv
order, ker_base.n, nf, n3lo_ad_variation, use_fhmruvv
)
# scale var exponentiated is directly applied on gamma
if sv_mode == sv.Modes.exponentiated:
Expand Down Expand Up @@ -424,7 +424,7 @@ def quad_ker_qcd(
gamma_ns = ad_ut.gamma_ns(order, mode0, ker_base.n, nf)
else:
gamma_ns = ad_us.gamma_ns(
order, mode0, ker_base.n, nf, n3lo_ad_variation, use_fhmv
order, mode0, ker_base.n, nf, n3lo_ad_variation, use_fhmruvv
)
if sv_mode == sv.Modes.exponentiated:
gamma_ns = sv.exponentiated.gamma_variation(gamma_ns, order, nf, L)
Expand Down Expand Up @@ -834,7 +834,7 @@ def quad_ker(self, label, logx, areas):
n3lo_ad_variation=self.config["n3lo_ad_variation"],
is_polarized=self.config["polarized"],
is_time_like=self.config["time_like"],
use_fhmv=self.config["use_fhmv"],
use_fhmruvv=self.config["use_fhmruvv"],
)

def initialize_op_members(self):
Expand Down
4 changes: 2 additions & 2 deletions src/eko/evolution_operator/grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def __init__(
atlas: Atlas,
couplings: Couplings,
interpol_dispatcher: InterpolatorDispatcher,
use_fhmv: bool,
use_fhmruvv: bool,
):
# check
config = {}
Expand All @@ -70,7 +70,7 @@ def __init__(
config["HQ"] = mass_scheme
config["ModSV"] = configs.scvar_method
config["n3lo_ad_variation"] = n3lo_ad_variation
config["use_fhmv"] = use_fhmv
config["use_fhmruvv"] = use_fhmruvv

for i, q in enumerate("cbt"):
config[f"m{q}"] = masses[i]
Expand Down
4 changes: 2 additions & 2 deletions src/eko/io/runcards.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class TheoryCard(DictLike):
"""Ratio between factorization scale and process scale."""
n3lo_ad_variation: N3LOAdVariation
"""|N3LO| anomalous dimension variation: ``(gg_var, gq_var, qg_var, qq_var, nsp_var, nsm_var, nsv_var)``."""
use_fhmv: Optional[bool] = False
use_fhmruvv: Optional[bool] = False
"""If True use the Falcioni Herzog Moch Vogt N3LO anomalous dimensions"""
matching_order: Optional[Order] = None
"""Matching conditions perturbative order tuple, ``(QCD, QED)``."""
Expand Down Expand Up @@ -223,7 +223,7 @@ def new_theory(self):
new["n3lo_ad_variation"] = old.get("n3lo_ad_variation", (0, 0, 0, 0, 0, 0, 0))
# here PTO: 0 means truly LO, no QED matching is available so far.
new["matching_order"] = old.get("PTO_matching", [old["PTO"], 0])
new["use_fhmv"] = old.get("use_fhmv", False)
new["use_fhmruvv"] = old.get("use_fhmruvv", False)
return TheoryCard.from_dict(new)

@property
Expand Down
2 changes: 1 addition & 1 deletion src/eko/runner/legacy.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def __init__(
couplings=cs,
interpol_dispatcher=bfd,
n3lo_ad_variation=new_theory.n3lo_ad_variation,
use_fhmv=new_theory.use_fhmv,
use_fhmruvv=new_theory.use_fhmruvv,
matching_order=new_theory.matching_order
if new_theory.matching_order is not None
else new_theory.order,
Expand Down
2 changes: 1 addition & 1 deletion src/eko/runner/parts.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def evolve_configs(eko: EKO) -> dict:
n_integration_cores=ocard.configs.n_integration_cores,
ModSV=ocard.configs.scvar_method,
n3lo_ad_variation=tcard.n3lo_ad_variation,
use_fhmv=tcard.use_fhmv,
use_fhmruvv=tcard.use_fhmruvv,
# Here order is shifted by one, no QED matching is available so far.
matching_order=tcard.matching_order,
)
Expand Down
2 changes: 1 addition & 1 deletion src/ekobox/cards.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
xif=1.0,
n3lo_ad_variation=(0, 0, 0, 0, 0, 0, 0),
matching_order=[0, 0],
use_fhmv=False,
use_fhmruvv=False,
)

_operator = dict(
Expand Down
20 changes: 10 additions & 10 deletions src/ekore/anomalous_dimensions/unpolarized/space_like/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@


@nb.njit(cache=True)
def gamma_ns(order, mode, n, nf, n3lo_ad_variation, use_fhmv=False):
def gamma_ns(order, mode, n, nf, n3lo_ad_variation, use_fhmruvv=False):
r"""Compute the tower of the non-singlet anomalous dimensions.
Parameters
Expand All @@ -40,7 +40,7 @@ def gamma_ns(order, mode, n, nf, n3lo_ad_variation, use_fhmv=False):
Number of active flavors
n3lo_ad_variation : tuple
|N3LO| anomalous dimension variation ``(gg_var, gq_var, qg_var, qq_var, nsp_var, nsm_var, nsv_var)``
use_fhmv: bool
use_fhmruvv: bool
if True use the Falcioni Herzog Moch Vogt N3LO anomalous dimensions
Returns
Expand Down Expand Up @@ -74,17 +74,17 @@ def gamma_ns(order, mode, n, nf, n3lo_ad_variation, use_fhmv=False):
gamma_ns[2] = gamma_ns_2
# N3LO
if order[0] >= 4:
if use_fhmv:
if use_fhmruvv:
if mode == 10101:
gamma_ns_3 = as4.fhmv_approximations.gamma_nsp(
gamma_ns_3 = as4.fhmruvv_approximations.gamma_nsp(
n, nf, cache, variation=n3lo_ad_variation[4]
)
elif mode == 10201:
gamma_ns_3 = as4.fhmv_approximations.gamma_nsm(
gamma_ns_3 = as4.fhmruvv_approximations.gamma_nsm(
n, nf, cache, variation=n3lo_ad_variation[5]
)
elif mode == 10200:
gamma_ns_3 = as4.fhmv_approximations.gamma_nsv(
gamma_ns_3 = as4.fhmruvv_approximations.gamma_nsv(
n, nf, cache, variation=n3lo_ad_variation[6]
)
else:
Expand All @@ -99,7 +99,7 @@ def gamma_ns(order, mode, n, nf, n3lo_ad_variation, use_fhmv=False):


@nb.njit(cache=True)
def gamma_singlet(order, n, nf, n3lo_ad_variation, use_fhmv=False):
def gamma_singlet(order, n, nf, n3lo_ad_variation, use_fhmruvv=False):
r"""Compute the tower of the singlet anomalous dimensions matrices.
Parameters
Expand All @@ -112,7 +112,7 @@ def gamma_singlet(order, n, nf, n3lo_ad_variation, use_fhmv=False):
Number of active flavors
n3lo_ad_variation : tuple
|N3LO| anomalous dimension variation ``(gg_var, gq_var, qg_var, qq_var, nsp_var, nsm_var, nsv_var)``
use_fhmv: bool
use_fhmruvv: bool
if True use the Falcioni Herzog Moch Vogt N3LO anomalous dimensions
Returns
Expand All @@ -129,8 +129,8 @@ def gamma_singlet(order, n, nf, n3lo_ad_variation, use_fhmv=False):
if order[0] >= 3:
gamma_s[2] = as3.gamma_singlet(n, nf, cache)
if order[0] >= 4:
if use_fhmv:
gamma_s[3] = as4.fhmv_approximations.gamma_singlet(
if use_fhmruvv:
gamma_s[3] = as4.fhmruvv_approximations.gamma_singlet(
n, nf, cache, n3lo_ad_variation
)
else:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import numba as nb
import numpy as np

from . import fhmv_approximations
from . import fhmruvv_approximations
from .ggg import gamma_gg
from .ggq import gamma_gq
from .gnsm import gamma_nsm
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""The |N3LO| Altarelli-Parisi splitting kernels, from Falcioni, Herzog, Moch, Vogt approximations.
"""
"""The |N3LO| Altarelli-Parisi splitting kernels, from Falcioni, Herzog, Moch, Ruijl, Ueda, Vermaseren, Vogt approximations."""
import numba as nb
import numpy as np

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from eko.constants import CF, zeta3

from ......harmonics import cache as c
from ......harmonics.log_functions import lm11, lm13m1, lm12m1, lm11m1
from ......harmonics.log_functions import lm11, lm11m1, lm12m1, lm13m1


@nb.njit(cache=True)
Expand Down Expand Up @@ -61,7 +61,7 @@ def gamma_nsm(n, nf, cache, variation):
- 254965.0 / (2 + n)
+ 83377.5 / (3 + n)
- 45750.0 / (4 + n)
+ (49150.0 * (6.803662258392675 + n) * S1) / (n**2* (1.0 + n))
+ (49150.0 * (6.803662258392675 + n) * S1) / (n**2 * (1.0 + n))
+ (334400.0 * S2) / n
)
P3NSA1 = (
Expand All @@ -79,7 +79,7 @@ def gamma_nsm(n, nf, cache, variation):
- 43057.8 / (2 + n)
+ 13803.8 / (3 + n)
- 7896.0 / (4 + n)
- (120.0 * (-525.063 + n) * S1) / (n**2* (1.0 + n))
- (120.0 * (-525.063 + n) * S1) / (n**2 * (1.0 + n))
+ (63007.5 * S2) / n
)

Expand Down Expand Up @@ -136,7 +136,7 @@ def gamma_nsm(n, nf, cache, variation):
# nf^2 (parametrized) and nf^3 (exact)
P3NSMA2 = -(
-193.84583328013258
-23.7037032 / n**5
- 23.7037032 / n**5
+ 117.5967 / n**4
- 256.5896 / n**3
+ 437.881 / n**2
Expand Down Expand Up @@ -176,7 +176,7 @@ def gamma_nsm(n, nf, cache, variation):
)

# Assembly regular piece.
P3NSMAI = P3NSA0 + nf * P3NSA1 + nf**3 * P3NSA3 + nf**2 * P3NSMA2
P3NSMAI = P3NSA0 + nf * P3NSA1 + nf**3 * P3NSA3 + nf**2 * P3NSMA2
if variation == 1:
P3NSMA = P3NSMAI + P3NMA01 + nf * P3NMA11
elif variation == 2:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from eko.constants import CF, zeta3

from ......harmonics import cache as c
from ......harmonics.log_functions import lm11, lm13m1, lm12m1, lm11m1
from ......harmonics.log_functions import lm11, lm11m1, lm12m1, lm13m1


@nb.njit(cache=True)
Expand Down Expand Up @@ -61,7 +61,7 @@ def gamma_nsp(n, nf, cache, variation):
- 254965.0 / (2 + n)
+ 83377.5 / (3 + n)
- 45750.0 / (4 + n)
+ (49150.0 * (6.803662258392675 + n) * S1) / (n**2* (1.0 + n))
+ (49150.0 * (6.803662258392675 + n) * S1) / (n**2 * (1.0 + n))
+ (334400.0 * S2) / n
)
P3NSA1 = (
Expand All @@ -79,7 +79,7 @@ def gamma_nsp(n, nf, cache, variation):
- 43057.8 / (2 + n)
+ 13803.8 / (3 + n)
- 7896.0 / (4 + n)
- (120.0 * (-525.063 + n) * S1) / (n**2* (1.0 + n))
- (120.0 * (-525.063 + n) * S1) / (n**2 * (1.0 + n))
+ (63007.5 * S2) / n
)

Expand Down Expand Up @@ -143,7 +143,7 @@ def gamma_nsp(n, nf, cache, variation):
# nf^2 (parametrized) and nf^3 (exact)
P3NSPA2 = -(
-193.85906555742952
-18.962964 / n**5
- 18.962964 / n**5
+ 99.1605 / n**4
- 225.141 / n**3
+ 393.0056000000001 / n**2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
import numba as nb

from ......harmonics import cache as c
from ......harmonics.log_functions import lm13m1, lm12m1, lm11m1

from ......harmonics.log_functions import lm11m1, lm12m1, lm13m1
from .gnsm import gamma_nsm


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import numpy as np

from ......harmonics import cache as c
from ......harmonics.log_functions import lm11, lm12, lm13, lm14, lm15, lm14m1, lm15m1
from ......harmonics.log_functions import lm11, lm12, lm13, lm14, lm14m1, lm15, lm15m1


@nb.njit(cache=True)
Expand Down
10 changes: 5 additions & 5 deletions tests/eko/evolution_operator/test_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def test_quad_ker_errors():
is_polarized=True,
is_time_like=True,
n3lo_ad_variation=(0, 0, 0, 0, 0, 0, 0),
use_fhmv=False,
use_fhmruvv=False,
)


Expand Down Expand Up @@ -96,7 +96,7 @@ def test_quad_ker(monkeypatch):
is_polarized=p,
is_time_like=t,
n3lo_ad_variation=(0, 0, 0, 0, 0, 0, 0),
use_fhmv=False,
use_fhmruvv=False,
)
np.testing.assert_allclose(res_ns, res)
for label in [(br.non_singlet_pids_map["ns+"], 0), (100, 100)]:
Expand Down Expand Up @@ -125,7 +125,7 @@ def test_quad_ker(monkeypatch):
is_polarized=polarized,
is_time_like=False,
n3lo_ad_variation=(0, 0, 0, 0, 0, 0, 0),
use_fhmv=False,
use_fhmruvv=False,
)
np.testing.assert_allclose(res_sv, 1.0)
for label in [
Expand Down Expand Up @@ -161,7 +161,7 @@ def test_quad_ker(monkeypatch):
n3lo_ad_variation=(0, 0, 0, 0, 0, 0, 0),
is_polarized=False,
is_time_like=False,
use_fhmv=False,
use_fhmruvv=False,
)
np.testing.assert_allclose(res_sv, 1.0)

Expand Down Expand Up @@ -189,7 +189,7 @@ def test_quad_ker(monkeypatch):
n3lo_ad_variation=(0, 0, 0, 0, 0, 0, 0),
is_polarized=False,
is_time_like=False,
use_fhmv=False,
use_fhmruvv=False,
)
np.testing.assert_allclose(res_ns, 0.0)

Expand Down
Loading

0 comments on commit d7f2124

Please sign in to comment.