Skip to content

Commit

Permalink
more work on slitting the fl11 coeffs
Browse files Browse the repository at this point in the history
  • Loading branch information
giacomomagni committed Apr 25, 2024
1 parent 03ab387 commit d76b52a
Show file tree
Hide file tree
Showing 9 changed files with 74 additions and 40 deletions.
3 changes: 1 addition & 2 deletions src/yadism/coefficient_functions/coupling_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,7 @@ def switch_mode(quark):
# load linear coupling
g1, _ = switch_mode(abs(pid))

# compute traces
# TODO: do we care about skip_heavylight here ??
# compute trace
pids = range(1, nf + 1)
trace = 0
for quark in pids:
Expand Down
2 changes: 1 addition & 1 deletion src/yadism/coefficient_functions/kernels.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ def generate_single_flavor_light(esf, nf, ihq):
)

s_partons = {q: ch_av for q in [*pids, *(-q for q in pids)]}
# TODO: if we are N3LO need to add upp the fl11 diagrams
# TODO: if we are N3LO need to add up the fl11 diagrams
return (
Kernel(ns_partons, light_cfs.NonSinglet(esf, nf)),
Kernel({21: ch_av}, light_cfs.Gluon(esf, nf)),
Expand Down
6 changes: 3 additions & 3 deletions src/yadism/coefficient_functions/light/fl_cc.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def N3LO(self):
|ref| implements the difference between :eqref:`2.10`, and :eqref:`3.7`, :cite:`Davies:2016ruz`
"""
return RSL(
n3lo.xclns3p.clnm3a,
loc=n3lo.xclns3p.clnm3c,
args=dict(reg=[self.nf, 0]),
n3lo.xclns3p.clnm3a_fl2,
loc=n3lo.xclns3p.clnm3c_fl2,
args=dict(reg=[self.nf]),
)
18 changes: 14 additions & 4 deletions src/yadism/coefficient_functions/light/fl_nc.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,15 @@ def N3LO(self):
"""
|ref| implements :eqref:`8`, :cite:`vogt-flnc`.
"""
if self.is_fl11:
return RSL(
n3lo.xclns3p.clnp3a_fl11,
loc=n3lo.xclns3p.clnp3c_fl11,
args=dict(reg=[self.nf], loc=[self.nf]),
)
return RSL(
n3lo.xclns3p.clnp3a,
loc=n3lo.xclns3p.clnp3c,
n3lo.xclns3p.clnp3a_fl2,
loc=n3lo.xclns3p.clnp3c_fl2,
args=dict(reg=[self.nf], loc=[self.nf]),
)

Expand All @@ -51,7 +57,9 @@ def N3LO(self):
"""
|ref| implements :eqref:`10`, :cite:`vogt-flnc`.
"""
return RSL(n3lo.xclsg3p.clg3a, args=[self.nf])
if self.is_fl11:
return RSL(n3lo.xclsg3p.clg3a_fl11, args=[self.nf])
return RSL(n3lo.xclsg3p.clg3a_fl2, args=[self.nf])


class Singlet(pc.LightBase):
Expand All @@ -66,4 +74,6 @@ def N3LO(self):
"""
|ref| implements :eqref:`9`, :cite:`vogt-flnc`.
"""
return RSL(n3lo.xclsg3p.cls3a, args=[self.nf])
if self.is_fl11:
return RSL(n3lo.xclsg3p.cls3a_fl11, args=[self.nf])
return RSL(n3lo.xclsg3p.cls3a_fl2, args=[self.nf])
4 changes: 1 addition & 3 deletions src/yadism/coefficient_functions/light/kernels.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ def generate(esf, nf):
)
kernels_list = [ns, g, s]

# TODO: split coefficients in fl and g1 ...
# at N3LO we need to add also the fl11 diagrams
if 3 in esf.orders:
weights_fl11 = nc_weights(
Expand Down Expand Up @@ -153,8 +152,7 @@ def nc_weights(coupling_constants, Q2, nf, is_pv, skip_heavylight=False, is_fl11
else:
coupling = coupling_constants.get_weight

# TODO: do we need skipheavlylight here??
# TODO: do AA contribute for fl11 ??
# TODO: do AA contribute to fl11 ??
if is_fl11:
coupling = coupling_constants.get_fl11_weight
w = coupling(q, Q2, "VV", nf=nf) + coupling(q, Q2, "AA", nf=nf)
Expand Down
4 changes: 2 additions & 2 deletions src/yadism/coefficient_functions/light/n3lo/xc2ns3p.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

@nb.njit("f8(f8,f8[:])", cache=True)
def c2np3a_fl2(y, args):
"""The math:`f_{l2}`: regular piece of the non singlet coefficient."""
"""The math:`fl_{2}`: regular piece of the non singlet coefficient."""
nf = args[0]
dl = np.log(y)
dl1 = np.log(1.0 - y)
Expand Down Expand Up @@ -116,7 +116,7 @@ def c2ns3b_fl2(y, args):

@nb.njit("f8(f8,f8[:])", cache=True)
def c2np3c_fl2(y, args):
"""The math:`f_{l2}`: local piece of the non singlet coefficient."""
"""The math:`fl_{2}`: local piece of the non singlet coefficient."""
nf = args[0]
dl1 = np.log(1.0 - y)
res = (
Expand Down
6 changes: 3 additions & 3 deletions src/yadism/coefficient_functions/light/n3lo/xc2sg3p.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

@nb.njit("f8(f8,f8[:])", cache=True)
def c2s3a_fl2(y, args):
"""The math:`f_{l2}`: regular piece of the singlet coefficient."""
"""The math:`fl_{2}`: regular piece of the singlet coefficient."""
nf = args[0]
y1 = 1.0 - y
dl = np.log(y)
Expand Down Expand Up @@ -85,7 +85,7 @@ def c2s3c_fl11(y, args):

@nb.njit("f8(f8,f8[:])", cache=True)
def c2g3a_fl2(y, args):
"""The math:`f_{l2}`: regular piece of the gluon coefficient."""
"""The math:`fl_{2}`: regular piece of the gluon coefficient."""
nf = args[0]
yi = 1.0 / y
dl = np.log(y)
Expand Down Expand Up @@ -156,7 +156,7 @@ def c2g3a_fl11(y, args):

@nb.njit("f8(f8,f8[:])", cache=True)
def c2g3c_fl2(y, args):
"""The math:`f_{l2}`: local piece of the gluon coefficient."""
"""The math:`fl_{2}`: local piece of the gluon coefficient."""
nf = args[0]
res = 0.625 * nf
return res
31 changes: 20 additions & 11 deletions src/yadism/coefficient_functions/light/n3lo/xclns3p.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""Note, the factor `fl11` is disabled for charged currents according to `xcdiff3p.f`.
To generate `clnm3a,clnm3c` we follow `xcdiff3p.f` or the reference paper :cite:`Davies:2016ruz`
To generate `clnm3a_fl2,clnm3c_fl2` we follow `xcdiff3p.f` or the reference paper :cite:`Davies:2016ruz`
"""

import numba as nb
Expand All @@ -12,9 +12,9 @@


@nb.njit("f8(f8,f8[:])", cache=True)
def clnp3a(y, args):
def clnp3a_fl2(y, args):
"""The math:`fl_{2}`: regular piece of the non singlet coefficient."""
nf = args[0]
fl11 = args[1]
dl = np.log(y)
dl1 = np.log(1.0 - y)
li2 = nielsen(1, 1, y).real
Expand Down Expand Up @@ -59,8 +59,17 @@ def clnp3a(y, args):
)
* 64.0
* d81
+ fl11
* nf
)
return res


