Struct pineappl::fk_table::FkTable

source ·
pub struct FkTable { /* private fields */ }
Expand description

Structure implementing FK tables. These are special Grids, for which the following additional guarantees are given:

  • all subgrids of the grid evaluate the PDFs at a single factorization scale given by FkTable::muf2.
  • all subgrids, for both hadronic initial states (if both initial states are hadronic), share the same x grid. See FkTable::x_grid.
  • the luminosity function is simple, meaning that every entry consists of a single pair of partons with trivial factor 1.0, and all tuples are distinct from each other. See Grid::lumi.
  • the FK table’s grid contains only a single Order, whose exponents are all zero.

Implementations§

source§

impl FkTable

source

pub const fn grid(&self) -> &Grid

Returns the Grid object for this FkTable.

source

pub fn into_grid(self) -> Grid

Converts the FkTable back to a Grid.

source

pub fn table(&self) -> Array4<f64>

Returns the FK table represented as a four-dimensional array indexed by bin, lumi, x1 and x2, in this order.

§Panics

TODO

source

pub fn bins(&self) -> usize

Returns the number of bins for this FkTable.

source

pub fn bin_normalizations(&self) -> Vec<f64>

Extract the normalizations for each bin.

source

pub fn bin_dimensions(&self) -> usize

Extract the number of dimensions for bins.

source

pub fn bin_left(&self, dimension: usize) -> Vec<f64>

Extract the left edges of a specific bin dimension.

source

pub fn bin_right(&self, dimension: usize) -> Vec<f64>

Extract the right edges of a specific bin dimension.

source

pub const fn key_values(&self) -> Option<&HashMap<String, String>>

Access meta data

source

pub fn lumi(&self) -> Vec<(i32, i32)>

Returns the (simplified) luminosity function for this FkTable. All factors are 1.0.

source

pub fn muf2(&self) -> f64

Returns the single muf2 scale of this FkTable.

source

pub fn x_grid(&self) -> Vec<f64>

Returns the x grid that all subgrids for all hadronic initial states share.

source

pub fn write(&self, writer: impl Write) -> Result<(), GridError>

Propagate write to grid

§Errors

TODO

source

pub fn write_lz4(&self, writer: impl Write) -> Result<(), GridError>

Propagate write_lz4 to Grid.

§Errors

See Grid::write_lz4.

source

pub fn convolute( &self, lumi_cache: &mut LumiCache<'_>, bin_indices: &[usize], lumi_mask: &[bool] ) -> Vec<f64>

Propagate convolute to grid

source

pub fn set_key_value(&mut self, key: &str, value: &str)

Set a metadata key-value pair

source

pub fn optimize(&mut self, assumptions: FkAssumptions)

Optimizes the storage of FK tables based of assumptions of the PDFs at the FK table’s scale.

§Panics

TODO

Trait Implementations§

source§

impl TryFrom<Grid> for FkTable

§

type Error = TryFromGridError

The type returned in the event of a conversion error.
source§

fn try_from(grid: Grid) -> Result<Self, Self::Error>

Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.