LHAPDF is hosted by Hepforge, IPPP Durham
LHAPDF  6.1.6
LHAPDF::KnotArray1F Class Reference

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

#include <KnotArray.h>

Public Types

typedef boost::multi_array< double, 2 > valarray
 Use the Boost multi_array for efficiency and ease of indexing.
 

Public Member Functions

Construction etc.
 KnotArray1F ()
 Default constructor just for std::map insertability.
 
 KnotArray1F (const std::vector< double > &xknots, const std::vector< double > &q2knots, const valarray &xfs)
 Constructor from x and Q2 knot values, and an xf value grid.
 
 KnotArray1F (const std::vector< double > &xknots, const std::vector< double > &q2knots)
 Constructor from x and Q2 knot values.
 
 KnotArray1F (const KnotArray1F &other)
 
KnotArray1Foperator= (const KnotArray1F &other)
 An explicit operator= is needed due to the Boost multi_array copy semantics.
 
x stuff
void setxs (const std::vector< double > &xs)
 x knot setter
 
const std::vector< double > & xs () const
 x knot accessor
 
const std::vector< double > & logxs () const
 log(x) knot accessor
 
size_t ixbelow (double x) const
 Get the index of the closest x knot row <= x. More...
 
Q2 stuff
void setq2s (const std::vector< double > &q2s)
 Q2 knot setter.
 
const std::vector< double > & q2s () const
 Q2 knot accessor.
 
const std::vector< double > & logq2s () const
 log(Q2) knot accessor
 
size_t iq2below (double q2) const
 
PDF values at (x, Q2) points
const valarrayxfs () const
 xf value accessor (const)
 
valarrayxfs ()
 xf value accessor (non-const)
 
void setxfs (const valarray &xfs)
 xf value setter
 
const double & xf (size_t ix, size_t iq2) const
 

Private Member Functions

void _sync ()
 Synchronise log(x) and log(Q2) arrays from the x and Q2 ones.
 

Private Attributes

std::vector< double > _xs
 List of x knots.
 
std::vector< double > _q2s
 List of Q2 knots.
 
std::vector< double > _logxs
 List of log(x) knots.
 
std::vector< double > _logq2s
 List of log(Q2) knots.
 
valarray _xfs
 List of xf values across the knot array.
 

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. The "1F" means that this is a single-flavour array

Constructor & Destructor Documentation

LHAPDF::KnotArray1F::KnotArray1F ( const KnotArray1F other)
inline

Constructor from another KnotArray1F

An explicit copy constructor is needed due to the Boost multi_array copy semantics

Member Function Documentation

size_t LHAPDF::KnotArray1F::iq2below ( double  q2) const
inline

Get the index of the closest Q2 knot row <= q2

If the value is >= q2_max, return i_max-1 (for polynomial spine construction)

Find the closest knot below the requested value

size_t LHAPDF::KnotArray1F::ixbelow ( double  x) const
inline

Get the index of the closest x knot row <= x.

If the value is >= x_max, return i_max-1 (for polynomial spine construction)

const double& LHAPDF::KnotArray1F::xf ( size_t  ix,
size_t  iq2 
) const
inline

Get the xf value at a particular indexed x,Q2 knot

Todo:
Reverse the order of lookup here to reverse the order of x and Q2 strides in the data file

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