From bad124ac40aca464729d962e05ef4bb4e6553adb Mon Sep 17 00:00:00 2001 From: tgiani Date: Wed, 20 Nov 2024 11:10:25 +0100 Subject: [PATCH] some work on spacelike.rs and recasting from list to vec --- .../unpolarized/spacelike.rs | 39 +++++++++++++++++++ .../unpolarized/spacelike/aem1.rs | 4 +- .../unpolarized/spacelike/as1.rs | 32 +++++++++++++++ .../unpolarized/spacelike/as1aem1.rs | 4 +- 4 files changed, 75 insertions(+), 4 deletions(-) diff --git a/crates/ekore/src/anomalous_dimensions/unpolarized/spacelike.rs b/crates/ekore/src/anomalous_dimensions/unpolarized/spacelike.rs index 7a5fc13e8..f41e52266 100644 --- a/crates/ekore/src/anomalous_dimensions/unpolarized/spacelike.rs +++ b/crates/ekore/src/anomalous_dimensions/unpolarized/spacelike.rs @@ -72,6 +72,7 @@ pub fn gamma_ns_qed( let mut gamma_ns = vec![row; order_qed + 1]; gamma_ns[1][0] = as1::gamma_ns(c, nf); gamma_ns[0][1] = choose_ns_as_aem1(mode, c, nf); + gamma_ns[1][1] = choose_ns_as_as1aem1(mode, c, nf); gamma_ns } @@ -82,3 +83,41 @@ pub fn choose_ns_as_aem1(mode: u16, c: &mut Cache, nf: u8) -> Complex { _ => panic!("Unkown non-singlet sector element"), } } + +pub fn choose_ns_as_as1aem1(mode: u16, c: &mut Cache, nf: u8) -> Complex { + match mode { + PID_NSP_EU2 => eu2 * as1aem1::gamma_nsp(c, nf), + PID_NSP_ED2 => ed2 * as1aem1::gamma_nsp(c, nf), + PID_NSM_EU2 => eu2 * as1aem1::gamma_nsm(c, nf), + PID_NSM_ED2 => ed2 * as1aem1::gamma_nsm(c, nf), + _ => panic!("Unkown non-singlet sector element"), + } +} + +pub fn gamma_singlet_qed( + order_qcd: usize, + order_qed: usize, + mode: u16, + c: &mut Cache, + nf: u8, +) -> Vec; 4]>>> { + let mut row = vec![ + vec![ + [ + Complex::::zero(), + Complex::::zero(), + Complex::::zero(), + Complex::::zero() + ]; + 4 + ]; + order_qcd + 1 + ]; + + let mut gamma_s = vec![row; order_qed + 1]; + + gamma_s[1][0] = as1::gamma_singlet_qed(c, nf); + gamma_s[0][1] = aem1::gamma_singlet(c, nf); + gamma_s[1][1] = as1aem1::gamma_singlet(c, nf); + gamma_s +} diff --git a/crates/ekore/src/anomalous_dimensions/unpolarized/spacelike/aem1.rs b/crates/ekore/src/anomalous_dimensions/unpolarized/spacelike/aem1.rs index bc70ed97f..7791d9552 100644 --- a/crates/ekore/src/anomalous_dimensions/unpolarized/spacelike/aem1.rs +++ b/crates/ekore/src/anomalous_dimensions/unpolarized/spacelike/aem1.rs @@ -40,14 +40,14 @@ pub fn gamma_ns(c: &mut Cache, nf: u8) -> Complex { /// Compute the leading-order singlet QED anomalous dimension matrix /// /// Implements Eq. (2.5) of -pub fn gamma_singlet(c: &mut Cache, nf: u8) -> [[Complex; 4]; 4] { +pub fn gamma_singlet(c: &mut Cache, nf: u8) -> Vec<[Complex; 4]> { let cc = ChargeCombinations { nf }; let gamma_ph_q = gamma_phq(c, nf); let gamma_q_ph = gamma_qph(c, nf); let gamma_nonsinglet = gamma_ns(c, nf); - [ + vec![ [ Complex::::zero(), Complex::::zero(), diff --git a/crates/ekore/src/anomalous_dimensions/unpolarized/spacelike/as1.rs b/crates/ekore/src/anomalous_dimensions/unpolarized/spacelike/as1.rs index 6d25e1c51..dad16e819 100644 --- a/crates/ekore/src/anomalous_dimensions/unpolarized/spacelike/as1.rs +++ b/crates/ekore/src/anomalous_dimensions/unpolarized/spacelike/as1.rs @@ -1,6 +1,7 @@ //! |LO| |QCD|. use num::complex::Complex; +use num::Zero; use crate::constants::{CA, CF, TR}; use crate::harmonics::cache::{Cache, K}; @@ -52,6 +53,37 @@ pub fn gamma_singlet(c: &mut Cache, nf: u8) -> [[Complex; 2]; 2] { ] } +/// Compute the leading-order singlet anomalous dimension matrix +/// for the unified evolution basis. +pub fn gamma_singlet_qed(c: &mut Cache, nf: u8) -> Vec<[Complex; 4]> { + vec![ + [ + gamma_gg(c, nf), + Complex::::zero(), + gamma_gq(c, nf), + Complex::::zero(), + ], + [ + Complex::::zero(), + Complex::::zero(), + Complex::::zero(), + Complex::::zero(), + ], + [ + gamma_qg(c, nf), + Complex::::zero(), + gamma_ns(c, nf), + Complex::::zero(), + ], + [ + Complex::::zero(), + Complex::::zero(), + Complex::::zero(), + gamma_ns(c, nf), + ], + ] +} + #[cfg(test)] mod tests { use super::*; diff --git a/crates/ekore/src/anomalous_dimensions/unpolarized/spacelike/as1aem1.rs b/crates/ekore/src/anomalous_dimensions/unpolarized/spacelike/as1aem1.rs index b96ed3680..a9ae80770 100644 --- a/crates/ekore/src/anomalous_dimensions/unpolarized/spacelike/as1aem1.rs +++ b/crates/ekore/src/anomalous_dimensions/unpolarized/spacelike/as1aem1.rs @@ -195,7 +195,7 @@ pub fn gamma_nsm(c: &mut Cache, _nf: u8) -> Complex { } /// Compute the $O(a_s^1a_{em}^1)$ singlet sector. -pub fn gamma_singlet(c: &mut Cache, nf: u8) -> [[Complex; 4]; 4] { +pub fn gamma_singlet(c: &mut Cache, nf: u8) -> Vec<[Complex; 4]> { let cc = ChargeCombinations { nf }; // let e2avg = cc.e2avg(); // let vue2m = cc.vue2m(); @@ -203,7 +203,7 @@ pub fn gamma_singlet(c: &mut Cache, nf: u8) -> [[Complex; 4]; 4] { // let e2delta = cc.e2delta(); let e2_tot = nf as f64 * cc.e2avg(); - [ + vec![ [ e2_tot * gamma_gg(c, nf), e2_tot * gamma_gph(c, nf),