Skip to content

Commit

Permalink
rust: Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
felixhekhorn committed Jul 18, 2024
1 parent 0028c9d commit 880d7aa
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 27 deletions.
2 changes: 1 addition & 1 deletion crates/ekore/src/anomalous_dimensions.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
//! The anomalous dimensions for DGLAP evolution.
//! The anomalous dimensions for |DGLAP| evolution.
pub mod unpolarized;
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! LO QCD
//! |LO| |QCD|.
use num::complex::Complex;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! NLO QCD
//! |NLO| |QCD|.
use ::num::complex::Complex;
use std::f64::consts::LN_2;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! NNLO QCD
//! |NNLO| |QCD|.
use ::num::complex::Complex;
use num::traits::Pow;
Expand Down
6 changes: 3 additions & 3 deletions crates/ekore/src/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
2 changes: 1 addition & 1 deletion crates/ekore/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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)]
Expand Down
2 changes: 1 addition & 1 deletion crates/ekore/src/operator_matrix_elements.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
//! Operator matrix elements.
//! The |OME|.
pub mod unpolarized;
Original file line number Diff line number Diff line change
@@ -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<f64> {
let N = c.n;
let S1m = c.get(K::S1) - 1. / N;
Expand All @@ -30,9 +26,9 @@ pub fn A_hh(c: &mut Cache, _nf: u8, L: f64) -> Complex<f64> {
-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<f64> {
let N = c.n;
let agh_l1 = (2. + N + N.powu(2)) / (N * (N.powu(2) - 1.));
Expand All @@ -41,24 +37,24 @@ pub fn A_gh(c: &mut Cache, _nf: u8, L: f64) -> Complex<f64> {
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<f64> {
let N = c.n;
let den = 1. / (N * (N + 1.) * (2. + N));
let num = 2. * (2. + N + N.powu(2));
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<f64> {
(-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<f64>; 3]; 3] {
[
[A_gg(c, _nf, L), Complex::<f64>::zero(), A_gh(c, _nf, L)],
Expand All @@ -71,7 +67,7 @@ pub fn A_singlet(c: &mut Cache, _nf: u8, L: f64) -> [[Complex<f64>; 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<f64>; 2]; 2] {
[
[Complex::<f64>::zero(), Complex::<f64>::zero()],
Expand Down
2 changes: 1 addition & 1 deletion crates/ekore/src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down

0 comments on commit 880d7aa

Please sign in to comment.