@nb.njit("f8(f8,f8[:])", cache=True)
def clnp3a_fl11(y, args):
"""The math:`fl_{11}`: regular piece of the non singlet coefficient."""
nf = args[0]
dl = np.log(y)
return (
nf
* (
(107.0 + 321.05 * y - 54.62 * y**2) * (1.0 - y)
- 26.717
Expand All @@ -71,21 +80,21 @@ def clnp3a(y, args):
)
* y
)
return res


@nb.njit("f8(f8,f8[:])", cache=True)
def clnp3c(y, args):
def clnp3c_fl2(y, args):
"""The math:`fl_{2}`: local piece of the non singlet coefficient."""
nf = args[0]
res = 0.113 + nf * 0.006
return res


@nb.njit("f8(f8,f8[:])", cache=True)
def clnm3a(y, args):
return clnp3a(y, args) - clq3dfp(y, args)
def clnm3a_fl2(y, args):
return clnp3a_fl2(y, args) - clq3dfp(y, args)


@nb.njit("f8(f8,f8[:])", cache=True)
def clnm3c(y, args):
return clnp3c(y, args)
def clnm3c_fl2(y, args):
return clnp3c_fl2(y, args)
40 changes: 29 additions & 11 deletions src/yadism/coefficient_functions/light/n3lo/xclsg3p.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@


