-
Notifications
You must be signed in to change notification settings - Fork 7
LO polarised anomalous dimension #170
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
Changes from all commits
4216e83
38d624a
e4a6cb5
9c19587
a813e69
ec9a750
d92b481
6bc0cd3
a86b91c
7994f7f
415d27f
b6bc093
120d024
027b07e
4197e7d
a39b41d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,6 +8,7 @@ | |
| from . import as1 | ||
|
|
||
|
|
||
|
|
||
| @nb.njit(cache=True) | ||
| def gamma_phq(N): | ||
| """ | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,127 @@ | ||
| # -*- coding: utf-8 -*- | ||
| """This file contains the leading-order polarised Altarelli-Parisi splitting kernels.""" | ||
|
|
||
| import numba as nb | ||
| import numpy as np | ||
|
|
||
| from .. import constants | ||
| from .as1 import gamma_ns as gamma_pns | ||
|
|
||
| # @nb.njit(cache=True) | ||
| # def gamma_pns(N, s1): | ||
| # Computes the leading-order non-singlet anomalous dimension for the polarised case. | ||
| # This is going to be the same expression as the one for the unpolarised case. | ||
|
|
||
| # gamma = -(3.0 - 4.0 * s1 + 2.0 / N / (N + 1.0)) | ||
| # result = constants.CF * gamma | ||
| # return result | ||
|
|
||
|
|
||
| @nb.njit(cache=True) | ||
| def gamma_pqg(N, nf): | ||
| """ | ||
| Computes the leading-order polarised quark-gluon anomalous dimension | ||
| #requires citation | ||
|
|
||
| Parameters | ||
| ---------- | ||
| N : complex | ||
| Mellin moment | ||
| nf : int | ||
| Number of active flavors | ||
|
|
||
| Returns | ||
| ------- | ||
| gamma_qg : complex | ||
| Leading-order polarised quark-gluon anomalous dimension :math:`\\gamma_{qg}^{(0)}(N)` | ||
| """ | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is more targeted to @felixhekhorn: I propose to drop With "interface" I mean the io = parameters + returns
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is not so trivial, since many of the higher order functions require a non-trivial combination of S-es
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But they were getting access to an S-cache, isn't it?
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. However, in case they are variables, we can agree on a naming scheme for them. Once they adhere to the naming scheme, they do not need to be documented one by one. |
||
| gamma = -(N - 1) / N / (N + 1) | ||
| result = 2.0 * constants.TR * 2.0 * nf * gamma | ||
| return result | ||
|
|
||
|
|
||
| @nb.njit(cache=True) | ||
| def gamma_pgq(N): | ||
| """ | ||
| Computes the leading-order polarised gluon-quark anomalous dimension | ||
|
|
||
|
|
||
| Parameters | ||
| ---------- | ||
| N : complex | ||
| Mellin moment | ||
|
|
||
| Returns | ||
| ------- | ||
| gamma_gq : complex | ||
| Leading-order gluon-quark anomalous dimension :math:`\\gamma_{gq}^{(0)}(N)` | ||
| """ | ||
| gamma = -(N + 2) / N / (N + 1) | ||
| result = 2.0 * constants.CF * gamma | ||
| return result | ||
|
|
||
|
|
||
| @nb.njit(cache=True) | ||
| def gamma_pgg(N, s1, nf): | ||
| """ | ||
| Computes the leading-order polarised gluon-gluon anomalous dimension | ||
|
|
||
|
|
||
| Parameters | ||
| ---------- | ||
| N : complex | ||
| Mellin moment | ||
| s1 : complex | ||
| harmonic sum :math:`S_{1}` | ||
| nf : int | ||
| Number of active flavors | ||
|
|
||
| Returns | ||
| ------- | ||
| gamma_gg : complex | ||
| Leading-order gluon-gluon anomalous dimension :math:`\\gamma_{gg}^{(0)}(N)` | ||
| """ | ||
| gamma = s1 - 2 / N / (N + 1) | ||
| result = constants.CA * (4.0 * gamma - 11.0 / 3.0) + 4.0 / 3.0 * constants.TR * nf | ||
| return result | ||
|
|
||
|
|
||
|
|
||
| @nb.njit(cache=True) | ||
| def gamma_psinglet(N, s1, nf): | ||
| r""" | ||
| Computes the leading-order polarised singlet anomalous dimension matrix | ||
|
|
||
| .. math:: | ||
| \gamma_S^{(0)} = \left(\begin{array}{cc} | ||
| \gamma_{qq}^{(0)} & \gamma_{qg}^{(0)}\\ | ||
| \gamma_{gq}^{(0)} & \gamma_{gg}^{(0)} | ||
| \end{array}\right) | ||
|
|
||
| Parameters | ||
| ---------- | ||
| N : complex | ||
| Mellin moment | ||
| s1 : complex | ||
| harmonic sum :math:`S_{1}` | ||
| nf : int | ||
| Number of active flavors | ||
|
|
||
| Returns | ||
| ------- | ||
| gamma_S_0 : numpy.ndarray | ||
| Leading-order singlet anomalous dimension matrix :math:`\gamma_{S}^{(0)}(N)` | ||
|
|
||
| See Also | ||
| -------- | ||
| gamma_ns : :math:`\gamma_{qq}^{(0)}` | ||
| gamma_qg : :math:`\gamma_{qg}^{(0)}` | ||
| gamma_gq : :math:`\gamma_{gq}^{(0)}` | ||
| gamma_gg : :math:`\gamma_{gg}^{(0)}` | ||
| """ | ||
| gamma_pqq = gamma_pns(N, s1) | ||
| gamma_pS_0 = np.array( | ||
| [[gamma_pqq, gamma_pqg(N, nf)], [gamma_pgq(N), gamma_pgg(N, s1, nf)]], | ||
| np.complex_, | ||
| ) | ||
| return gamma_pS_0 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,15 +11,14 @@ | |
|
|
||
| import numba as nb | ||
| import numpy as np | ||
| from scipy import integrate | ||
|
|
||
| from .. import anomalous_dimensions as ad | ||
| from .. import basis_rotation as br | ||
| from .. import interpolation, mellin | ||
| from .. import scale_variations as sv | ||
| from ..kernels import non_singlet as ns | ||
| from ..kernels import singlet as s | ||
| from ..member import OpMember | ||
| from scipy import integrate | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
pre-commit installin the local instance of your repository. |
||
|
|
||
| logger = logging.getLogger(__name__) | ||
|
|
||
|
|
@@ -84,7 +83,7 @@ def path(self): | |
|
|
||
| @property | ||
| def n(self): | ||
| """Returs the Mellin moment :math:`N`.""" | ||
| """Return the Mellin moment :math:`N`.""" | ||
| return self.path.n | ||
|
|
||
| def integrand( | ||
|
|
@@ -125,6 +124,7 @@ def quad_ker( | |
| as0, | ||
| as_raw, | ||
| nf, | ||
| p, | ||
| L, | ||
| ev_op_iterations, | ||
| ev_op_max_order, | ||
|
|
@@ -159,6 +159,8 @@ def quad_ker( | |
| coupling value at the process scale | ||
| nf : int | ||
| number of active flavors | ||
| p : Boolean | ||
| Polarised (True) or un-Polarised (False) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unfortunately I believe that introducing a boolean is the correct way at the moment (or equally bad to introducing a parallel dispatcher), but eventually I believe we want to get rid of dispatchers at all, at least not keep using them as they are meant now (as a single entry point for Numba). This will be addressed by refactoring after the analogue of #123 will be implemnted. |
||
| L : float | ||
| logarithm of the squared ratio of factorization and renormalization scale | ||
| ev_op_iterations : int | ||
|
|
@@ -182,7 +184,7 @@ def quad_ker( | |
|
|
||
| # compute the actual evolution kernel | ||
| if ker_base.is_singlet: | ||
| gamma_singlet = ad.gamma_singlet(order, ker_base.n, nf) | ||
| gamma_singlet = ad.gamma_singlet(order, ker_base.n, nf, p) | ||
| # scale var exponentiated is directly applied on gamma | ||
| if sv_mode == sv.Modes.exponentiated: | ||
| gamma_singlet = sv.exponentiated.gamma_variation( | ||
|
|
@@ -198,14 +200,14 @@ def quad_ker( | |
| ev_op_iterations, | ||
| ev_op_max_order, | ||
| ) | ||
| # scale var expanded is applied on the kernel | ||
|
|
||
| if sv_mode == sv.Modes.expanded and not is_threshold: | ||
| ker = np.ascontiguousarray( | ||
| sv.expanded.singlet_variation(gamma_singlet, as_raw, order, nf, L) | ||
| ) @ np.ascontiguousarray(ker) | ||
| ker = select_singlet_element(ker, mode0, mode1) | ||
| else: | ||
| gamma_ns = ad.gamma_ns(order, mode0, ker_base.n, nf) | ||
| gamma_ns = ad.gamma_ns(order, mode0, ker_base.n, nf, p) | ||
| if sv_mode == sv.Modes.exponentiated: | ||
| gamma_ns = sv.exponentiated.gamma_variation(gamma_ns, order, nf, L) | ||
| ker = ns.dispatcher( | ||
|
|
@@ -254,7 +256,14 @@ class Operator(sv.ModeMixin): | |
| full_labels = br.full_labels | ||
|
|
||
| def __init__( | ||
| self, config, managers, nf, q2_from, q2_to, mellin_cut=5e-2, is_threshold=False | ||
| self, | ||
| config, | ||
| managers, | ||
| nf, | ||
| q2_from, | ||
| q2_to, | ||
| mellin_cut=5e-2, | ||
| is_threshold=False, | ||
| ): | ||
| self.config = config | ||
| self.managers = managers | ||
|
|
@@ -377,7 +386,8 @@ def quad_ker(self, label, logx, areas): | |
| as0=self.a_s[0], | ||
| as_raw=self.a_s[2], | ||
| nf=self.nf, | ||
| L=np.log(self.xif2), | ||
| p=self.config["p"], | ||
| L=np.log(self.fact_to_ren), | ||
| ev_op_iterations=self.config["ev_op_iterations"], | ||
| ev_op_max_order=tuple(self.config["ev_op_max_order"]), | ||
| sv_mode=self.sv_mode, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.