Skip to content

Commit

Permalink
fix modes for singlet QED and use == in if statements
Browse files Browse the repository at this point in the history
  • Loading branch information
tgiani committed Dec 9, 2024
1 parent 6a3af19 commit f0a727d
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion crates/eko/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ fn unravel_qed_ns(res: Vec<Vec<Complex<f64>>>, order_qcd: usize, order_qed: usiz
#[no_mangle]
pub unsafe extern "C" fn rust_quad_ker_qcd(u: f64, rargs: *mut c_void) -> f64 {
let args = *(rargs as *mut QuadQCDargs);
let is_singlet = (100 == args.mode0) || (21 == args.mode0) || (90 == args.mode0);
let is_singlet = (100 == args.mode0) || (21 == args.mode0) || (90 == args.mode0)|| (22 == args.mode0) || (101 == args.mode0);
let is_qed_valence = (10200 == args.mode0) || (10204 == args.mode0);
// prepare Mellin stuff
let path = mellin::TalbotPath::new(u, args.logx, is_singlet);
Expand Down
2 changes: 1 addition & 1 deletion src/eko/kernels/non_singlet.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ def dispatcher(order, method, gamma_ns, a1, a0, nf, ev_op_iterations): # pylint
return eko_ordered_truncated(
gamma_ns, a1, a0, betalist, order, ev_op_iterations
)
if method is EvoMethods.TRUNCATED:
if method == EvoMethods.TRUNCATED:
return eko_truncated(gamma_ns, a1, a0, betalist, order, ev_op_iterations)

# NLO
Expand Down
8 changes: 4 additions & 4 deletions src/eko/kernels/singlet.py
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@ def dispatcher( # pylint: disable=too-many-return-statements
# Common method for NLO and NNLO
if method in [EvoMethods.ITERATE_EXACT, EvoMethods.ITERATE_EXPANDED]:
return eko_iterate(gamma_singlet, a1, a0, betalist, order, ev_op_iterations)
if method is EvoMethods.PERTURBATIVE_EXACT:
if method == EvoMethods.PERTURBATIVE_EXACT:
return eko_perturbative(
gamma_singlet,
a1,
Expand All @@ -624,7 +624,7 @@ def dispatcher( # pylint: disable=too-many-return-statements
ev_op_max_order,
True,
)
if method is EvoMethods.PERTURBATIVE_EXPANDED:
if method == EvoMethods.PERTURBATIVE_EXPANDED:
return eko_perturbative(
gamma_singlet,
a1,
Expand All @@ -638,13 +638,13 @@ def dispatcher( # pylint: disable=too-many-return-statements
if method in [EvoMethods.TRUNCATED, EvoMethods.ORDERED_TRUNCATED]:
return eko_truncated(gamma_singlet, a1, a0, betalist, order, ev_op_iterations)
# These methods are scattered for nlo and nnlo
if method is EvoMethods.DECOMPOSE_EXACT:
if method == EvoMethods.DECOMPOSE_EXACT:
if order[0] == 2:
return nlo_decompose_exact(gamma_singlet, a1, a0, betalist)
if order[0] == 3:
return nnlo_decompose_exact(gamma_singlet, a1, a0, betalist)
return n3lo_decompose_exact(gamma_singlet, a1, a0, nf)
if method is EvoMethods.DECOMPOSE_EXPANDED:
if method == EvoMethods.DECOMPOSE_EXPANDED:
if order[0] == 2:
return nlo_decompose_expanded(gamma_singlet, a1, a0, betalist)
if order[0] == 3:
Expand Down
2 changes: 1 addition & 1 deletion src/eko/kernels/singlet_qed.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def dispatcher(
e_s : numpy.ndarray
singlet EKO
"""
if method is EvoMethods.ITERATE_EXACT:
if method == EvoMethods.ITERATE_EXACT:
return eko_iterate(
gamma_singlet, as_list, a_half, nf, order, ev_op_iterations, 4
)
Expand Down
2 changes: 1 addition & 1 deletion src/eko/kernels/valence_qed.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def dispatcher(
e_v : numpy.ndarray
singlet EKO
"""
if method is EvoMethods.ITERATE_EXACT:
if method == EvoMethods.ITERATE_EXACT:
return eko_iterate(
gamma_valence, as_list, a_half, nf, order, ev_op_iterations, 2
)
Expand Down

0 comments on commit f0a727d

Please sign in to comment.