Skip to content

Commit

Permalink
add a test of fl11/fl2 ratios
Browse files Browse the repository at this point in the history
  • Loading branch information
giacomomagni committed May 2, 2024
1 parent 23bd478 commit f43d8b5
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/yadism/coefficient_functions/light/kernels.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def generate(esf, nf):
quark_fl11 = pcs.QuarkFL11(esf, nf)
weights_fl11 = nc_fl11_weights(esf.info.coupling_constants, esf.Q2, nf)
ns_fl11 = kernels.Kernel(
weights_fl11["ns"],
weights_fl11["q"],
quark_fl11,
)
g_fl11 = kernels.Kernel(weights_fl11["g"], gluon_fl11)
Expand Down Expand Up @@ -203,4 +203,4 @@ def nc_fl11_weights(coupling_constants, Q2, nf, skip_heavylight=False):
# NOTE: since here we are implementing the plain coupling
# Q1 * Tr[Q2] / nf, we have not decomposed the quark sector
# into singlet and non singlet for this class of diagrams
return {"ns": quark_partons, "g": {21: ch_av}}
return {"q": quark_partons, "g": {21: ch_av}}
46 changes: 46 additions & 0 deletions tests/yadism/cf/test_nc_kernels.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from eko.matchings import Atlas

from yadism import observable_name as on
from yadism.coefficient_functions import coupling_constants as cc
from yadism.coefficient_functions.asy import kernels as aker
from yadism.coefficient_functions.heavy import kernels as hker
from yadism.coefficient_functions.intrinsic import kernels as iker
Expand Down Expand Up @@ -93,6 +94,51 @@ def test_generate_heavy():
check(ps, w)


def test_nc_fl11_weights():
# Test the the flavor decomposition of the fl11 diagrams is the same as we get from
# the yadism implementation
th_d = dict(
SIN2TW=0.5,
MZ=80,
CKM="0.97428 0.22530 0.003470 0.22520 0.97345 0.041000 0.00862 0.04030 0.999152",
)
obs_d = dict(
projectilePID=11,
PolarizationDIS=0.0,
prDIS="EM",
PropagatorCorrection=0,
NCPositivityCharge=None,
)
coupl_const = cc.CouplingConstants.from_dict(th_d, obs_d)

Q2 = 1.0
mean_e = 0
mean_e2 = 0
for nf in range(1, 7):
fl11_weights = lker.nc_fl11_weights(coupl_const, Q2, nf)
fl2_weights = lker.nc_weights(coupl_const, Q2, nf, False)

# build rations to fl2
mean_e += coupl_const.electric_charge[nf]
mean_e2 += coupl_const.electric_charge[nf] ** 2
w3 = mean_e**2 / nf / mean_e2
w2 = 3 * mean_e / nf

# test gluon coupling
np.testing.assert_allclose(fl11_weights["g"][21], fl2_weights["g"][21] * w3)

# test the quark sector
# now need to sum over all the pids
q = 0
ns = 0
ps = 0
for pid, c in fl11_weights["q"].items():
ns += w2 * fl2_weights["ns"][pid]
ps += (w3 - w2) * fl2_weights["s"][pid]
q += c
np.testing.assert_allclose(ns + ps, q)


@pytest.mark.skip
def test_generate_light_fonll_diff_pc():
esf = MockESF("F2_light", 0.1, 10)
Expand Down

0 comments on commit f43d8b5

Please sign in to comment.