LHAPDF 6.5.6
Loading...
Searching...
No Matches
LHAPDF::KnotArray Class Reference

Internal storage class for PDF data point grids. More...

#include <KnotArray.h>

Public Member Functions

size_t size () const
 How many flavours are stored in the grid.
size_t numflavs () const
 How many flavours are stored in the grid.
size_t xsize () const
 How many x knots are there.
size_t q2size () const
 How many q2 knots are there.
bool empty () const
 Is this container empty?
size_t ixbelow (double x) const
 Find the largest grid index below given x, such that xknots[index] < x.
size_t iq2below (double q2) const
 Find the largest grid index below given q2, such that q2knots[index] < q2.
double xf (int ix, int iq2, int ipid) const
 Convenient accessor to the grid values.
const double & coeff (int ix, int iq2, int pid, int in) const
 Convenient accessor to the polynomial coefficients.
int lookUpPid (size_t id) const
 Accessor to the internal 'lookup table' for the pid's.
double xs (size_t id) const
 Set of x knots.
double logxs (size_t id) const
 Set of log10(x) knots.
double q2s (size_t id) const
 Set of Q2 knots.
double logq2s (size_t id) const
 Set of log10(Q2) knots.
size_t shape (size_t id) const
 Shape of the interpolation grid.
bool inRangeX (double x) const
 Check if value within the boundaries of xknots.
bool inRangeQ2 (double q2) const
 Check if value within the boundaries of q2knots.
int get_pid (int id) const
bool has_pid (int id) const
void initPidLookup ()
void fillLogKnots ()
Const accessors to the internal data container
const std::vector< double > & xs () const
const std::vector< double > & logxs () const
const std::vector< double > & q2s () const
const std::vector< double > & logq2s () const
Non const accessors for programmatic filling
std::vector< double > & setCoeffs ()
std::vector< double > & setGrid ()
std::vector< double > & setxknots ()
std::vector< double > & setq2knots ()
std::vector< size_t > & setShape ()
std::vector< int > & setPids ()

Private Attributes

std::vector< size_t > _shape
 Shape of the interpolation grid.
std::vector< double > _grid
 Grid values.
std::vector< double > _coeffs
 Storage for the precomputed polynomial coefficients.
std::vector< int > _pids
 Order the PIDs are filled in.
std::vector< int > _lookup
Knots
std::vector< double > _xs
std::vector< double > _q2s
std::vector< double > _logxs
std::vector< double > _logq2s

Detailed Description

Internal storage class for PDF data point grids.

We use "array" to refer to the "raw" knot grid, while "grid" means a grid-based PDF.

Member Function Documentation

◆ coeff()

const double & LHAPDF::KnotArray::coeff ( int ix,
int iq2,
int pid,
int in ) const
inline

Convenient accessor to the polynomial coefficients.

Note
Returns reference rather than value, to be able to read multiple adjacent coeffs at once.

◆ fillLogKnots()

void LHAPDF::KnotArray::fillLogKnots ( )
Todo
Document

◆ get_pid()

int LHAPDF::KnotArray::get_pid ( int id) const
inline
Todo
Document and normalise naming style

◆ has_pid()

bool LHAPDF::KnotArray::has_pid ( int id) const
inline
Todo
Document and normalise naming style

◆ initPidLookup()

void LHAPDF::KnotArray::initPidLookup ( )
Todo
Document and normalise naming style

◆ shape()

size_t LHAPDF::KnotArray::shape ( size_t id) const
inline

Shape of the interpolation grid.

Todo
Document/explain better!

Member Data Documentation

◆ _shape

std::vector<size_t> LHAPDF::KnotArray::_shape
private

Shape of the interpolation grid.

Todo
Explain/document better!

The documentation for this class was generated from the following file: