@@ -41,7 +41,7 @@ struct Channels {
4141 pineappl_channels *raw;
4242
4343 /* * @brief Constructor. */
44- Channels () : raw(pineappl_channels_new()) {}
44+ Channels (const std:: size_t convolutions ) : raw(pineappl_channels_new(convolutions )) {}
4545 Channels (const Channels &) = delete ;
4646 Channels (Channels &&) = delete ;
4747
@@ -62,9 +62,6 @@ struct Channels {
6262 const std::size_t combinations = c.channels_entry .size ();
6363 if (combinations == 0 ) return ;
6464
65- const std::size_t nb_convolutions =
66- c.channels_entry [0 ].entry [0 ].first .size ();
67-
6865 std::vector<std::int32_t > pids;
6966 std::vector<double > weights;
7067 for (const SubChannelEntry &s : c.channels_entry ) {
@@ -75,8 +72,7 @@ struct Channels {
7572 weights.push_back (m.second );
7673 }
7774 }
78- pineappl_channels_add (this ->raw , combinations, nb_convolutions, pids.data (),
79- weights.data ());
75+ pineappl_channels_add (this ->raw , combinations, pids.data (), weights.data ());
8076 }
8177
8278 /* *
@@ -154,12 +150,15 @@ struct Grid {
154150 * @param bin_limits bin_limits
155151 * @param mu_scales indexes representing the scales
156152 */
157- Grid (std::vector<Order> &orders, const Channels &channels,
158- pineappl_pid_basis pid_basis, std::vector<int32_t > pids,
153+ Grid (std::vector<Order> &orders,
154+ const Channels &channels,
155+ pineappl_pid_basis pid_basis,
156+ std::vector<int32_t > pids,
159157 std::vector<pineappl_conv_type> &convolution_types,
160158 std::vector<pineappl_kinematics> &kinematics,
161- std::vector<pineappl_interp_tuples> &interp,
162- std::vector<double > &bin_limits, std::vector<std::size_t > &mu_scales)
159+ std::vector<pineappl_interp> &interp,
160+ std::vector<double > &bin_limits,
161+ std::vector<std::size_t > &mu_scales)
163162 : Grid(nullptr ) {
164163 const std::size_t n_orders = orders.size ();
165164 const std::size_t n_bins = bin_limits.size () - 1 ;
@@ -186,9 +185,9 @@ struct Grid {
186185 }
187186
188187 this ->raw = pineappl_grid_new2 (
189- pid_basis, channels. raw , n_orders, raw_orders.data (), n_bins ,
190- bin_limits .data (), n_convs, convolution_types .data (), pids. data (),
191- kinematics .data (), interp .data (), mu_scales.data ());
188+ n_bins, bin_limits. data () , n_orders, raw_orders.data (), channels. raw ,
189+ pid_basis, convolution_types .data (), pids .data (), interp. size (),
190+ interp .data (), kinematics .data (), mu_scales.data ());
192191 }
193192
194193 /* *
0 commit comments