Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Items without prefix refer to a global change.
## [Unreleased](https://github.com/NNPDF/eko/compare/v0.15.4...HEAD)

### Changed
- rust: Visibility of functions in `ekore` crate changed, `constants.rs` split into 3 files ([#543](https://github.com/NNPDF/eko/pull/543))
- rust: Bumped `rust-version` to 1.85.0, `edition` to 2024 ([#545](https://github.com/NNPDF/eko/pull/545))

## [0.15.4](https://github.com/NNPDF/eko/compare/v0.15.3...v0.15.4) - 2026-06-24
Expand Down
4 changes: 2 additions & 2 deletions crates/ekore/src/anomalous_dimensions/polarized/spacelike.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ use crate::constants::{MAX_ORDER_QCD, PID_NSM, PID_NSP, PID_NSV};
use crate::harmonics::cache::Cache;
use num::Zero;
use num::complex::Complex;
pub mod as1;
pub mod as2;
mod as1;
mod as2;
// pub mod as3;

/// Compute the tower of the non-singlet anomalous dimensions.
Expand Down
10 changes: 5 additions & 5 deletions crates/ekore/src/anomalous_dimensions/polarized/spacelike/as1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ use crate::harmonics::cache::{Cache, K};
/// Compute the non-singlet anomalous dimension.
///
/// Identical to the unpolarized counterpart.
pub fn gamma_ns(c: &mut Cache, nf: u8) -> Complex<f64> {
pub(super) fn gamma_ns(c: &mut Cache, nf: u8) -> Complex<f64> {
unpol(c, nf)
}

/// Compute the quark-gluon anomalous dimension.
///
/// Implements Eq. (A.1) of [\[Gluck:1995yr\]][crate::bib::Gluck1995yr].
pub fn gamma_qg(c: &mut Cache, nf: u8) -> Complex<f64> {
pub(super) fn gamma_qg(c: &mut Cache, nf: u8) -> Complex<f64> {
let N = c.n();
let gamma = -(N - 1.) / N / (N + 1.);
2.0 * TR * 2.0 * (nf as f64) * gamma
Expand All @@ -25,7 +25,7 @@ pub fn gamma_qg(c: &mut Cache, nf: u8) -> Complex<f64> {
/// Compute the gluon-quark anomalous dimension.
///
/// Implements Eq. (A.1) of [\[Gluck:1995yr\]][crate::bib::Gluck1995yr].
pub fn gamma_gq(c: &mut Cache, _nf: u8) -> Complex<f64> {
pub(super) fn gamma_gq(c: &mut Cache, _nf: u8) -> Complex<f64> {
let N = c.n();
let gamma = -(N + 2.) / N / (N + 1.);
2.0 * CF * gamma
Expand All @@ -34,15 +34,15 @@ pub fn gamma_gq(c: &mut Cache, _nf: u8) -> Complex<f64> {
/// Compute the gluon-gluon anomalous dimension.
///
/// Implements Eq. (A.1) of [\[Gluck:1995yr\]][crate::bib::Gluck1995yr].
pub fn gamma_gg(c: &mut Cache, nf: u8) -> Complex<f64> {
pub(super) fn gamma_gg(c: &mut Cache, nf: u8) -> Complex<f64> {
let N = c.n();
let S1 = c.get(K::S1);
let gamma = -S1 + 2. / N / (N + 1.);
CA * (-4.0 * gamma - 11.0 / 3.0) + 4.0 / 3.0 * TR * (nf as f64)
}

/// Compute the singlet anomalous dimension matrix.
pub fn gamma_singlet(c: &mut Cache, nf: u8) -> [[Complex<f64>; 2]; 2] {
pub(super) fn gamma_singlet(c: &mut Cache, nf: u8) -> [[Complex<f64>; 2]; 2] {
let gamma_qq = gamma_ns(c, nf);
[
[gamma_qq, gamma_qg(c, nf)],
Expand Down
14 changes: 7 additions & 7 deletions crates/ekore/src/anomalous_dimensions/polarized/spacelike/as2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ use super::super::super::unpolarized::spacelike::as2::gamma_nsp as unpol_nsp;
use crate::constants::{CA, CF, TR, ZETA2, ZETA3};
use crate::harmonics::cache::{Cache, K};

pub fn gamma_nsm(c: &mut Cache, nf: u8) -> Complex<f64> {
pub(super) fn gamma_nsm(c: &mut Cache, nf: u8) -> Complex<f64> {
unpol_nsp(c, nf)
}

pub fn gamma_nsp(c: &mut Cache, nf: u8) -> Complex<f64> {
pub(super) fn gamma_nsp(c: &mut Cache, nf: u8) -> Complex<f64> {
unpol_nsm(c, nf)
}

/// Compute the pure-singlet quark-quark anomalous dimension.
///
/// Implements Eq. (A.3) of [\[Gluck:1995yr\]][crate::bib::Gluck1995yr].
pub fn gamma_ps(c: &mut Cache, nf: u8) -> Complex<f64> {
pub(super) fn gamma_ps(c: &mut Cache, nf: u8) -> Complex<f64> {
let n = c.n();
let gqqps1_nfcf = (2. * (n + 2.) * (1. + 2. * n + n.powu(3))) / ((1. + n).powu(3) * n.powu(3));
4.0 * TR * (nf as f64) * CF * gqqps1_nfcf
Expand All @@ -27,7 +27,7 @@ pub fn gamma_ps(c: &mut Cache, nf: u8) -> Complex<f64> {
/// Compute the quark-gluon singlet anomalous dimension.
///
/// Implements Eq. (A.4) of [\[Gluck:1995yr\]][crate::bib::Gluck1995yr].
pub fn gamma_qg(c: &mut Cache, nf: u8) -> Complex<f64> {
pub(super) fn gamma_qg(c: &mut Cache, nf: u8) -> Complex<f64> {
let n = c.n();
let S1 = c.get(K::S1);
let S2 = c.get(K::S2);
Expand All @@ -53,7 +53,7 @@ pub fn gamma_qg(c: &mut Cache, nf: u8) -> Complex<f64> {
/// Compute the gluon-quark singlet anomalous dimension.
///
/// Implements Eq. (A.5) of [\[Gluck:1995yr\]][crate::bib::Gluck1995yr].
pub fn gamma_gq(c: &mut Cache, nf: u8) -> Complex<f64> {
pub(super) fn gamma_gq(c: &mut Cache, nf: u8) -> Complex<f64> {
let n = c.n();
let S1 = c.get(K::S1);
let S2 = c.get(K::S2);
Expand Down Expand Up @@ -83,7 +83,7 @@ pub fn gamma_gq(c: &mut Cache, nf: u8) -> Complex<f64> {
/// Compute the gluon-gluon singlet anomalous dimension.
///
/// Implements Eq. (A.6) of [\[Gluck:1995yr\]][crate::bib::Gluck1995yr].
pub fn gamma_gg(c: &mut Cache, nf: u8) -> Complex<f64> {
pub(super) fn gamma_gg(c: &mut Cache, nf: u8) -> Complex<f64> {
let n = c.n();
let S1 = c.get(K::S1);
let Sp1m = c.get(K::S1mh);
Expand Down Expand Up @@ -118,7 +118,7 @@ pub fn gamma_gg(c: &mut Cache, nf: u8) -> Complex<f64> {
}

/// Compute the singlet anomalous dimension matrix.
pub fn gamma_singlet(c: &mut Cache, nf: u8) -> [[Complex<f64>; 2]; 2] {
pub(super) fn gamma_singlet(c: &mut Cache, nf: u8) -> [[Complex<f64>; 2]; 2] {
let gamma_qq = gamma_nsp(c, nf) + gamma_ps(c, nf);
[
[gamma_qq, gamma_qg(c, nf)],
Expand Down
14 changes: 7 additions & 7 deletions crates/ekore/src/anomalous_dimensions/unpolarized/spacelike.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ use crate::constants::{
use crate::harmonics::cache::Cache;
use num::Zero;
use num::complex::Complex;
pub mod aem1;
pub mod aem2;
pub mod as1;
pub mod as1aem1;
pub mod as2;
pub mod as3;
pub mod as4;
mod aem1;
mod aem2;
pub(crate) mod as1;
mod as1aem1;
pub(crate) mod as2;
mod as3;
mod as4;

/// Compute the tower of the non-singlet anomalous dimensions.
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use crate::anomalous_dimensions::unpolarized::spacelike::as1;
/// Compute the photon-quark anomalous dimension.
///
/// Implements Eq. (2.5) of [\[Carrazza:2015dea\]][crate::bib::Carrazza2015dea].
pub fn gamma_phq(c: &mut Cache, nf: u8) -> Complex<f64> {
pub(super) fn gamma_phq(c: &mut Cache, nf: u8) -> Complex<f64> {
as1::gamma_gq(c, nf) / CF
}

Expand All @@ -20,14 +20,14 @@ pub fn gamma_phq(c: &mut Cache, nf: u8) -> Complex<f64> {
/// Implements Eq. (2.5) of [\[Carrazza:2015dea\]][crate::bib::Carrazza2015dea].
/// However, we are adding the $N_C$ and the $2n_f$ factors from $\theta$ inside the
/// definition of $\gamma_{q \gamma}^{(0)}(N)$.
pub fn gamma_qph(c: &mut Cache, nf: u8) -> Complex<f64> {
pub(super) fn gamma_qph(c: &mut Cache, nf: u8) -> Complex<f64> {
as1::gamma_qg(c, nf) / TR * (NC as f64)
}

/// Compute the photon-photon anomalous dimension.
///
/// Implements Eq. (2.5) of [\[Carrazza:2015dea\]][crate::bib::Carrazza2015dea].
pub fn gamma_phph(_c: &mut Cache, nf: u8) -> Complex<f64> {
pub(super) fn gamma_phph(_c: &mut Cache, nf: u8) -> Complex<f64> {
let cc = ChargeCombinations { nf };
cmplx!(
4.0 / 3.0 * (NC as f64) * ((cc.nu() as f64) * EU2 + (cc.nd() as f64) * ED2),
Expand All @@ -38,12 +38,12 @@ pub fn gamma_phph(_c: &mut Cache, nf: u8) -> Complex<f64> {
/// Compute the non-singlet anomalous dimension.
///
/// Implements Eq. (2.5) of [\[Carrazza:2015dea\]][crate::bib::Carrazza2015dea].
pub fn gamma_ns(c: &mut Cache, nf: u8) -> Complex<f64> {
pub(super) fn gamma_ns(c: &mut Cache, nf: u8) -> Complex<f64> {
as1::gamma_ns(c, nf) / CF
}

/// Compute the singlet anomalous dimension matrix.
pub fn gamma_singlet(c: &mut Cache, nf: u8) -> [[Complex<f64>; 4]; 4] {
pub(super) fn gamma_singlet(c: &mut Cache, nf: u8) -> [[Complex<f64>; 4]; 4] {
let cc = ChargeCombinations { nf };

let gamma_ph_q = gamma_phq(c, nf);
Expand Down Expand Up @@ -79,7 +79,7 @@ pub fn gamma_singlet(c: &mut Cache, nf: u8) -> [[Complex<f64>; 4]; 4] {
}

/// Compute the valence anomalous dimension matrix.
pub fn gamma_valence(c: &mut Cache, nf: u8) -> [[Complex<f64>; 2]; 2] {
pub(super) fn gamma_valence(c: &mut Cache, nf: u8) -> [[Complex<f64>; 2]; 2] {
let cc = ChargeCombinations { nf };
let g = gamma_ns(c, nf);
[
Expand Down
24 changes: 12 additions & 12 deletions crates/ekore/src/anomalous_dimensions/unpolarized/spacelike/aem2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use crate::anomalous_dimensions::unpolarized::spacelike::as1aem1;
/// Compute the photon-photon anomalous dimension.
///
/// Implements Eq. (68) of [\[deFlorian:2016gvk\]][crate::bib::deFlorian2016gvk].
pub fn gamma_phph(c: &mut Cache, nf: u8) -> Complex<f64> {
pub(super) fn gamma_phph(c: &mut Cache, nf: u8) -> Complex<f64> {
let cc = ChargeCombinations { nf };
(NC as f64)
* ((cc.nu() as f64) * EU2.powi(2) + (cc.nd() as f64) * ED2.powi(2))
Expand All @@ -20,14 +20,14 @@ pub fn gamma_phph(c: &mut Cache, nf: u8) -> Complex<f64> {
/// Compute the up-photon anomalous dimension.
///
/// Implements Eq. (55) of [\[deFlorian:2016gvk\]][crate::bib::deFlorian2016gvk] for q=u.
pub fn gamma_uph(c: &mut Cache, nf: u8) -> Complex<f64> {
pub(super) fn gamma_uph(c: &mut Cache, nf: u8) -> Complex<f64> {
EU2 * as1aem1::gamma_qph(c, nf) / CF
}

/// Compute the down-photon anomalous dimension.
///
/// Implements Eq. (55) of [\[deFlorian:2016gvk\]][crate::bib::deFlorian2016gvk] for q=d.
pub fn gamma_dph(c: &mut Cache, nf: u8) -> Complex<f64> {
pub(super) fn gamma_dph(c: &mut Cache, nf: u8) -> Complex<f64> {
ED2 * as1aem1::gamma_qph(c, nf) / CF
}

Expand All @@ -50,14 +50,14 @@ fn gamma_phq(c: &mut Cache, nf: u8) -> Complex<f64> {
/// Compute the photon-up anomalous dimension.
///
/// Implements Eq. (56) of [\[deFlorian:2016gvk\]][crate::bib::deFlorian2016gvk].
pub fn gamma_phu(c: &mut Cache, nf: u8) -> Complex<f64> {
pub(super) fn gamma_phu(c: &mut Cache, nf: u8) -> Complex<f64> {
EU2 * as1aem1::gamma_phq(c, nf) / CF + gamma_phq(c, nf)
}

/// Compute the photon-down anomalous dimension.
///
/// Implements Eq. (56) of [\[deFlorian:2016gvk\]][crate::bib::deFlorian2016gvk].
pub fn gamma_phd(c: &mut Cache, nf: u8) -> Complex<f64> {
pub(super) fn gamma_phd(c: &mut Cache, nf: u8) -> Complex<f64> {
ED2 * as1aem1::gamma_phq(c, nf) / CF + gamma_phq(c, nf)
}

Expand All @@ -80,43 +80,43 @@ fn gamma_nsq(c: &mut Cache, nf: u8) -> Complex<f64> {
/// Compute the singlet-like non-singlet up anomalous dimension.
///
/// Implements sum of Eqs. (57-58) of [\[deFlorian:2016gvk\]][crate::bib::deFlorian2016gvk] for q=u.
pub fn gamma_nspu(c: &mut Cache, nf: u8) -> Complex<f64> {
pub(super) fn gamma_nspu(c: &mut Cache, nf: u8) -> Complex<f64> {
EU2 * as1aem1::gamma_nsp(c, nf) / CF / 2. + gamma_nsq(c, nf)
}

/// Compute the singlet-like non-singlet down anomalous dimension.
///
/// Implements sum of Eqs. (57-58) of [\[deFlorian:2016gvk\]][crate::bib::deFlorian2016gvk] for q=d.
pub fn gamma_nspd(c: &mut Cache, nf: u8) -> Complex<f64> {
pub(super) fn gamma_nspd(c: &mut Cache, nf: u8) -> Complex<f64> {
ED2 * as1aem1::gamma_nsp(c, nf) / CF / 2. + gamma_nsq(c, nf)
}

/// Compute the valence-like non-singlet up anomalous dimension.
///
/// Implements difference between Eqs. (57-58) of [\[deFlorian:2016gvk\]][crate::bib::deFlorian2016gvk] for q=u.
pub fn gamma_nsmu(c: &mut Cache, nf: u8) -> Complex<f64> {
pub(super) fn gamma_nsmu(c: &mut Cache, nf: u8) -> Complex<f64> {
EU2 * as1aem1::gamma_nsm(c, nf) / CF / 2. + gamma_nsq(c, nf)
}

/// Compute the valence-like non-singlet down anomalous dimension.
///
/// Implements difference between Eqs. (57-58) of [\[deFlorian:2016gvk\]][crate::bib::deFlorian2016gvk] for q=d.
pub fn gamma_nsmd(c: &mut Cache, nf: u8) -> Complex<f64> {
pub(super) fn gamma_nsmd(c: &mut Cache, nf: u8) -> Complex<f64> {
ED2 * as1aem1::gamma_nsm(c, nf) / CF / 2. + gamma_nsq(c, nf)
}

/// Compute the pure-singlet anomalous dimension.
///
/// Implements Eq. (59) of [\[deFlorian:2016gvk\]][crate::bib::deFlorian2016gvk].
pub fn gamma_ps(c: &mut Cache, nf: u8) -> Complex<f64> {
pub(super) fn gamma_ps(c: &mut Cache, nf: u8) -> Complex<f64> {
let N = c.n();
let result = -4.0 * (2.0 + N * (5.0 + N)) * (4.0 + N * (4.0 + N * (7.0 + 5.0 * N)))
/ ((-1.0 + N) * N.powu(3) * (1.0 + N).powu(3) * (2.0 + N).powu(2));
2. * (nf as f64) * CA * result
}

/// Compute the singlet anomalous dimension matrix.
pub fn gamma_singlet(c: &mut Cache, nf: u8) -> [[Complex<f64>; 4]; 4] {
pub(super) fn gamma_singlet(c: &mut Cache, nf: u8) -> [[Complex<f64>; 4]; 4] {
let cc = ChargeCombinations { nf };
const E2M: f64 = EU2 - ED2;

Expand Down Expand Up @@ -159,7 +159,7 @@ pub fn gamma_singlet(c: &mut Cache, nf: u8) -> [[Complex<f64>; 4]; 4] {
}

/// Compute the valence anomalous dimension matrix.
pub fn gamma_valence(c: &mut Cache, nf: u8) -> [[Complex<f64>; 2]; 2] {
pub(super) fn gamma_valence(c: &mut Cache, nf: u8) -> [[Complex<f64>; 2]; 2] {
let cc = ChargeCombinations { nf };
let gamma_nsmu = gamma_nsmu(c, nf);
let gamma_nsmd = gamma_nsmd(c, nf);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use crate::harmonics::cache::{Cache, K};
/// Compute the non-singlet anomalous dimension.
///
/// Implements Eq. (3.4) of [\[Moch:2004pa\]][crate::bib::Moch2004pa].
pub fn gamma_ns(c: &mut Cache, _nf: u8) -> Complex<f64> {
pub(crate) fn gamma_ns(c: &mut Cache, _nf: u8) -> Complex<f64> {
let N = c.n();
let S1 = c.get(K::S1);
let gamma = -(3.0 - 4.0 * S1 + 2.0 / N / (N + 1.0));
Expand All @@ -18,7 +18,7 @@ pub fn gamma_ns(c: &mut Cache, _nf: u8) -> Complex<f64> {
/// Compute the quark-gluon anomalous dimension.
///
/// Implements Eq. (3.5) of [\[Vogt:2004mw\]](crate::bib::Vogt2004mw).
pub fn gamma_qg(c: &mut Cache, nf: u8) -> Complex<f64> {
pub(super) fn gamma_qg(c: &mut Cache, nf: u8) -> Complex<f64> {
let N = c.n();
let gamma = -(N.powu(2) + N + 2.0) / (N * (N + 1.0) * (N + 2.0));
2.0 * TR * 2.0 * (nf as f64) * gamma
Expand All @@ -27,7 +27,7 @@ pub fn gamma_qg(c: &mut Cache, nf: u8) -> Complex<f64> {
/// Compute the gluon-quark anomalous dimension.
///
/// Implements Eq. (3.5) of [\[Vogt:2004mw\]](crate::bib::Vogt2004mw).
pub fn gamma_gq(c: &mut Cache, _nf: u8) -> Complex<f64> {
pub(super) fn gamma_gq(c: &mut Cache, _nf: u8) -> Complex<f64> {
let N = c.n();
let gamma = -(N.powu(2) + N + 2.0) / (N * (N + 1.0) * (N - 1.0));
2.0 * CF * gamma
Expand All @@ -36,15 +36,15 @@ pub fn gamma_gq(c: &mut Cache, _nf: u8) -> Complex<f64> {
/// Compute the gluon-gluon anomalous dimension.
///
/// Implements Eq. (3.5) of [\[Vogt:2004mw\]](crate::bib::Vogt2004mw).
pub fn gamma_gg(c: &mut Cache, nf: u8) -> Complex<f64> {
pub(super) fn gamma_gg(c: &mut Cache, nf: u8) -> Complex<f64> {
let N = c.n();
let S1 = c.get(K::S1);
let gamma = S1 - 1.0 / N / (N - 1.0) - 1.0 / (N + 1.0) / (N + 2.0);
CA * (4.0 * gamma - 11.0 / 3.0) + 4.0 / 3.0 * TR * (nf as f64)
}

/// Compute the singlet anomalous dimension matrix.
pub fn gamma_singlet(c: &mut Cache, nf: u8) -> [[Complex<f64>; 2]; 2] {
pub(super) fn gamma_singlet(c: &mut Cache, nf: u8) -> [[Complex<f64>; 2]; 2] {
let gamma_qq = gamma_ns(c, nf);
[
[gamma_qq, gamma_qg(c, nf)],
Expand Down
Loading
Loading