-
Notifications
You must be signed in to change notification settings - Fork 3
X space conversion of the N3LO matching #444
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
Merged
+3,056
−0
Merged
Changes from 10 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
39c0b77
init xspace converter
giacomomagni 8f6c81f
improve saving methods
giacomomagni 8b1e00c
adding large-x expansion
giacomomagni 719f1f0
subtract large-n limit
giacomomagni acaf4d8
expand docs
giacomomagni 20e5703
fix minus sign and larger grid
giacomomagni 274487f
add a test to see the accuracy
giacomomagni e3101cb
fix qq limit and 5% accuracy, Hg not working
giacomomagni c474d1e
mathemetica notebook
giacomomagni ee8f533
fix cast to interpolation
giacomomagni e9ccce8
Track ome interp output dir
felixhekhorn 5298647
Update extras/ome_n3lo/large_n_limit.py
giacomomagni 1a5f1d4
Update extras/ome_n3lo/convert_ome_xspace.py
giacomomagni a95dcec
Update extras/ome_n3lo/convert_ome_xspace.py
giacomomagni 00fad3a
apply comments
giacomomagni 1723ef0
Update extras/ome_n3lo/large_n_limit.py
giacomomagni 07e8bf3
minor fixes
giacomomagni ffa351c
pre-commit
giacomomagni File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
*.f | ||
*.txt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
"""Dump a fast x-space grid of the N3LO transition matrix elements. | ||
The output file have the structure: x_grid, nf=3, nf=4, nf=5. | ||
""" | ||
|
||
import numpy as np | ||
from click import progressbar | ||
from eko.mellin import Path | ||
from ekore.harmonics import cache as c | ||
from ekore.operator_matrix_elements.unpolarized.space_like import as3 | ||
from eko.interpolation import lambertgrid | ||
from scipy import integrate | ||
|
||
from large_n_limit import Agg_asymptotic, Aqq_asymptotic | ||
|
||
XGRID = lambertgrid(500, 1e-6) | ||
"""X-grid.""" | ||
|
||
LOG = 0 | ||
"""Matching threshold displaced ?""" | ||
giacomomagni marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
MAP_ENTRIES = { | ||
"gg": (0, 0), | ||
"gq": (0, 1), | ||
"qg": (1, 0), | ||
"qq": (1, 1), | ||
"Hg": (2, 0), | ||
"Hq": (2, 1), | ||
"gH": (0, 2), | ||
"HH": (2, 2), | ||
"qq_ns": (0, 0), | ||
} | ||
|
||
|
||
def compute_ome(nf, n, is_singlet): | ||
"""Get the correct ome from eko.""" | ||
cache = c.reset() | ||
if is_singlet: | ||
return as3.A_singlet(n, cache, nf, L=0) | ||
else: | ||
return as3.A_ns(n, cache, nf, L=0) | ||
|
||
|
||
def compute_xspace_ome(entry, nf, x_grid=XGRID): | ||
"""Compute the x-space transition matrix element, returns A^3(x).""" | ||
mellin_cut = 5e-2 | ||
giacomomagni marked this conversation as resolved.
Show resolved
Hide resolved
|
||
is_singlet = "ns" not in entry | ||
|
||
def integrand(u, x): | ||
"""Mellin inversion integrand.""" | ||
path = Path(u, np.log(x), is_singlet) | ||
integrand = path.prefactor * x ** (-path.n) * path.jac | ||
if integrand == 0.0: | ||
giacomomagni marked this conversation as resolved.
Show resolved
Hide resolved
|
||
return 0.0 | ||
|
||
# compute the N space ome | ||
ome_n = compute_ome(nf, path.n, is_singlet) | ||
idx1, idx2 = MAP_ENTRIES[entry] | ||
ome_n = ome_n[idx1, idx2] | ||
# subtract the large-N limit for diagonal terms (ie local and singular bits) | ||
if entry in ["qq_ns", "qq"]: | ||
ome_n -= Aqq_asymptotic(path.n, nf) | ||
elif entry == "gg": | ||
ome_n -= Agg_asymptotic(path.n, nf) | ||
|
||
# recombine everything | ||
return np.real(ome_n * integrand) | ||
|
||
ome_x = [] | ||
print(f"Computing operator matrix element {entry} @ pto: 3, nf: {nf}") | ||
# loop on xgrid | ||
with progressbar(x_grid) as bar: | ||
for x in bar: | ||
if x == 1: | ||
ome_x.append(0) | ||
continue | ||
res = integrate.quad( | ||
lambda u: integrand(u, x), | ||
felixhekhorn marked this conversation as resolved.
Show resolved
Hide resolved
|
||
0.5, | ||
1.0 - mellin_cut, | ||
epsabs=1e-12, | ||
epsrel=1e-6, | ||
limit=200, | ||
full_output=1, | ||
giacomomagni marked this conversation as resolved.
Show resolved
Hide resolved
|
||
)[0] | ||
ome_x.append(res) | ||
|
||
return np.array(ome_x) | ||
|
||
|
||
def save_files(entry, ome_x, xgrid=XGRID): | ||
"""Write the space reuslt in a txt file.""" | ||
fname = f"x_space/A_{entry}.txt" | ||
np.savetxt(fname, np.concatenate(([xgrid], np.array(ome_x))).T) | ||
|
||
|
||
if __name__ == "__main__": | ||
# non diagonal temrms | ||
for k in ["qq_ns", "gg", "gq", "qg", "qq", "Hg", "Hq"]: | ||
result = [compute_xspace_ome(k, nf) for nf in [3, 4, 5]] | ||
save_files(k, result) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
"""This file contains the large-N limit of the diagonal Matrix elements. | ||
|
||
The expansions are obtained using the notebook Agg_Aqq_largex_expansion.nb. | ||
|
||
We note that: | ||
* the limit og :math:`A_{qq}` is the same for non-singlet like and singlet-like expansions. | ||
I.e. the local and singular part are the same | ||
* the :math:`A_{qq,ps}` temr is vanishing in the large-x limit, i.e. it's only regular. | ||
giacomomagni marked this conversation as resolved.
Show resolved
Hide resolved
|
||
""" | ||
giacomomagni marked this conversation as resolved.
Show resolved
Hide resolved
|
||
from ekore.harmonics import S1 | ||
|
||
|
||
def Aqq_asymptotic(n, nf): | ||
"""The N3LO quark-to-quark transition matrix element large-N limit.""" | ||
return ( | ||
(20.362519064781296 - 3.4050138869326796 * nf) * S1(n) | ||
- 51.033843609253296 | ||
+ 3.1144841058729096 * nf | ||
) | ||
|
||
|
||
def Agg_asymptotic(n, nf): | ||
"""The N3LO gluon-to-gluon transition matrix element large-N limit. | ||
Follwing :cite:`Ablinger:2022wbb`: | ||
* the fist part contains the limit of eq. 2.6 (except for :math:`a_{gg}^{(3)}`) | ||
* the second part comes from eq. 4.6 and 4.7. | ||
""" | ||
Agg_asy_incomplete = ( | ||
(-669.1554507291286 + 41.84286985333757 * nf) * S1(n) | ||
- 565.4465327471261 | ||
+ 28.65462637880661 * nf | ||
) | ||
agg_asy = ( | ||
- 49.5041510989361 * (-14.442649813264895 + nf) * S1(n) | ||
+ 619.2420126046355 | ||
- 17.52475977636971 * nf | ||
) | ||
return agg_asy + Agg_asy_incomplete |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.