Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rustify ome.u.s.{as1, as2} #385

Merged
merged 48 commits into from
Oct 14, 2024
Merged
Changes from 1 commit
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
56a77e4
starting ome
tgiani May 31, 2024
95aec14
as1. Need some cleaning up
tgiani Jun 19, 2024
91aaf67
spacelike.rs
tgiani Jun 19, 2024
6eacd3b
attempt to implement python hook
tgiani Jun 21, 2024
b20732d
refactoring and adding Lsv for ome
tgiani Jul 1, 2024
637a1c3
Improve quad_ker module
felixhekhorn Jul 17, 2024
56e9062
rust: Move ome changes to patch
felixhekhorn Jul 17, 2024
12bb7fe
rust: Adjust some docs
felixhekhorn Jul 17, 2024
31f5d88
rust: Fix py callback signature
felixhekhorn Jul 17, 2024
865da0c
rust: Unify unravel of tensors
felixhekhorn Jul 17, 2024
7f055b2
Merge branch 'master' into ome_rust
felixhekhorn Jul 18, 2024
13bafbb
rust: Add several fixes
felixhekhorn Jul 18, 2024
0028c9d
rust: Fix doc abbrev
felixhekhorn Jul 18, 2024
880d7aa
rust: Update docs
felixhekhorn Jul 18, 2024
5f4bde6
rust: Set is_ome flag
felixhekhorn Jul 19, 2024
6323f1b
start as2
tgiani Jul 30, 2024
837187b
Merge branch 'master' into ome_rust
felixhekhorn Aug 9, 2024
7c1a1bd
Fix rust patches
felixhekhorn Aug 9, 2024
2b623d8
Merge branch 'master' into ome_rust
felixhekhorn Aug 22, 2024
4b1755b
rust: Fix a clippy warning
felixhekhorn Aug 22, 2024
56ed86c
Merge branch 'master' into ome_rust
felixhekhorn Aug 22, 2024
164c02b
rust: Protect cache properties
felixhekhorn Aug 22, 2024
33574b9
adding Sm2e and Sm2o implementation
tgiani Sep 4, 2024
e79f008
Merge branch 'ome_rust' of github.com:N3PDF/eko into ome_rust
tgiani Sep 4, 2024
e57e891
adding Sm1e, Sm1o, Sm21e, Sm21o implementation
tgiani Sep 4, 2024
70cdc7c
adding Sm3e and Sm3o
tgiani Sep 5, 2024
678efa9
working on as2
tgiani Sep 5, 2024
7ea6da2
Agq
tgiani Sep 5, 2024
429206a
more work on as2
tgiani Sep 9, 2024
f3b1219
rust: Remove leading underscore for used vars
felixhekhorn Sep 10, 2024
3f27e6b
rust: Add NNLO OME refs
felixhekhorn Sep 10, 2024
17a73d5
rust: Update NLO OME tests
felixhekhorn Sep 10, 2024
5239d8b
rust: Use cmplx eq in tests
felixhekhorn Sep 10, 2024
9b498b7
rust: Simplify assert_approx_eq_cmplx
felixhekhorn Sep 10, 2024
8f09ea0
rust: Activate NNLO OME
felixhekhorn Sep 10, 2024
2d9b7ca
start unit tests on as2
tgiani Sep 11, 2024
fc01791
Merge branch 'ome_rust' of github.com:N3PDF/eko into ome_rust
tgiani Sep 11, 2024
b7932aa
fix bug in Ahqps
tgiani Sep 11, 2024
b1beb83
Merge branch 'master' into ome_rust
felixhekhorn Sep 16, 2024
7d5dac7
Fix wrong merge
felixhekhorn Sep 16, 2024
ddc57bf
Fix OME patch
felixhekhorn Sep 16, 2024
33a1429
tests on as2
tgiani Oct 3, 2024
622f113
more work on as2 tests
tgiani Oct 3, 2024
457e52c
Update crates/ekore/src/operator_matrix_elements/unpolarized/spacelik…
felixhekhorn Oct 11, 2024
d1b6c53
rust: Add rel to cmplx eq
felixhekhorn Oct 11, 2024
7396c67
rust: Unify cmplx! macro call
felixhekhorn Oct 11, 2024
54d86d4
rust: Cast to float with .
felixhekhorn Oct 11, 2024
8896dea
rust: Unify Sm21 in the back
felixhekhorn Oct 14, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use num::traits::Pow;
use num::Zero;

use crate::cmplx;
use crate::constants::{CF, TR, ZETA2, ZETA3};
use crate::constants::{CA, CF, TR, ZETA2, ZETA3};
use crate::harmonics::cache::{Cache, K};

use crate::operator_matrix_elements::unpolarized::spacelike::as1;
Expand Down Expand Up @@ -204,3 +204,80 @@ pub fn A_gq(c: &mut Cache, _nf: u8, L: f64) -> Complex<f64> {

CF * TR * (a_gq_l2 * L.pow(2) + a_gq_l1 * L + a_gq_l0)
}

/// |NNLO| gluon-gluon |OME|
/// It is given in Eq.() of
pub fn A_gg(c: &mut Cache, _nf: u8, L: f64) -> Complex<f64> {
let N = c.n();
let S1 = c.get(K::S1);
let S1m = S1 - 1. / N;

let D1 = -1.0 / N.powu(2);
let D11 = -1.0 / (N + 1.0).powu(2);
let D2 = 2.0 / N.powu(3);
let D21 = 2.0 / (N + 1.0).powu(3);

let a_gg_f = -15.0 - 8.0 / (N - 1.0) + 80.0 / N - 48.0 / (N + 1.0) - 24.0 / (N + 2.0)
+ 4.0 / 3.0 * (-6.0 / N.powu(4) - 6.0 / (N + 1.0).powu(4))
+ 6.0 * D2
+ 10.0 * D21
+ 32.0 * D1
+ 48.0 * D11;

let a_gg_a = -224.0 / 27.0 * (S1 - 1.0 / N)
+ 10.0 / 9.0
+ 4.0 / 3.0 * (S1 + 1.0 / (N + 1.0)) / (N + 1.0)
+ 1.0 / 27.0 * (556.0 / (N - 1.0) - 628.0 / N + 548.0 / (N + 1.0) - 700.0 / (N + 2.0))
+ 4.0 / 3.0 * (D2 + D21)
+ 1.0 / 9.0 * (52.0 * D1 + 88.0 * D11);

let a_gg_l0 = TR * (CF * a_gg_f + CA * a_gg_a);

let a_gg_l1 = 8. / 3.
* ((8. + 2. * N
- 34. * N.powu(2)
- 72. * N.powu(3)
- 77. * N.powu(4)
- 37. * N.powu(5)
- 19. * N.powu(6)
- 11. * N.powu(7)
- 4. * N.powu(8))
/ ((N * (N + 1.)).powu(3) * (-2. + N + N.powu(2)))
+ 5. * S1m);

let a_gg_l2 = 4. / 9.
* (1.
+ 6. * (2. + N + N.powu(2)).powu(2) / ((N * (N + 1.)).powu(2) * (-2. + N + N.powu(2)))
- 9. * (-4. - 3. * N + N.powu(3)) / (N * (N + 1.) * (-2. + N + N.powu(2))))
- 4. * S1m;

a_gg_l2 * L.pow(2) + a_gg_l1 * L + a_gg_l0
}

/// |NNLO| singlet |OME|
pub fn A_singlet(c: &mut Cache, _nf: u8, L: f64, is_msbar: bool) -> [[Complex<f64>; 3]; 3] {
let A_hq_2 = A_hq_ps(c, _nf, L);
let A_qq_2 = A_qq_ns(c, _nf, L);
let mut A_hg_2 = A_hg(c, _nf, L);
let A_gq_2 = A_gq(c, _nf, L);
let mut A_gg_2 = A_gg(c, _nf, L);

if is_msbar {
felixhekhorn marked this conversation as resolved.
Show resolved Hide resolved
A_hg_2 -= 2.0 * 4.0 * CF * as1::A_hg(c, _nf, 1.0);
A_gg_2 -= 2.0 * 4.0 * CF * as1::A_gg(c, _nf, 1.0);
}

[
[A_gg_2, A_gq_2, Complex::<f64>::zero()],
[Complex::<f64>::zero(), A_qq_2, Complex::<f64>::zero()],
[A_hg_2, A_hq_2, Complex::<f64>::zero()],
]
}

/// |NNLO| non-singlet |OME|
pub fn A_ns(c: &mut Cache, _nf: u8, L: f64) -> [[Complex<f64>; 2]; 2] {
[
[A_qq_ns(c, _nf, L), Complex::<f64>::zero()],
[Complex::<f64>::zero(), Complex::<f64>::zero()],
]
}
Loading