Skip to content

Commit

Permalink
Various minor fixes from changes of enum variants and CR
Browse files Browse the repository at this point in the history
  • Loading branch information
Radonirinaunimi committed Feb 7, 2025
1 parent bc021f5 commit f4d5ccf
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion examples/cpp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,4 @@ modify-grid: modify-grid.cpp
PHONY: clean

clean:
rm -f $(PROGRAMS)
rm -f $(PROGRAMS) *.pineappl *.lz4
2 changes: 1 addition & 1 deletion examples/cpp/modify-grid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ int main(int argc, char* argv[]) {

// 4. optimize grid selectively. The following example removes all perturbative orders whose
// subgrids are empty
pineappl_grid_optimize_using(grid, pineappl_gof_STRIP_EMPTY_ORDERS);
pineappl_grid_optimize_using(grid, PINEAPPL_GOF_STRIP_EMPTY_ORDERS);

// 5. set a remapper. This function is important if one wants to generate multi-dimensional
// differential distributions, which first must be generated one-dimensional, because
Expand Down
22 changes: 11 additions & 11 deletions examples/object-oriented-cpp/dyaa.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,26 +123,26 @@ int main() {
1.8, 1.9, 2.0, 2.1, 2.2, 2.3, 2.4};

// --- Construct the PineAPPL grid
pineappl_pid_basis pid_basis = Evol;
pineappl_pid_basis pid_basis = PINEAPPL_PID_BASIS_EVOL;
std::vector<std::int32_t> pids = {2212, 2212};

// Define the types of convolutions
pineappl_conv_type h1 = UnpolPDF;
pineappl_conv_type h2 = UnpolPDF;
pineappl_conv_type h1 = PINEAPPL_CONV_TYPE_UNPOL_PDF;
pineappl_conv_type h2 = PINEAPPL_CONV_TYPE_UNPOL_PDF;
std::vector<pineappl_conv_type> convolution_types = {h1, h2};

// Define the Kinematics
pineappl_kinematics scales = {Scale, 0};
pineappl_kinematics x1 = {X, 0};
pineappl_kinematics x2 = {X, 1};
pineappl_kinematics scales = {PINEAPPL_KINEMATICS_SCALE, 0};
pineappl_kinematics x1 = {PINEAPPL_KINEMATICS_X, 0};
pineappl_kinematics x2 = {PINEAPPL_KINEMATICS_X, 1};
std::vector<pineappl_kinematics> kinematics = {scales, x1, x2};

// Define the interpolation configurations
pineappl_reweight_meth scales_reweight = NoReweight; // Reweighting method
pineappl_reweight_meth moment_reweight = ApplGridX;
pineappl_map scales_mapping = ApplGridH0; // Mapping method
pineappl_map moment_mapping = ApplGridF2;
pineappl_interp_meth interpolation_meth = Lagrange;
pineappl_reweight_meth scales_reweight = PINEAPPL_REWEIGHT_METH_NO_REWEIGHT; // Reweighting method
pineappl_reweight_meth moment_reweight = PINEAPPL_REWEIGHT_METH_APPL_GRID_X;
pineappl_map scales_mapping = PINEAPPL_MAP_APPL_GRID_H0; // Mapping method
pineappl_map moment_mapping = PINEAPPL_MAP_APPL_GRID_F2;
pineappl_interp_meth interpolation_meth = PINEAPPL_INTERP_METH_LAGRANGE;
std::vector<pineappl_interp_tuples> interpolations = {
{1e2, 1e8, 40, 3, scales_reweight, scales_mapping,
interpolation_meth}, // Interpolation fo `scales`
Expand Down
4 changes: 2 additions & 2 deletions pineappl_capi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ pub unsafe extern "C" fn pineappl_grid_convolve_with_two(
alphas: extern "C" fn(q2: f64, state: *mut c_void) -> f64,
pdf1_state: *mut c_void,
pdf2_state: *mut c_void,
alphas_states: *mut c_void,
alphas_state: *mut c_void,
order_mask: *const bool,
channel_mask: *const bool,
xi_ren: f64,
Expand All @@ -544,7 +544,7 @@ pub unsafe extern "C" fn pineappl_grid_convolve_with_two(
let grid = unsafe { &*grid };
let mut xfx1 = |id, x, q2| xfx(id, x, q2, pdf1_state);
let mut xfx2 = |id, x, q2| xfx(id, x, q2, pdf2_state);
let mut als = |q2| alphas(q2, alphas_states);
let mut als = |q2| alphas(q2, alphas_state);
let order_mask = if order_mask.is_null() {
&[]
} else {
Expand Down

0 comments on commit f4d5ccf

Please sign in to comment.