LHAPDF C++ wrapper
5.4
|
Namespace containing all the LHAPDF wrapper functions. More...
Classes | |
class | PDFSetInfo |
Structure containing metadata about a PDF set. More... | |
Enumerations | |
enum | Flavour { TBAR = -6, BBAR = -5, CBAR = -4, SBAR = -3, UBAR = -2, DBAR = -1, GLUON = 0, DOWN = 1, UP = 2, STRANGE = 3, CHARM = 4, BOTTOM = 5, TOP = 6, PHOTON = 7 } |
Enum of flavours which map to LHAPDF integer codes. Useful for improving readability of client code. Note that these codes can't be used to access elements of returned vector<double> , which don't use the LHAPDF scheme (they use "LHAPDF code + 6"). | |
enum | SetType { EVOLVE = 0, LHPDF = 0, INTERPOLATE = 1, LHGRID = 1 } |
Distinction between evolution or interpolation PDF sets. Enum to choose whether evolution (i.e. LHpdf data file) or interpolation (i.e. LHgrid data file) is used. | |
enum | Verbosity { SILENT =0, LOWKEY =1, DEFAULT =2 } |
Level of noisiness. | |
Functions | |
Global functions | |
std::string | getVersion () |
Get LHAPDF version string. | |
int | getMaxNumSets () |
Get max allowed number of concurrent sets. | |
void | initLHAPDF () |
Global initialisation. | |
void | setVerbosity (Verbosity noiselevel) |
Choose level of noisiness. | |
void | extrapolate (bool extrapolate=true) |
Extrapolate beyond grid edges. | |
void | setPDFPath (const std::string &path) |
Set the LHAPATH variable (the location of the PDF sets directory). | |
void | setParameter (const std::string &parm) |
Set a steering parameter (direct map to Fortran setlhaparm(parm) function). | |
Set metadata | |
std::ostream & | operator<< (std::ostream &os, const PDFSetInfo &info) |
PDFSetInfo | getPDFSetInfo (const std::string &filename, int memid) |
Get a PDF set info object by filename and member number. | |
PDFSetInfo | getPDFSetInfo (int id) |
Get a PDF set info object by the LHAPDF ID number. | |
std::vector< PDFSetInfo > | getAllPDFSetInfo () |
Get a vector of PDF set info objects for all known sets. | |
Path info functions | |
std::string | prefixPath () |
Get path to LHAPDF installation (the "prefix" path). | |
std::string | pdfsetsPath () |
Get path to LHAPDF PDF sets directory. | |
std::string | pdfsetsIndexPath () |
Get path to LHAPDF PDF sets index file. | |
Initialisation functions | |
LHAPDF functions for initialising PDF sets. If you need to use more than one set simultaneously, use the multi-set functions, which have a integer | |
void | initPDFSet (int setid, int member) |
Initialise member in PDF set setid. | |
void | initPDFSet (int nset, int setid, int member) |
Initialise member in PDF set setid (multi-set version). | |
void | initPDFSet (const std::string &name, SetType type, int member=0) |
Initialise member in PDF set name, of type type. | |
void | initPDFSet (int nset, const std::string &name, SetType type, int member=0) |
Initialise member in PDF set name, of type type (multi-set version). | |
void | initPDFSet (const std::string &filename, int member=0) |
Initialise member in PDF set file filename. If filename contains a "/" character, it will be used as a path, otherwise it will be assumed to be a PDF file in the LHAPDF PDFsets directory. | |
void | initPDFSet (int nset, const std::string &filename, int member=0) |
Initialise member in PDF set file filename (multi-set version). If filename contains a "/" character, it will be used as a path, otherwise it will be assumed to be a PDF file in the LHAPDF PDFsets directory. | |
void | usePDFMember (int member) |
Use member in current PDF set. This operation is computationally cheap. | |
void | usePDFMember (int nset, int member) |
Use member in PDF set nset (multi-set version). This operation is computationally cheap. | |
PDF set information | |
void | getDescription () |
Prints a brief description of the current PDF set to stdout. | |
void | getDescription (int nset) |
Prints a brief description of the current PDF set to stdout. | |
bool | hasPhoton () |
Does the current set have a photon member? | |
int | numberPDF () |
Number of members available in the current set. | |
int | numberPDF (int nset) |
Number of members available in the current set. | |
double | alphasPDF (double Q) |
used by the current PDF. | |
double | alphasPDF (int nset, double Q) |
used by the current PDF. | |
int | getOrderPDF () |
Get order at which the PDF was fitted. | |
int | getOrderPDF (int nset) |
Get order at which the PDF was fitted. | |
int | getOrderAlphaS () |
Perturbative order of parton evolution and respectively. | |
int | getOrderAlphaS (int nset) |
Perturbative order of parton evolution and respectively. | |
double | getQMass (int f) |
Quark mass used for flavour f. | |
double | getQMass (int nset, int f) |
Quark mass used for flavour f. | |
double | getThreshold (int f) |
Threshold for flavour f. | |
double | getThreshold (int nset, int f) |
Threshold for flavour f. | |
int | getNf () |
Number of flavours used in the current PDF set. | |
int | getNf (int nset) |
Number of flavours used in the current PDF set. | |
double | getLam4 (int m) |
Value of QCD for member m. | |
double | getLam4 (int nset, int m) |
Value of QCD for member m. | |
double | getLam5 (int m) |
Value of QCD for member m. | |
double | getLam5 (int nset, int m) |
Value of QCD for member m. | |
double | getXmin (int m) |
Minimum value considered valid for this set, as specified by the set authors. | |
double | getXmin (int nset, int m) |
Minimum value considered valid for this set, as specified by the set authors. | |
double | getXmax (int m) |
Maximum value considered valid for this set, as specified by the set authors. | |
double | getXmax (int nset, int m) |
Maximum value considered valid for this set, as specified by the set authors. | |
double | getQ2min (int m) |
Minimum value considered valid for this set, as specified by the set authors. | |
double | getQ2min (int nset, int m) |
Minimum value considered valid for this set, as specified by the set authors. | |
double | getQ2max (int m) |
Maximum value considered valid for this set, as specified by the set authors. | |
double | getQ2max (int nset, int m) |
Maximum value considered valid for this set, as specified by the set authors. | |
Nucleon PDFs | |
These PDFs are defined for protons — neutron PDFs are usually obtained by isospin conjugation. | |
std::vector< double > | xfx (double x, double Q) |
std::vector< double > | xfx (int nset, double x, double Q) |
void | xfx (double x, double Q, double *results) |
void | xfx (int nset, double x, double Q, double *results) |
double | xfx (double x, double Q, int fl) |
double | xfx (int nset, double x, double Q, int fl) |
Photon PDFs | |
std::vector< double > | xfxp (double x, double Q, double P2, int ip) |
std::vector< double > | xfxp (int nset, double x, double Q, double P2, int ip) |
void | xfxp (double x, double Q, double P2, int ip, double *results) |
void | xfxp (int nset, double x, double Q, double P2, int ip, double *results) |
double | xfxp (double x, double Q, double P2, int ip, int fl) |
double | xfxp (int nset, double x, double Q, double P2, int ip, int fl) |
Nuclear PDFs | |
std::vector< double > | xfxa (double x, double Q, double a) |
std::vector< double > | xfxa (int nset, double x, double Q, double a) |
void | xfxa (double x, double Q, double a, double *results) |
void | xfxa (int nset, double x, double Q, double a, double *results) |
double | xfxa (double x, double Q, double a, int fl) |
double | xfxa (int nset, double x, double Q, double a, int fl) |
Nucleon MRST QED PDF | |
These functions only apply to the MRST QED PDF set, since they return an extra element for the additional photon. | |
std::vector< double > | xfxphoton (double x, double Q) |
std::vector< double > | xfxphoton (int nset, double x, double Q) |
void | xfxphoton (double x, double Q, double *results) |
void | xfxphoton (int nset, double x, double Q, double *results) |
double | xfxphoton (double x, double Q, int fl) |
double | xfxphoton (int nset, double x, double Q, int fl) |
Deprecated initialisation functions | |
LHAPDF functions for initialising PDF sets. If you need to use more than one set simultaneously, use the multi-set functions, which have a integer
| |
void | initPDFSetByName (const std::string &name, SetType type) |
The PDF set by file path, see subdir PDFsets of LHAPDF for choices. More... | |
void | initPDFSetByName (int nset, const std::string &name, SetType type) |
The PDF set by name and type, see subdir PDFsets of LHAPDF for choices. | |
void | initPDFSetByName (const std::string &filename) |
The PDF set by filename, see subdir PDFsets of LHAPDF for choices. | |
void | initPDFSetByName (int nset, const std::string &filename) |
The PDF set by filename, see subdir PDFsets of LHAPDF for choices. | |
void | initPDF (int memset) |
The choice of PDF member out of one distribution. | |
void | initPDF (int nset, int memset) |
The choice of PDF member out of one distribution. | |
void | initPDFByName (const std::string &name, SetType type, int memset) |
Convenient initializer with PDF set name, set type type and member memset. More... | |
void | initPDFByName (int nset, const std::string &name, SetType type, int memset) |
Typical initializer for multiple PDF sets with PDF set name and member memset. More... | |
void | initPDFByName (const std::string &filename, int memset) |
Convenient initializer with PDF set filename and member memset. More... | |
void | initPDFByName (int nset, const std::string &filename, int memset) |
Typical initializer for multiple PDF sets with PDF set name and member memset. More... | |
Namespace containing all the LHAPDF wrapper functions.
void LHAPDF::initPDFByName | ( | const std::string & | name, |
SetType | type, | ||
int | memset | ||
) |
Convenient initializer with PDF set name, set type type and member memset.
name | The name of the desired set. |
type | The type of PDF set (grid or data) by enum. |
memset | PDF number within set name. Equivalent to initPDFSetByName + initPDF . |
Referenced by LHAPDF::PDFSetInfo::toString().
void LHAPDF::initPDFByName | ( | int | nset, |
const std::string & | name, | ||
SetType | type, | ||
int | memset | ||
) |
Typical initializer for multiple PDF sets with PDF set name and member memset.
nset | Specifies the reference number for the set to be initialized. |
name | Name of the desired set. |
type | The type of PDF set (grid or data) by enum. |
memset | PDF number within set name. Equivalent to initPDFSetByNameM + initPDFM . |
void LHAPDF::initPDFByName | ( | const std::string & | filename, |
int | memset | ||
) |
Convenient initializer with PDF set filename and member memset.
filename | The name of the grid or data file of the desired set. |
memset | PDF number within set name. Equivalent to initPDFSetByName + initPDF . |
void LHAPDF::initPDFByName | ( | int | nset, |
const std::string & | filename, | ||
int | memset | ||
) |
Typical initializer for multiple PDF sets with PDF set name and member memset.
nset | Specifies the reference number for the set to be initialized. |
filename | Name of the grid or data file of the desired set. |
memset | PDF number within set name. Equivalent to initPDFSetByNameM + initPDFM . |
void LHAPDF::initPDFSetByName | ( | const std::string & | name, |
SetType | type | ||
) |
The PDF set by file path, see subdir PDFsets
of LHAPDF for choices.
The PDF set by file path, see subdir PDFsets
of LHAPDF for choices. The PDF set by name and type, see subdir PDFsets
of LHAPDF for choices.
Referenced by LHAPDF::PDFSetInfo::toString().
std::vector<double> LHAPDF::xfx | ( | double | x, |
double | Q | ||
) |
Nucleon PDF: returns a vector with index .
Referenced by LHAPDF::PDFSetInfo::toString().
std::vector<double> LHAPDF::xfx | ( | int | nset, |
double | x, | ||
double | Q | ||
) |
Nucleon PDF: returns a vector x
f_i(x, Q) with index .
void LHAPDF::xfx | ( | double | x, |
double | Q, | ||
double * | results | ||
) |
Nucleon PDF: fills primitive 13 element array pointed at by results with with index .
void LHAPDF::xfx | ( | int | nset, |
double | x, | ||
double | Q, | ||
double * | results | ||
) |
Nucleon PDF: fills primitive 13 element array pointed at by results with with index .
double LHAPDF::xfx | ( | double | x, |
double | Q, | ||
int | fl | ||
) |
Nucleon PDF: returns for flavour fl - this time the flavour encoding is as in the LHAPDF manual.
double LHAPDF::xfx | ( | int | nset, |
double | x, | ||
double | Q, | ||
int | fl | ||
) |
Nucleon PDF: returns x
f(x, Q) for flavour fl - this time the flavour encoding is as in the LHAPDF manual.
std::vector<double> LHAPDF::xfxa | ( | double | x, |
double | Q, | ||
double | a | ||
) |
Nuclear PDF: returns a vector with index .
NB. Extra a param for atomic mass number.
Referenced by LHAPDF::PDFSetInfo::toString().
std::vector<double> LHAPDF::xfxa | ( | int | nset, |
double | x, | ||
double | Q, | ||
double | a | ||
) |
Nuclear PDF: returns a vector with index .
NB. Extra a param for atomic mass number.
void LHAPDF::xfxa | ( | double | x, |
double | Q, | ||
double | a, | ||
double * | results | ||
) |
Nuclear PDF: fills primitive 13 element array pointed at by results with with index .
NB. Extra a param for atomic mass number.
void LHAPDF::xfxa | ( | int | nset, |
double | x, | ||
double | Q, | ||
double | a, | ||
double * | results | ||
) |
Nuclear PDF: fills primitive 13 element array pointed at by results with with index .
NB. Extra a param for atomic mass number.
double LHAPDF::xfxa | ( | double | x, |
double | Q, | ||
double | a, | ||
int | fl | ||
) |
Nuclear PDF: returns for flavour fl - this time the flavour encoding is as in the LHAPDF manual.
NB. Extra a param for atomic mass number.
double LHAPDF::xfxa | ( | int | nset, |
double | x, | ||
double | Q, | ||
double | a, | ||
int | fl | ||
) |
Nuclear PDF: returns for flavour fl - this time the flavour encoding is as in the LHAPDF manual.
NB. Extra a param for atomic mass number.
std::vector<double> LHAPDF::xfxp | ( | double | x, |
double | Q, | ||
double | P2, | ||
int | ip | ||
) |
Photon PDF: returns a vector with index .
NB. Extra P2 and ip params.
Referenced by LHAPDF::PDFSetInfo::toString().
std::vector<double> LHAPDF::xfxp | ( | int | nset, |
double | x, | ||
double | Q, | ||
double | P2, | ||
int | ip | ||
) |
Photon PDF: returns a vector with index .
NB. Extra P2 and ip params.
void LHAPDF::xfxp | ( | double | x, |
double | Q, | ||
double | P2, | ||
int | ip, | ||
double * | results | ||
) |
Photon PDF: fills primitive 13 element array pointed at by results with with index .
NB. Extra P2 and ip params.
void LHAPDF::xfxp | ( | int | nset, |
double | x, | ||
double | Q, | ||
double | P2, | ||
int | ip, | ||
double * | results | ||
) |
Photon PDF: fills primitive 13 element array pointed at by results with with index .
NB. Extra P2 and ip params.
double LHAPDF::xfxp | ( | double | x, |
double | Q, | ||
double | P2, | ||
int | ip, | ||
int | fl | ||
) |
Photon PDF: returns for flavour fl - this time the flavour encoding is as in the LHAPDF manual.
NB. Extra P2 and ip params.
double LHAPDF::xfxp | ( | int | nset, |
double | x, | ||
double | Q, | ||
double | P2, | ||
int | ip, | ||
int | fl | ||
) |
Photon PDF: returns for flavour fl - this time the flavour encoding is as in the LHAPDF manual.
NB. Extra P2 and ip params.
std::vector<double> LHAPDF::xfxphoton | ( | double | x, |
double | Q | ||
) |
MRST QED PDF: returns a vector with index .
NB. Note extra element in this set for MRST photon.
Referenced by LHAPDF::PDFSetInfo::toString().
std::vector<double> LHAPDF::xfxphoton | ( | int | nset, |
double | x, | ||
double | Q | ||
) |
MRST QED PDF: returns a vector with index .
void LHAPDF::xfxphoton | ( | double | x, |
double | Q, | ||
double * | results | ||
) |
MRST QED PDF: fills primitive 14 element array pointed at by results with with index .
NB. Note extra element in this set for MRST photon.
void LHAPDF::xfxphoton | ( | int | nset, |
double | x, | ||
double | Q, | ||
double * | results | ||
) |
MRST QED PDF: fills primitive 14 element array pointed at by results with with index .
NB. Note extra element in this set for MRST photon.
double LHAPDF::xfxphoton | ( | double | x, |
double | Q, | ||
int | fl | ||
) |
MRST QED PDF: returns for flavour fl - this time the flavour encoding is as in the LHAPDF manual.
NB. Note extra element in this set for MRST photon.
double LHAPDF::xfxphoton | ( | int | nset, |
double | x, | ||
double | Q, | ||
int | fl | ||
) |
MRST QED PDF: returns for flavour fl - this time the flavour encoding is as in the LHAPDF manual.