Crate pineappl_capi[][src]

C-language interface for PineAPPL.

Structs

KeyVal

Key-value storage for passing optional information during grid creation with pineappl_grid_new.

Lumi

Type for defining a luminosity function.

SubGrid

Type for reading and accessing subgrids.

Functions

pineappl_grid_bin_count

Returns the number of bins in grid.

pineappl_grid_bin_dimensions

Returns the number of dimensions of the bins this grid has.

pineappl_grid_bin_limitsDeprecated

Stores the bin limits of grid in bin_limits.

pineappl_grid_bin_limits_left

Write the left limits for the specified dimension into left.

pineappl_grid_bin_limits_right

Write the right limits for the specified dimension into right.

pineappl_grid_bin_sizes

Stores the bin sizes of grid in bin_sizes.

pineappl_grid_convolute

Convolutes the specified grid with the PDFs xfx1 and xfx2 and strong coupling alphas. These functions must evaluate the PDFs for the given x and q2 for the parton with the given PDG id, pdg_id, and return the result. Note that the value must be the PDF multiplied with its argument x. The value of the pointer state provided to these functions is the same one given to this function. The parameter order_mask must be as long as there are perturbative orders contained in grid and is used to selectively disable (false) or enable (true) individual orders. If order_mask is set to NULL, all orders are active. The parameter lumi_mask can be used similarly, but must be as long as the luminosity function grid was created with has entries, or NULL to enable all luminosities. The values xi_ren and xi_fac can be used to vary the renormalization and factorization from its central value, which corresponds to 1.0. After convolution of the grid with the PDFs the differential cross section for each bin is written into results.

pineappl_grid_delete

Delete a grid previously created with pineappl_grid_new.

pineappl_grid_ext

Performs an operation name on grid using as input or output parameters key_vals. This is used to get access to functions that are otherwise not available through other functions. If the operation was successful, returns true. Otherwise, or if the name wasn’t recognized false is returned. The parameter _key_vals is currently ignored.

pineappl_grid_fill

Fill grid for the given momentum fractions x1 and x2, at the scale q2 for the given value of the order, observable, and lumi with weight.

pineappl_grid_fill_all

Fill grid for the given momentum fractions x1 and x2, at the scale q2 for the given value of the order and observable with weights. The parameter of weight must contain a result for entry of the luminosity function the grid was created with.

pineappl_grid_fill_array

Fill grid with as many points as indicated by size.

pineappl_grid_lumi

Return the luminosity function of grid.

pineappl_grid_merge_and_delete

Merges other into grid and subsequently deletes other.

pineappl_grid_new

Creates a new and empty grid. The creation requires four different sets of parameters:

pineappl_grid_optimize

Optimizes the grid representation for space efficiency.

pineappl_grid_order_count

Return the number of orders in grid.

pineappl_grid_order_params

Write the order parameters of grid into order_params.

pineappl_grid_read

Read a PineAPPL grid from a file with name filename.

pineappl_grid_scale

Scale all grids in grid by factor.

pineappl_grid_scale_by_order

Scales each subgrid by a factor which is the product of the given values alphas, alpha, logxir, and logxif, each raised to the corresponding powers for each subgrid. In addition, every subgrid is scaled by a factor global independently of its order.

pineappl_grid_set_key_value

Sets an internal key-value pair for the grid.

pineappl_grid_write

Write grid to a file with name filename.

pineappl_keyval_bool

Get the boolean-valued parameter with name key stored in key_vals.

pineappl_keyval_delete

Delete the previously created object pointed to by key_vals.

pineappl_keyval_double

Get the double-valued parameter with name key stored in key_vals.

pineappl_keyval_int

Get the string-valued parameter with name key stored in key_vals.

pineappl_keyval_new

Return a pointer to newly-created pineappl_keyval object.

pineappl_keyval_set_bool

Set the double-valued parameter with name key to value in key_vals.

pineappl_keyval_set_double

Set the double-valued parameter with name key to value in key_vals.

pineappl_keyval_set_int

Set the int-valued parameter with name key to value in key_vals.

pineappl_keyval_set_string

Set the string-valued parameter with name key to value in key_vals.

pineappl_keyval_string

Get the int-valued parameter with name key stored in key_vals.

pineappl_lumi_add

Adds a linear combination of initial states to the luminosity function lumi.

pineappl_lumi_combinations

Returns the number of combinations of the luminosity function lumi for the specified entry.

pineappl_lumi_count

Returns the number of channel for the luminosity function lumi.

pineappl_lumi_delete

Delete luminosity function previously created with pineappl_lumi_new.

pineappl_lumi_entry

Read out the channel with index entry of the luminosity function lumi. The PDG ids and factors will be copied into pdg_ids and factors.

pineappl_lumi_new

Creates a new luminosity function and returns a pointer to it. If no longer needed, the object should be deleted using pineappl_lumi_delete.

pineappl_subgrid_delete

Deletes a subgrid created with pineappl_subgrid_new. If subgrid is the null pointer, nothing is done.

pineappl_subgrid_fill_q2_slice

Fills the slice with the given index of subgrid with the contents of slice.

pineappl_subgrid_filled_q2_slices

Write into tuple the lower and upper limit of filled q2 slices for the grid with the specified indices. The last slice that is filled is one minus the upper limit.

pineappl_subgrid_new

Creates a new subgrid, using the paramters stored in keyvals. If key_vals is the null pointer, default parameters are chosen.

pineappl_subgrid_q2_grid

Writes into buffer the q2 values that the grid spans.

pineappl_subgrid_q2_grid_count

Returns the number grid values in q2 direction.

pineappl_subgrid_q2_slice

Fills buffer with the q2-slice for the index q2_slice of the grid for the specified order, bin, and lumi.

pineappl_subgrid_replace_and_delete

This function takes replaces the subgrid in grid with the corresponding indices order, bin and lumi with the one given in subgrid. If subgrid is the null pointer, nothing is done.

pineappl_subgrid_x_grid

Writes into buffer the x values that the grid spans.

pineappl_subgrid_x_grid_count

Returns the number grid values in x direction.