diff --git a/crates/ekore/src/anomalous_dimensions/unpolarized/spacelike/aem1.rs b/crates/ekore/src/anomalous_dimensions/unpolarized/spacelike/aem1.rs index 8d8d97af1..bc70ed97f 100644 --- a/crates/ekore/src/anomalous_dimensions/unpolarized/spacelike/aem1.rs +++ b/crates/ekore/src/anomalous_dimensions/unpolarized/spacelike/aem1.rs @@ -2,7 +2,7 @@ use num::complex::Complex; use num::Zero; -use crate::constants::{charge_combinations, ed2, eu2, uplike_flavors, CF, NC, TR}; +use crate::constants::{ed2, eu2, uplike_flavors, ChargeCombinations, CF, NC, TR}; use crate::harmonics::cache::Cache; use crate::anomalous_dimensions::unpolarized::spacelike::as1; @@ -41,7 +41,7 @@ pub fn gamma_ns(c: &mut Cache, nf: u8) -> Complex { /// /// Implements Eq. (2.5) of pub fn gamma_singlet(c: &mut Cache, nf: u8) -> [[Complex; 4]; 4] { - let cc = charge_combinations(nf); + let cc = ChargeCombinations { nf }; let gamma_ph_q = gamma_phq(c, nf); let gamma_q_ph = gamma_qph(c, nf); @@ -57,20 +57,20 @@ pub fn gamma_singlet(c: &mut Cache, nf: u8) -> [[Complex; 4]; 4] { [ Complex::::zero(), gamma_phph(c, nf), - cc.e2avg * gamma_ph_q, - cc.vue2m * gamma_ph_q, + cc.e2avg() * gamma_ph_q, + cc.vue2m() * gamma_ph_q, ], [ Complex::::zero(), - cc.e2avg * gamma_q_ph, - cc.e2avg * gamma_nonsinglet, - cc.vue2m * gamma_nonsinglet, + cc.e2avg() * gamma_q_ph, + cc.e2avg() * gamma_nonsinglet, + cc.vue2m() * gamma_nonsinglet, ], [ Complex::::zero(), - cc.vde2m * gamma_q_ph, - cc.vde2m * gamma_nonsinglet, - cc.e2delta * gamma_nonsinglet, + cc.vde2m() * gamma_q_ph, + cc.vde2m() * gamma_nonsinglet, + cc.e2delta() * gamma_nonsinglet, ], ] } @@ -79,11 +79,11 @@ pub fn gamma_singlet(c: &mut Cache, nf: u8) -> [[Complex; 4]; 4] { /// /// Implements Eq. (2.5) of pub fn gamma_valence(c: &mut Cache, nf: u8) -> [[Complex; 2]; 2] { - let cc = charge_combinations(nf); + let cc = ChargeCombinations { nf }; [ - [cc.e2avg * gamma_ns(c, nf), cc.vue2m * gamma_ns(c, nf)], - [cc.vde2m * gamma_ns(c, nf), cc.e2delta * gamma_ns(c, nf)], + [cc.e2avg() * gamma_ns(c, nf), cc.vue2m() * gamma_ns(c, nf)], + [cc.vde2m() * gamma_ns(c, nf), cc.e2delta() * gamma_ns(c, nf)], ] } diff --git a/crates/ekore/src/anomalous_dimensions/unpolarized/spacelike/as1aem1.rs b/crates/ekore/src/anomalous_dimensions/unpolarized/spacelike/as1aem1.rs index 2eedf14ec..917ea45a7 100644 --- a/crates/ekore/src/anomalous_dimensions/unpolarized/spacelike/as1aem1.rs +++ b/crates/ekore/src/anomalous_dimensions/unpolarized/spacelike/as1aem1.rs @@ -124,6 +124,7 @@ pub fn gamma_nsp(c: &mut Cache, _nf: u8) -> Complex { let S1p1h = c.get(K::S1ph); let S2p1h = c.get(K::S2ph); let S3p1h = c.get(K::S3ph); + let g3N = c.get(K::G3); let g3Np2 = c.get(K::G3p2); @@ -140,3 +141,53 @@ pub fn gamma_nsp(c: &mut Cache, _nf: u8) -> Complex { CF * result } + +/// Compute the $O(a_s^1a_{em}^1)$ valence-like non singlet anomalous dimension. +/// +/// Implements Eqs. (33-34) of +pub fn gamma_nsm(c: &mut Cache, _nf: u8) -> Complex { + let N = c.n(); + let S1 = c.get(K::S1); + let S2 = c.get(K::S2); + let S3 = c.get(K::S3); + let S1h = c.get(K::S1h); + let S2h = c.get(K::S2h); + let S3h = c.get(K::S3h); + let S1p1h = c.get(K::S1ph); + let S2p1h = c.get(K::S2ph); + let S3p1h = c.get(K::S3ph); + let g3N = c.get(K::G3); + let g3Np2 = c.get(K::G3p2); + + #[rustfmt::skip] + let result = + -32.0 * ZETA2 * S1h + - 8.0 / (N + N.powu(2)) * S2h + + (24.0 + 16.0 / (N + N.powu(2))) * S2 + + 8.0 / (N + N.powu(2)) * S2p1h + + S1 + * ( + 16.0 * (-1.0 / N.powu(2) + 1.0 / (1.0 + N).powu(2) + 2.0 * ZETA2) + + 16.0 * S2h + - 32.0 * S2 + - 16.0 * S2p1h + ) + + ( + 72.0 + + N + * ( + 96.0 + - 3.0 * N * (8.0 + 3.0 * N * (3.0 + N) * (3.0 + N.powu(2))) + + 48.0 * N * (1.0 + N).powu(2) * ZETA2 + ) + ) + / (3.0 * N.powu(3) * (1.0 + N).powu(3)) + - 32.0 * (g3N + g3Np2) + + 32.0 * ZETA2 * S1p1h + + 4.0 * S3h + - 32.0 * S3 + - 4.0 * S3p1h + - 16.0 * ZETA3; + + CF * result +} diff --git a/crates/ekore/src/constants.rs b/crates/ekore/src/constants.rs index 7dd00d088..80c3bc807 100644 --- a/crates/ekore/src/constants.rs +++ b/crates/ekore/src/constants.rs @@ -71,24 +71,31 @@ pub fn uplike_flavors(nf: u8) -> u8 { } pub struct ChargeCombinations { - pub e2avg: f64, - pub vue2m: f64, - pub vde2m: f64, - pub e2delta: f64, + pub nf: u8, } -pub fn charge_combinations(nf: u8) -> ChargeCombinations { - let nu = uplike_flavors(nf) as f64; - let nd = (nf as f64) - nu; - let e2avg = (nu * eu2 + nd * ed2) / (nf as f64); - let vue2m = nu / (nf as f64) * (eu2 - ed2); - let vde2m = nd / (nf as f64) * (eu2 - ed2); - let e2delta = vde2m - vue2m + e2avg; - - ChargeCombinations { - e2avg, - vue2m, - vde2m, - e2delta, +impl ChargeCombinations { + pub fn nu(&self) -> u8 { + uplike_flavors(self.nf) + } + + pub fn nd(&self) -> u8 { + self.nf - self.nu() + } + + pub fn e2avg(&self) -> f64 { + (self.nu() as f64 * eu2 + self.nd() as f64 * ed2) / (self.nf as f64) + } + + pub fn vue2m(&self) -> f64 { + self.nu() as f64 / (self.nf as f64) * (eu2 - ed2) + } + + pub fn vde2m(&self) -> f64 { + self.nd() as f64 / (self.nf as f64) * (eu2 - ed2) + } + + pub fn e2delta(&self) -> f64 { + self.vde2m() - self.vue2m() + self.e2avg() } }