From 91aaf6741d3f1204e4707a1d5bc0978942a10f85 Mon Sep 17 00:00:00 2001 From: tgiani Date: Wed, 19 Jun 2024 15:16:51 +0200 Subject: [PATCH] spacelike.rs --- .../unpolarized/spacelike.rs | 62 ++++++++++++++++--- .../unpolarized/spacelike/as1.rs | 19 +++--- 2 files changed, 66 insertions(+), 15 deletions(-) diff --git a/crates/ekore/src/operator_matrix_elements/unpolarized/spacelike.rs b/crates/ekore/src/operator_matrix_elements/unpolarized/spacelike.rs index 86587fd77..50b69aeab 100644 --- a/crates/ekore/src/operator_matrix_elements/unpolarized/spacelike.rs +++ b/crates/ekore/src/operator_matrix_elements/unpolarized/spacelike.rs @@ -1,12 +1,58 @@ //! The unpolarized, space-like |OME| at various couplings power. +use crate::harmonics::cache::Cache; +use num::complex::Complex; +use num::Zero; pub mod as1; -// Compute the tower of the singlet |OME|. -// pub fn A_singlet() -> Vec>{ +/// Compute the tower of the singlet |OME|. +pub fn A_singlet( + matching_order_qcd: usize, + c: &mut Cache, + nf: u8, + L: f64, +) -> Vec<[[Complex; 3]; 3]> { + let mut A_s = vec![ + [ + [ + Complex::::zero(), + Complex::::zero(), + Complex::::zero() + ], + [ + Complex::::zero(), + Complex::::zero(), + Complex::::zero() + ], + [ + Complex::::zero(), + Complex::::zero(), + Complex::::zero() + ] + ]; + matching_order_qcd + ]; + if matching_order_qcd >= 1 { + A_s[0] = as1::A_singlet(c, nf, L); + } + A_s +} -// } - -// Compute the tower of the non-singlet |OME|. -// pub fn A_non_singlet() -> Vec>{ - -// } +/// Compute the tower of the non-singlet |OME|. +pub fn A_non_singlet( + matching_order_qcd: usize, + c: &mut Cache, + nf: u8, + L: f64, +) -> Vec<[[Complex; 2]; 2]> { + let mut A_ns = vec![ + [ + [Complex::::zero(), Complex::::zero()], + [Complex::::zero(), Complex::::zero()] + ]; + matching_order_qcd + ]; + if matching_order_qcd >= 1 { + A_ns[0] = as1::A_ns(c, nf, L); + } + A_ns +} 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 0960fe391..12cb58de1 100644 --- a/crates/ekore/src/operator_matrix_elements/unpolarized/spacelike/as1.rs +++ b/crates/ekore/src/operator_matrix_elements/unpolarized/spacelike/as1.rs @@ -1,8 +1,8 @@ //! NLO QCD use num::complex::Complex; +use num::Zero; -use crate::cmplx; use crate::constants::CF; use crate::harmonics::cache::{Cache, K}; @@ -55,18 +55,23 @@ pub fn A_gg(_c: &mut Cache, _nf: u8, L: f64) -> Complex { /// Compute the |NLO| singlet |OME| pub fn A_singlet(c: &mut Cache, _nf: u8, L: f64) -> [[Complex; 3]; 3] { - let zero = cmplx![0., 0.]; [ - [A_gg(c, _nf, L), zero, A_gh(c, _nf, L)], - [zero, zero, zero], - [A_hg(c, _nf, L), zero, A_hh(c, _nf, L)], + [A_gg(c, _nf, L), Complex::::zero(), A_gh(c, _nf, L)], + [ + Complex::::zero(), + Complex::::zero(), + Complex::::zero(), + ], + [A_hg(c, _nf, L), Complex::::zero(), A_hh(c, _nf, L)], ] } /// Compute the |NLO| non singlet |OME| pub fn A_ns(c: &mut Cache, _nf: u8, L: f64) -> [[Complex; 2]; 2] { - let zero = cmplx![0., 0.]; - [[zero, zero], [zero, A_hh(c, _nf, L)]] + [ + [Complex::::zero(), Complex::::zero()], + [Complex::::zero(), A_hh(c, _nf, L)], + ] } #[cfg(test)]