Skip to content

Commit

Permalink
spacelike.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
tgiani committed Jun 19, 2024
1 parent 95aec14 commit 91aaf67
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 15 deletions.
62 changes: 54 additions & 8 deletions crates/ekore/src/operator_matrix_elements/unpolarized/spacelike.rs
Original file line number Diff line number Diff line change
@@ -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<Complex<f64>>{
/// Compute the tower of the singlet |OME|.
pub fn A_singlet(
matching_order_qcd: usize,
c: &mut Cache,
nf: u8,
L: f64,
) -> Vec<[[Complex<f64>; 3]; 3]> {
let mut A_s = vec![
[
[
Complex::<f64>::zero(),
Complex::<f64>::zero(),
Complex::<f64>::zero()
],
[
Complex::<f64>::zero(),
Complex::<f64>::zero(),
Complex::<f64>::zero()
],
[
Complex::<f64>::zero(),
Complex::<f64>::zero(),
Complex::<f64>::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<Complex<f64>>{

// }
/// 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<f64>; 2]; 2]> {
let mut A_ns = vec![
[
[Complex::<f64>::zero(), Complex::<f64>::zero()],
[Complex::<f64>::zero(), Complex::<f64>::zero()]
];
matching_order_qcd
];
if matching_order_qcd >= 1 {
A_ns[0] = as1::A_ns(c, nf, L);
}
A_ns
}
Original file line number Diff line number Diff line change
@@ -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};

Expand Down Expand Up @@ -55,18 +55,23 @@ pub fn A_gg(_c: &mut Cache, _nf: u8, L: f64) -> Complex<f64> {

/// Compute the |NLO| singlet |OME|
pub fn A_singlet(c: &mut Cache, _nf: u8, L: f64) -> [[Complex<f64>; 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::<f64>::zero(), A_gh(c, _nf, L)],
[
Complex::<f64>::zero(),
Complex::<f64>::zero(),
Complex::<f64>::zero(),
],
[A_hg(c, _nf, L), Complex::<f64>::zero(), A_hh(c, _nf, L)],
]
}

/// Compute the |NLO| non singlet |OME|
pub fn A_ns(c: &mut Cache, _nf: u8, L: f64) -> [[Complex<f64>; 2]; 2] {
let zero = cmplx![0., 0.];
[[zero, zero], [zero, A_hh(c, _nf, L)]]
[
[Complex::<f64>::zero(), Complex::<f64>::zero()],
[Complex::<f64>::zero(), A_hh(c, _nf, L)],
]
}

#[cfg(test)]
Expand Down

0 comments on commit 91aaf67

Please sign in to comment.