9 #ifndef THEPEG_LHAPDF_H 10 #define THEPEG_LHAPDF_H 15 #include "ThePEG/PDF/PDFBase.h" 81 double x,
double eps = 0.0,
82 Energy2 particleScale =
ZERO)
const;
93 double l, Energy2 particleScale =
ZERO)
const;
104 double x,
double eps = 0.0,
105 Energy2 particleScale =
ZERO)
const;
117 double x,
double eps = 0.0,
118 Energy2 particleScale =
ZERO)
const;
157 bool indexLine(istream & is,
int &
set,
int & mem,
string & file,
158 int & pdftyp,
int & pdfgup,
int & pdfsup,
159 double & xmin,
double & xmax,
160 double & q2min,
double & q2max)
const;
202 void checkUpdate(
double x, Energy2 Q2, Energy2 P2)
const;
276 string doTest(
string input);
329 static void throwNotInstalled();
491 #include "ThePEG/Utilities/ClassTraits.h" 511 static string className() {
return "ThePEG::LHAPDF"; }
515 static string library() {
return "ThePEGLHAPDF.so"; }
const string & PDFName() const
The name if the PDF set to be used.
void setnset() const
Acquire a new nset number.
PersistentIStream is used to read persistent objects from a stream where they were previously written...
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
pair< int, int > getPDFLIBNumbers() const
Used by the interface to select a get the old PDFLIB numbers of the currently chosen set and member...
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
bool enablePartonicGamma
If this PDF allows partonic photons inside a hadron, enable this.
void setPDFName(string name)
Used by the interface to select a set according to a file name.
LHAPDF()
The default constructor.
virtual cPDVector partons(tcPDPtr particle) const
Return the partons which this PDF may extract from the given particle.
int getPDFNumber() const
Used by the interface to select a get the index number of the currently chosen set and member...
void setMaxNSet(int)
Set the maximum number of simultaneous pdfs that can be used in LHAPDF.
static ClassDescription< LHAPDF > initLHAPDF
The static object used to initialize the description of this class.
A concreate implementation of ClassDescriptionBase describing a concrete class with persistent data...
double xMax
The maximum -value for the current PDF set.
virtual bool canHandleParticle(tcPDPtr particle) const
Return true if this PDF can handle the extraction of partons from the given particle.
string name() const
Returns the name of this object, without the path.
Energy2 Q2Min
The minimum -value for the current PDF set.
PersistentOStream is used to write objects persistently to a stream from which they can be read in ag...
virtual double xfvl(tcPDPtr particle, tcPDPtr parton, Energy2 partonScale, double l, Energy2 particleScale=ZERO) const
The valence density.
void setPDFMember(int n)
Used by the interface to select a member in the current set.
Energy2 Q2Max
The maximum -value for the current PDF set.
TransientConstRCPtr is a simple wrapper around a bare const pointer which can be assigned to and from...
double lastX
Save the last value used to avoid recalculation.
PType ptype() const
The particle type.
This is the main namespace within which all identifiers in ThePEG are declared.
void setPDFLIBNumbers(int group, int num)
Used by the interface to select a set and member according to the old PDFLIB numbers.
int member() const
The chosen member of the selected PDF set.
static int lastNSet
The last nset number used by an LHAPDF object.
virtual double xfsx(tcPDPtr particle, tcPDPtr parton, Energy2 partonScale, double x, double eps=0.0, Energy2 particleScale=ZERO) const
The sea density.
virtual double xfx(tcPDPtr particle, tcPDPtr parton, Energy2 partonScale, double x, double eps=0.0, Energy2 particleScale=ZERO) const
The density.
virtual double xfvx(tcPDPtr particle, tcPDPtr parton, Energy2 partonScale, double x, double eps=0.0, Energy2 particleScale=ZERO) const
The valence density.
int theVerboseLevel
The verbosity of the output from the LHAPDF library.
int maxFlav() const
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.
static bool openLHAIndex(ifstream &is)
Try to find a LHAPDF index file, open it in the given file stream.
vector< double > lastXF
Save the last function values returned from the LHAPDF library.
virtual IBPtr clone() const
Make a simple clone of this object.
string thePDFName
The name if the PDF set to be used.
(Anti-) proton or neutron.
void checkInit() const
Initialize the LHAPDF library for the chosen PDF set if it has not been done before.
The LHAPDF class inherits from PDFBase and implements an interface to the LHAPDF library of parton de...
virtual void doinit()
Initialize this object after the setup phase before saving an EventGenerator to disk.
static int MaxNSet
The maximum number of simultaneous pdfs that can be used in LHAPDF.
Energy2 lastQ2
Save the last value used to avoid recalculation.
static vector< int > lastMem
The last mem used in the initialization of a given nset number.
string doTest(string input)
Interface for simple tests.
int theMember
The chosen member of the selected PDF set.
PDFBase is the base class for implementing parton density functions for particles with sub-structure...
Energy2 lastP2
Save the last value used for off-shell photon to avoid recalculation.
LHAPDF & operator=(const LHAPDF &)
The assignment operator is private and must never be called.
RCPtr is a reference counted (smart) pointer.
vector< cPDPtr > cPDVector
A vector of pointers to const ParticleData objects.
void lastReset() const
Reset the saved values from the last call to xfx(), etc.
const ZeroUnit ZERO
ZERO can be used as zero for any unitful quantity.
static void Init()
The standard Init function used to initialize the interfaces.
Exception is the base class for all exceptions to be used in ThePEG.
static std::string getIndexPath()
Try to determine the path to where the LHAPDF index file is located.
PType thePType
The particle type.
double xMin
The minimum -value for the current PDF set.
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
virtual void doinitrun()
Initialize this object.
void initpdfsetm() const
Call the Fortran InitPDFSetM function.
void setPDFNumber(int n)
Used by the interface to select a set and member according to a number.
void initpdfm() const
Call the Fortran InitPDFSetM function.
The default concrete implementation of ClassTraitsBase.
PType
Enumerate the allowed particle types.
void setMinMax()
Deduce the min/max values of and for the selected set.
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...
virtual void dofinish()
Finalize this object.
BaseClassTraits describes the base classes of the templated class.
static vector< string > lastNames
The last names used in the initialization of a given nset number.
int getMaxNSet() const
Get the maximum number of simultaneous pdfs that can be used in LHAPDF.
int theMaxFlav
The maximum number of flavours for which non-zero densities are reported.
int getMaxMember() const
Retrieve the number of members in the chosen PDF.
The templated ClassTraitsBase class defines a set of default information about classes used by ThePEG...
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.
int getMaxFlav() const
Get the maximum number of flavours available in the chosen PDF.
int thePhotonOption
If this is a photon PDF, this describes the option for how to treat the anomalous component...