Skip to content

Commit

Permalink
Pass nl as an argument in qed beta functions
Browse files Browse the repository at this point in the history
  • Loading branch information
niclaurenti committed Jan 9, 2024
1 parent f5bfb7d commit eb0004c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
16 changes: 7 additions & 9 deletions src/eko/beta.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def beta_qcd_as2(nf):


@nb.njit(cache=True)
def beta_qed_aem2(nf):
def beta_qed_aem2(nf, nl=3):
r"""Compute the first coefficient of the QED beta function.
Implements Eq. (7) of :cite:`Surguladze:1996hx`.
Expand All @@ -50,7 +50,6 @@ def beta_qed_aem2(nf):
"""
nu = constants.uplike_flavors(nf)
nd = nf - nu
nl = 3 # TODO : pass nl as an argument??
beta_qed_aem2 = (
-4.0 / 3 * (nl + constants.NC * (nu * constants.eu2 + nd * constants.ed2))
)
Expand Down Expand Up @@ -83,7 +82,7 @@ def beta_qcd_as3(nf):


@nb.njit(cache=True)
def beta_qed_aem3(nf):
def beta_qed_aem3(nf, nl=3):
r"""Compute the second coefficient of the QED beta function.
Implements Eq. (7) of :cite:`Surguladze:1996hx`.
Expand All @@ -101,7 +100,6 @@ def beta_qed_aem3(nf):
"""
nu = constants.uplike_flavors(nf)
nd = nf - nu
nl = 3 # TODO : pass nl as an argument??
beta_qed_aem3 = -4.0 * (
nl + constants.NC * (nu * constants.eu2**2 + nd * constants.ed2**2)
)
Expand Down Expand Up @@ -246,7 +244,7 @@ def beta_qcd(k, nf):


@nb.njit(cache=True)
def beta_qed(k, nf):
def beta_qed(k, nf, nl=3):
r"""Compute value of a beta_qed coefficients.
Parameters
Expand All @@ -264,9 +262,9 @@ def beta_qed(k, nf):
"""
beta_ = 0
if k == (0, 2):
beta_ = beta_qed_aem2(nf)
beta_ = beta_qed_aem2(nf, nl)
elif k == (0, 3):
beta_ = beta_qed_aem3(nf)
beta_ = beta_qed_aem3(nf, nl)
elif k == (1, 2):
beta_ = beta_qed_aem2as1(nf)
else:
Expand Down Expand Up @@ -295,7 +293,7 @@ def b_qcd(k, nf):


@nb.njit(cache=True)
def b_qed(k, nf):
def b_qed(k, nf, nl=3):
r"""Compute b_qed coefficient.
Parameters
Expand All @@ -311,4 +309,4 @@ def b_qed(k, nf):
b_qed_k(nf)
"""
return beta_qed(k, nf) / beta_qed((0, 2), nf)
return beta_qed(k, nf, nl) / beta_qed((0, 2), nf, nl)
2 changes: 0 additions & 2 deletions src/eko/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,6 @@ def uplike_flavors(nf):
nu : int
"""
if nf not in range(2, 6 + 1):
raise NotImplementedError("Selected nf is not implemented")
nu = nf // 2
return nu

Expand Down

0 comments on commit eb0004c

Please sign in to comment.