#include <LHAPDF.h>
Internal helper functions. | |
bool | indexLine (istream &is, int &set, int &mem, string &file, int &pdftyp, int &pdfgup, int &pdfsup, double &xmin, double &xmax, double &q2min, double &q2max) const |
Read a line from the index file. | |
void | initpdfsetm () const |
Call the Fortran InitPDFSetM function. | |
void | initpdfm () const |
Call the Fortran InitPDFSetM function. | |
void | lastReset () const |
Reset the saved values from the last call to xfx(), etc. | |
void | setnset () const |
Acquire a new nset number. | |
int | getMaxMember () const |
Retrieve the number of members in the chosen PDF. | |
int | getMaxFlav () const |
Get the maximum number of flavours available in the chosen PDF. | |
void | checkInit () const |
Initialize the LHAPDF library for the chosen PDF set if it has not been done before. | |
void | checkUpdate (double x, Energy2 Q2, Energy2 P2) const |
Retrieve new PDF values for the given parameters if they were changed since the last call. | |
void | setMaxNSet (int) |
Set the maximum number of simultaneous pdfs that can be used in LHAPDF. | |
int | getMaxNSet () const |
Get the maximum number of simultaneous pdfs that can be used in LHAPDF. | |
void | setMinMax () |
Deduce the min/max values of and for the selected set. | |
void | setPDFNumber (int n) |
Used by the interface to select a set and member according to a number. | |
int | getPDFNumber () const |
Used by the interface to select a get the index number of the currently chosen set and member. | |
void | setPDFLIBNumbers (int group, int num) |
Used by the interface to select a set and member according to the old PDFLIB numbers. | |
string | setPDFLIBNumbers (string) |
Used by the interface to select a set and member according to the old PDFLIB numbers. | |
pair< int, int > | getPDFLIBNumbers () const |
Used by the interface to select a get the old PDFLIB numbers of the currently chosen set and member. | |
void | setPDFName (string name) |
Used by the interface to select a set according to a file name. | |
void | setPDFMember (int n) |
Used by the interface to select a member in the current set. | |
string | doTest (string input) |
Interface for simple tests. | |
static std::string | getIndexPath () |
Try to determine the path to where the LHAPDF index file is located. | |
static bool | openLHAIndex (ifstream &is) |
Try to find a LHAPDF index file, open it in the given file stream. | |
Public Types | |
enum | PType { nucleonType = 1, pionType = 2, photonType = 3 } |
Enumerate the allowed particle types. More... | |
Public Member Functions | |
Standard constructors and destructors. | |
LHAPDF () | |
The default constructor. | |
LHAPDF (const LHAPDF &) | |
The copy constructor. | |
Virtual functions to be overridden by sub-classes. | |
virtual bool | canHandleParticle (tcPDPtr particle) const |
Return true if this PDF can handle the extraction of partons from the given particle. | |
virtual cPDVector | partons (tcPDPtr particle) const |
Return the partons which this PDF may extract from the given particle. | |
virtual double | xfx (tcPDPtr particle, tcPDPtr parton, Energy2 partonScale, double x, double eps=0.0, Energy2 particleScale=ZERO) const |
The density. | |
virtual double | xfvl (tcPDPtr particle, tcPDPtr parton, Energy2 partonScale, double l, Energy2 particleScale=ZERO) const |
The valence density. | |
virtual double | xfvx (tcPDPtr particle, tcPDPtr parton, Energy2 partonScale, double x, double eps=0.0, Energy2 particleScale=ZERO) const |
The valence density. | |
virtual double | xfsx (tcPDPtr particle, tcPDPtr parton, Energy2 partonScale, double x, double eps=0.0, Energy2 particleScale=ZERO) const |
The sea density. | |
Simple access function. | |
PType | ptype () const |
The particle type. | |
const string & | PDFName () const |
The name if the PDF set to be used. | |
int | member () const |
The chosen member of the selected PDF set. | |
int | maxFlav () const |
The maximum number of flavours for which non-zero densities are reported. | |
Functions used by the persistent I/O system. | |
void | persistentOutput (PersistentOStream &os) const |
Function used to write out object persistently. | |
void | persistentInput (PersistentIStream &is, int version) |
Function used to read in object persistently. | |
Static Public Member Functions | |
static void | Init () |
The standard Init function used to initialize the interfaces. | |
Protected Member Functions | |
Clone Methods. | |
virtual IBPtr | clone () const |
Make a simple clone of this object. | |
virtual IBPtr | fullclone () const |
Make a clone of this object, possibly modifying the cloned object to make it sane. | |
Standard Interfaced functions. | |
virtual void | doinit () |
Initialize this object after the setup phase before saving an EventGenerator to disk. | |
virtual void | doinitrun () |
Initialize this object. | |
virtual void | dofinish () |
Finalize this object. | |
Private Member Functions | |
LHAPDF & | operator= (const LHAPDF &) |
The assignment operator is private and must never be called. | |
Private Attributes | |
PType | thePType |
The particle type. | |
string | thePDFName |
The name if the PDF set to be used. | |
int | theMember |
The chosen member of the selected PDF set. | |
int | thePhotonOption |
If this is a photon PDF, this describes the option for how to treat the anomalous component. | |
bool | enablePartonicGamma |
If this PDF allows partonic photons inside a hadron, enable this. | |
int | theVerboseLevel |
The verbosity of the output from the LHAPDF library. | |
int | theMaxFlav |
The maximum number of flavours for which non-zero densities are reported. | |
int | nset |
The LHAPDF nset number (minus one) to be used by this object. | |
Energy2 | lastQ2 |
Save the last value used to avoid recalculation. | |
double | lastX |
Save the last value used to avoid recalculation. | |
Energy2 | lastP2 |
Save the last value used for off-shell photon to avoid recalculation. | |
vector< double > | lastXF |
Save the last function values returned from the LHAPDF library. | |
double | xMin |
The minimum -value for the current PDF set. | |
double | xMax |
The maximum -value for the current PDF set. | |
Energy2 | Q2Min |
The minimum -value for the current PDF set. | |
Energy2 | Q2Max |
The maximum -value for the current PDF set. | |
Static Private Attributes | |
static int | MaxNSet |
The maximum number of simultaneous pdfs that can be used in LHAPDF. | |
static int | lastNSet |
The last nset number used by an LHAPDF object. | |
static vector< string > | lastNames |
The last names used in the initialization of a given nset number. | |
static vector< int > | lastMem |
The last mem used in the initialization of a given nset number. | |
static ClassDescription< LHAPDF > | initLHAPDF |
The static object used to initialize the description of this class. |
This class is available even if LHAPDF was not properly installed when ThePEG was installed, but will then produce an error in the initialization.
Note that the valence densities from the xfvx() and xfvl() function will only work properly for nucleons. All other particles will have zero valence densities.
Definition at line 33 of file LHAPDF.h.
virtual double ThePEG::LHAPDF::xfx | ( | tcPDPtr | particle, | |
tcPDPtr | parton, | |||
Energy2 | partonScale, | |||
double | x, | |||
double | eps = 0.0 , |
|||
Energy2 | particleScale = ZERO | |||
) | const [virtual] |
The density.
Return the pdf for the given parton inside the given particle for the virtuality partonScale and momentum fraction x (with x = 1-eps). The particle is assumed to have a virtuality particleScale.
Reimplemented from ThePEG::PDFBase.
virtual double ThePEG::LHAPDF::xfvl | ( | tcPDPtr | particle, | |
tcPDPtr | parton, | |||
Energy2 | partonScale, | |||
double | l, | |||
Energy2 | particleScale = ZERO | |||
) | const [virtual] |
The valence density.
Return the pdf for the given cvalence parton inside the given particle for the virtuality partonScale and logarithmic momentum fraction l. The particle is assumed to have a virtuality particleScale. This will only work properly for nucleons. All other particles will have zero valence densities
Reimplemented from ThePEG::PDFBase.
virtual double ThePEG::LHAPDF::xfvx | ( | tcPDPtr | particle, | |
tcPDPtr | parton, | |||
Energy2 | partonScale, | |||
double | x, | |||
double | eps = 0.0 , |
|||
Energy2 | particleScale = ZERO | |||
) | const [virtual] |
The valence density.
Return the pdf for the given cvalence parton inside the given particle for the virtuality partonScale and momentum fraction x (with x = 1-eps). The particle is assumed to have a virtuality particleScale. This will only work properly for nucleons. All other particles will have zero valence densities
Reimplemented from ThePEG::PDFBase.
virtual double ThePEG::LHAPDF::xfsx | ( | tcPDPtr | particle, | |
tcPDPtr | parton, | |||
Energy2 | partonScale, | |||
double | x, | |||
double | eps = 0.0 , |
|||
Energy2 | particleScale = ZERO | |||
) | const [virtual] |
The sea density.
Return the pdf for the given cvalence parton inside the given particle for the virtuality partonScale and momentum fraction x. The particle is assumed to have a virtuality particleScale. If not overidden by a sub class this implementation will assume that the difference between a quark and anti-quark distribution is due do valense quarks.
Reimplemented from ThePEG::PDFBase.
PType ThePEG::LHAPDF::ptype | ( | ) | const [inline] |
const string& ThePEG::LHAPDF::PDFName | ( | ) | const [inline] |
The name if the PDF set to be used.
The full name including the .LHpdf
or .LHgrid
suffix.
Definition at line 135 of file LHAPDF.h.
References thePDFName.
int ThePEG::LHAPDF::maxFlav | ( | ) | const [inline] |
The maximum number of flavours for which non-zero densities are reported.
The actual number of flavours may be less depending on the chosen PDF set.
Definition at line 147 of file LHAPDF.h.
References theMaxFlav.
void ThePEG::LHAPDF::setMaxNSet | ( | int | ) | [protected] |
void ThePEG::LHAPDF::persistentOutput | ( | PersistentOStream & | os | ) | const |
Function used to write out object persistently.
os | the persistent output stream written to. |
Reimplemented from ThePEG::PDFBase.
void ThePEG::LHAPDF::persistentInput | ( | PersistentIStream & | is, | |
int | version | |||
) |
Function used to read in object persistently.
is | the persistent input stream read from. | |
version | the version number of the object when written. |
Reimplemented from ThePEG::PDFBase.
static void ThePEG::LHAPDF::Init | ( | ) | [static] |
The standard Init function used to initialize the interfaces.
Called exactly once for each class by the class description system before the main function starts or when this class is dynamically loaded.
Reimplemented from ThePEG::PDFBase.
virtual IBPtr ThePEG::LHAPDF::clone | ( | ) | const [protected, virtual] |
Make a simple clone of this object.
Implements ThePEG::InterfacedBase.
virtual IBPtr ThePEG::LHAPDF::fullclone | ( | ) | const [protected, virtual] |
Make a clone of this object, possibly modifying the cloned object to make it sane.
Reimplemented from ThePEG::InterfacedBase.
virtual void ThePEG::LHAPDF::doinit | ( | ) | [protected, virtual] |
Initialize this object after the setup phase before saving an EventGenerator to disk.
InitException | if object could not be initialized properly. |
Reimplemented from ThePEG::PDFBase.
virtual void ThePEG::LHAPDF::doinitrun | ( | ) | [protected, virtual] |
Initialize this object.
Called in the run phase just before a run begins.
Reimplemented from ThePEG::InterfacedBase.
virtual void ThePEG::LHAPDF::dofinish | ( | ) | [protected, virtual] |
Finalize this object.
Called in the run phase just after a run has ended. Used eg. to write out statistics.
Reimplemented from ThePEG::InterfacedBase.
The assignment operator is private and must never be called.
In fact, it should not even be implemented.
PType ThePEG::LHAPDF::thePType [private] |
string ThePEG::LHAPDF::thePDFName [private] |
int ThePEG::LHAPDF::theMaxFlav [private] |
int ThePEG::LHAPDF::nset [mutable, private] |
int ThePEG::LHAPDF::MaxNSet [static, private] |
ClassDescription<LHAPDF> ThePEG::LHAPDF::initLHAPDF [static, private] |