From e8dba2bec56646bb6e2a4b8f9c419da47cab662a Mon Sep 17 00:00:00 2001 From: Christopher Schwan Date: Tue, 6 Aug 2024 12:39:30 +0200 Subject: [PATCH] Fix bug in DIS evolution --- pineappl/src/evolution.rs | 2 +- pineappl/src/grid.rs | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/pineappl/src/evolution.rs b/pineappl/src/evolution.rs index 1bb7433e..d3f6a970 100644 --- a/pineappl/src/evolution.rs +++ b/pineappl/src/evolution.rs @@ -500,7 +500,7 @@ pub(crate) fn evolve_slice_with_one( })); } - let pid = grid.channels()[0].entry()[0].0[index]; + let pid = grid.channels()[0].entry()[0].0[1 - index]; Ok(( Array1::from_iter(sub_fk_tables) diff --git a/pineappl/src/grid.rs b/pineappl/src/grid.rs index 4a997a03..baf2dfc4 100644 --- a/pineappl/src/grid.rs +++ b/pineappl/src/grid.rs @@ -1582,6 +1582,9 @@ impl Grid { // TODO: convert this unwrap into error let grid = lhs.unwrap(); + // check that the convolutions are unchanged + assert_eq!(self.convolutions(), grid.convolutions()); + // UNWRAP: merging evolved slices should be a proper FkTable again Ok(FkTable::try_from(grid).unwrap_or_else(|_| unreachable!())) }