From 880d7aa4904cdb7d3aec6008c22183a7665757fc Mon Sep 17 00:00:00 2001 From: Felix Hekhorn Date: Thu, 18 Jul 2024 18:00:28 +0300 Subject: [PATCH] rust: Update docs --- crates/ekore/src/anomalous_dimensions.rs | 2 +- .../unpolarized/spacelike/as1.rs | 2 +- .../unpolarized/spacelike/as2.rs | 2 +- .../unpolarized/spacelike/as3.rs | 2 +- crates/ekore/src/constants.rs | 6 ++-- crates/ekore/src/lib.rs | 2 +- crates/ekore/src/operator_matrix_elements.rs | 2 +- .../unpolarized/spacelike/as1.rs | 30 ++++++++----------- crates/ekore/src/util.rs | 2 +- 9 files changed, 23 insertions(+), 27 deletions(-) diff --git a/crates/ekore/src/anomalous_dimensions.rs b/crates/ekore/src/anomalous_dimensions.rs index 6a395d982..55a4dad43 100644 --- a/crates/ekore/src/anomalous_dimensions.rs +++ b/crates/ekore/src/anomalous_dimensions.rs @@ -1,3 +1,3 @@ -//! The anomalous dimensions for DGLAP evolution. +//! The anomalous dimensions for |DGLAP| evolution. pub mod unpolarized; diff --git a/crates/ekore/src/anomalous_dimensions/unpolarized/spacelike/as1.rs b/crates/ekore/src/anomalous_dimensions/unpolarized/spacelike/as1.rs index 71e285ea9..7882227d3 100644 --- a/crates/ekore/src/anomalous_dimensions/unpolarized/spacelike/as1.rs +++ b/crates/ekore/src/anomalous_dimensions/unpolarized/spacelike/as1.rs @@ -1,4 +1,4 @@ -//! LO QCD +//! |LO| |QCD|. use num::complex::Complex; diff --git a/crates/ekore/src/anomalous_dimensions/unpolarized/spacelike/as2.rs b/crates/ekore/src/anomalous_dimensions/unpolarized/spacelike/as2.rs index b2b16459c..195f69fec 100644 --- a/crates/ekore/src/anomalous_dimensions/unpolarized/spacelike/as2.rs +++ b/crates/ekore/src/anomalous_dimensions/unpolarized/spacelike/as2.rs @@ -1,4 +1,4 @@ -//! NLO QCD +//! |NLO| |QCD|. use ::num::complex::Complex; use std::f64::consts::LN_2; diff --git a/crates/ekore/src/anomalous_dimensions/unpolarized/spacelike/as3.rs b/crates/ekore/src/anomalous_dimensions/unpolarized/spacelike/as3.rs index 14354f736..e9506b2ea 100644 --- a/crates/ekore/src/anomalous_dimensions/unpolarized/spacelike/as3.rs +++ b/crates/ekore/src/anomalous_dimensions/unpolarized/spacelike/as3.rs @@ -1,4 +1,4 @@ -//! NNLO QCD +//! |NNLO| |QCD|. use ::num::complex::Complex; use num::traits::Pow; diff --git a/crates/ekore/src/constants.rs b/crates/ekore/src/constants.rs index c824bdf5a..8cb90eb1f 100644 --- a/crates/ekore/src/constants.rs +++ b/crates/ekore/src/constants.rs @@ -33,11 +33,11 @@ pub const ZETA3: f64 = 1.2020569031595942; /// $\zeta(4) = \pi^4 / 90$. pub const ZETA4: f64 = 1.082323233711138; -/// singlet-like non-singlet PID +/// singlet-like non-singlet |PID|. pub const PID_NSP: u16 = 10101; -/// valence-like non-singlet PID +/// valence-like non-singlet |PID|. pub const PID_NSM: u16 = 10201; -/// non-singlet all-valence PID +/// non-singlet all-valence |PID|. pub const PID_NSV: u16 = 10200; diff --git a/crates/ekore/src/lib.rs b/crates/ekore/src/lib.rs index f26ce2a4e..db937583d 100644 --- a/crates/ekore/src/lib.rs +++ b/crates/ekore/src/lib.rs @@ -1,4 +1,4 @@ -//! Library for anomalous dimension in DGLAP and transition matrix elements. +//! Library for anomalous dimension in |DGLAP| and |OME|. // Let's stick to the original names which often come from FORTRAN, where such convention do not exists #![allow(non_snake_case)] diff --git a/crates/ekore/src/operator_matrix_elements.rs b/crates/ekore/src/operator_matrix_elements.rs index 6c7db5178..98d3cc3b7 100644 --- a/crates/ekore/src/operator_matrix_elements.rs +++ b/crates/ekore/src/operator_matrix_elements.rs @@ -1,3 +1,3 @@ -//! Operator matrix elements. +//! The |OME|. pub mod unpolarized; diff --git a/crates/ekore/src/operator_matrix_elements/unpolarized/spacelike/as1.rs b/crates/ekore/src/operator_matrix_elements/unpolarized/spacelike/as1.rs index 00df9a231..0e5145d61 100644 --- a/crates/ekore/src/operator_matrix_elements/unpolarized/spacelike/as1.rs +++ b/crates/ekore/src/operator_matrix_elements/unpolarized/spacelike/as1.rs @@ -1,19 +1,15 @@ -//! NLO QCD -//! -//! Heavy quark contribution for intrinsic evolution are taken from [\[Ball:2015tna\]](crate::bib::Ball2015tna). -//! and Mellin transformed with Mathematica. -//! The other matching conditions for the VFNS at $\mu_F^2 \neq m_H^2$ -//! are provided in [\[Buza:1996wv\]](crate::bib::Buza1996wv). +//! |NLO| |QCD| use num::complex::Complex; use num::Zero; +use crate::cmplx; use crate::constants::CF; use crate::harmonics::cache::{Cache, K}; -/// Compute heavy-heavy |OME| :math:`A_{HH}^{(1)}` +/// Compute heavy-heavy |OME|. /// -/// Defined in Eq. () of . +/// Implements Eq. (20a) of [\[Ball:2015tna\]](crate::bib::Ball2015tna). pub fn A_hh(c: &mut Cache, _nf: u8, L: f64) -> Complex { let N = c.n; let S1m = c.get(K::S1) - 1. / N; @@ -30,9 +26,9 @@ pub fn A_hh(c: &mut Cache, _nf: u8, L: f64) -> Complex { -CF * (ahh_l * L + ahh) } -/// Compute gluon-heavy |OME| :math:`A_{gH}^{(1)}` +/// Compute gluon-heavy |OME|. /// -/// Defined in Eq. () of . +/// Implements Eq. (20b) of [\[Ball:2015tna\]](crate::bib::Ball2015tna). pub fn A_gh(c: &mut Cache, _nf: u8, L: f64) -> Complex { let N = c.n; let agh_l1 = (2. + N + N.powu(2)) / (N * (N.powu(2) - 1.)); @@ -41,9 +37,9 @@ pub fn A_gh(c: &mut Cache, _nf: u8, L: f64) -> Complex { 2. * CF * (agh_l0 + agh_l1 * L) } -/// Compute heavy-gluon |OME| :math:`A_{Hg}^{(1)}` +/// Compute heavy-gluon |OME|. /// -/// Defined in Eq. () of . +/// Implements Eq. (B.2) of [\[Buza:1996wv\]](crate::bib::Buza1996wv). pub fn A_hg(c: &mut Cache, _nf: u8, L: f64) -> Complex { let N = c.n; let den = 1. / (N * (N + 1.) * (2. + N)); @@ -51,14 +47,14 @@ pub fn A_hg(c: &mut Cache, _nf: u8, L: f64) -> Complex { num * den * L } -/// Compute gluon-gluon |OME| :math:`A_{gg}^{(1)}` +/// Compute gluon-gluon |OME|. /// -/// Defined in Eq. () of . +/// Implements Eq. (B.6) of [\[Buza:1996wv\]](crate::bib::Buza1996wv). pub fn A_gg(_c: &mut Cache, _nf: u8, L: f64) -> Complex { - (-2.0 / 3.0 * L).into() + cmplx![-2.0 / 3.0 * L, 0.] } -/// Compute the |NLO| singlet |OME| +/// Compute the |NLO| singlet |OME|. pub fn A_singlet(c: &mut Cache, _nf: u8, L: f64) -> [[Complex; 3]; 3] { [ [A_gg(c, _nf, L), Complex::::zero(), A_gh(c, _nf, L)], @@ -71,7 +67,7 @@ pub fn A_singlet(c: &mut Cache, _nf: u8, L: f64) -> [[Complex; 3]; 3] { ] } -/// Compute the |NLO| non singlet |OME| +/// Compute the |NLO| non-singlet |OME|. pub fn A_ns(c: &mut Cache, _nf: u8, L: f64) -> [[Complex; 2]; 2] { [ [Complex::::zero(), Complex::::zero()], diff --git a/crates/ekore/src/util.rs b/crates/ekore/src/util.rs index 55b1ab2bd..9d8b457e8 100644 --- a/crates/ekore/src/util.rs +++ b/crates/ekore/src/util.rs @@ -8,7 +8,7 @@ macro_rules! cmplx { }; } -/// Shorthand complex number contructor. +/// Shorthand complex number comparators. #[macro_export] macro_rules! assert_approx_eq_cmplx { ($size:ty, $ref:expr, $target:expr) => {