Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add luminosity channels #1762

Merged
merged 2 commits into from
Jun 22, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion validphys2/examples/pdf_lumi_plots.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ pdf: {id: "NNPDF40_nlo_as_01180", label: "4.0 NLO"}
sqrts: 13000 # GeV

lumi_channel: "gg" # one of [gg, gq, qqbar, qq, ddbar, uubar, ssbar,
# ccbar, bbbar, dubar, udbar, scbar, csbar, pp, gp]
# ccbar, bbbar, dubar, udbar, scbar, csbar, pp, gp,
# wlum, zlum]
Zaharid marked this conversation as resolved.
Show resolved Hide resolved

PDFscalespecs:
- xscale: log
Expand Down
30 changes: 27 additions & 3 deletions validphys2/src/validphys/gridvalues.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
'csbar': r'c\bar{s}',
'pp': r'\gamma\gamma',
'gp': r'g\gamma',
'zlum': r'u\bar{u} + d\bar{d}',
'wlum': r'u\bar{d} + d\bar{u}',
Zaharid marked this conversation as resolved.
Show resolved Hide resolved
}

QUARK_COMBINATIONS = {
Expand Down Expand Up @@ -115,6 +117,15 @@ def central_grid_values(pdf: PDF, flmat, xmat, qmat):
# TODO: Investigate writting these in cython/cffi/numba/...


def _parton_pair_lumi_inner(pdf_set, n, mx, x1, x2, i, j):
"""Helper to evaluate lumis for pairs of partons."""
# fmt: off
return (
pdf_set.xfxQ(x1, mx, n, i)*pdf_set.xfxQ(x2, mx, n, j) +
pdf_set.xfxQ(x1, mx, n, j)*pdf_set.xfxQ(x2, mx, n, i)
)


def evaluate_luminosity(
pdf_set: LHAPDFSet, n: int, s: float, mx: float, x1: float, x2: float, channel
):
Expand Down Expand Up @@ -155,11 +166,24 @@ def evaluate_luminosity(

# as in the second of Eq.(4) in arXiv:1607.01831
res = sum(a*b for a,b in itertools.product(r1,r2))
elif channel == 'zlum':
Zaharid marked this conversation as resolved.
Show resolved Hide resolved
u, ubar = 2, -2
d, dbar = -1, 1
res = (
_parton_pair_lumi_inner(pdf_set=pdf_set, n=n, mx=mx, x1=x1, x2=x2, i=u, j=ubar) +
_parton_pair_lumi_inner(pdf_set=pdf_set, n=n, mx=mx, x1=x1, x2=x2, i=d, j=dbar)
)
elif channel == 'wlum':
Zaharid marked this conversation as resolved.
Show resolved Hide resolved
u, dbar = 2, -1
d, ubar = 1, -2
res = (
_parton_pair_lumi_inner(pdf_set=pdf_set, n=n, mx=mx, x1=x1, x2=x2, i=u, j=dbar) +
_parton_pair_lumi_inner(pdf_set=pdf_set, n=n, mx=mx, x1=x1, x2=x2, i=d, j=ubar)
)
Zaharid marked this conversation as resolved.
Show resolved Hide resolved

elif channel in QUARK_COMBINATIONS.keys():
i, j = QUARK_COMBINATIONS[channel]
res = (pdf_set.xfxQ(x1, mx, n, i) * pdf_set.xfxQ(x2, mx, n, j)
+ pdf_set.xfxQ(x1, mx, n, j) * pdf_set.xfxQ(x2, mx, n, i))

res = _parton_pair_lumi_inner(pdf_set=pdf_set, n=n, mx=mx, x1=x1, x2=x2, i=i, j=j)
else:
raise ValueError("Bad channel")
# fmt: on
Expand Down