@nb.njit("f8(f8,f8[:])", cache=True)
def cls3a(y, args):
def cls3a_fl2(y, args):
"""The math:`fl_{2}`: regular piece of the singlet coefficient."""
nf = args[0]
flps = args[1]
dl = np.log(y)
y1 = 1.0 - y
dl1 = np.log(1.0 - y)
Expand All @@ -31,6 +31,18 @@ def cls3a(y, args):
- 384.0 * d27 * dl**2
+ 40.239 / y * y1**2
)
res = nf * (cls31 + nf * cls32)
return res


@nb.njit("f8(f8,f8[:])", cache=True)
def cls3a_fl11(y, args):
"""The math:`fl_{11}`: regular piece of the singlet coefficient."""
# Note here the source file contains a typo and the
# proper color factor is flps = fls - fl, not just fls.
# see https://arxiv.org/pdf/hep-ph/0411112.pdf eq 9.
nf = args[0]
dl = np.log(y)
cls3F = (
(107.0 + 321.05 * y - 54.62 * y**2) * (1.0 - y)
- 26.717
Expand All @@ -39,17 +51,13 @@ def cls3a(y, args):
+ 9.773 * dl
+ y * dl * (363.8 + 68.32 * dl)
) * y
# Note here the source file contains a typo and the
# proper color factor is flps = fls - fl, not just fls.
# see https://arxiv.org/pdf/hep-ph/0411112.pdf eq 9.
res = nf * (cls31 + (flps) * cls3F + nf * cls32)
return res
return nf * cls3F


@nb.njit("f8(f8,f8[:])", cache=True)
def clg3a(y, args):
def clg3a_fl2(y, args):
"""The math:`fl_{11}`: regular piece of the gluon coefficient."""
nf = args[0]
flg = args[1]
dl = np.log(y)
y1 = 1.0 - y
dl1 = np.log(1.0 - y)
Expand All @@ -76,6 +84,17 @@ def clg3a(y, args):
+ 480.0 * d27 * dl**3
+ 88.5037 / y * y1
)
res = nf * (clg31 + nf * (clg32))
return res


@nb.njit("f8(f8,f8[:])", cache=True)
def clg3a_fl11(y, args):
"""The math:`fl_{11}`: regular piece of the gluon coefficient."""
nf = args[0]
dl = np.log(y)
y1 = 1.0 - y
dl1 = np.log(1.0 - y)
clg3F = (
(
-0.0105 * dl1**3
Expand All @@ -90,5 +109,4 @@ def clg3a(y, args):
- (15.40 - 2.201 * y) * y * dl**2
- (71.66 - 0.121 * y) * y * dl
)
res = nf * (clg31 + nf * (clg32 + flg * clg3F))
return res
return nf**2 * clg3F

0 comments on commit d76b52a

Please sign in to comment.