Parton Distributions

  1. The PDF base class
  2. Symmetries and special cases
  3. Derived classes
The parton distributions file contains the PDF class. PDF is the base class, from which specific PDF classes are derived.

The choice of which PDF to use is made by settings in the Pythia class, see here. These settings also allow to access all the proton PDF's available in the LHAPDF library [Wha05,Buc15]. Thus there is no need for a normal user to study the PDF class. The structure must only be understood when interfacing new PDF's, e.g. ones not yet found in LHAPDF.

The PDF base class

PDF defines the interface that all PDF classes should respect. The constructor requires the incoming beam species to be given: even if used for a proton PDF, one needs to know whether the beam is actually an antiproton. This is one of the reasons why Pythia always defines two PDF objects in an event, one for each beam. PDFs should be defined by overriding the PDF base class, then overriding the following protected method:

virtual void PDF::xfUpdate(int id, double x, double Q2)  
Calculates the PDF distributions for the specified parton id at (x, Q^2) and stores the resulting values in the corresponding fields. If id == 9, the values should be calculated for all relevant partons. The user may choose to always calculate the value for all partons, in which case they should set idSav = 9. The PDF class flexibly handles antiparticle and isospin symmetries, so xfUpdate should always give the values that correspond to the particle with positive id and isospin. Further details and special cases are discussed below, and users should read those carefully before implementing their own PDFs.

PDFs can be obtained from PYTHIA through the Pythia::getPDFPtr method. The PDF class offers a number of public methods.

double PDF::xf(int id, double x, double Q2)  
Returns x * f_id(x, Q2) for the hadron represented by the PDF object. The actual value is calculated by a call to xfUpdate, which must be overridden by classes inheriting from PDF. The result is cached, and subsequent calls with the same id, x and Q2 arguments will return the cached value instead of recalculating them.

double PDF::xfVal(int id, double x, double Q2)  
double PDF::xfSea(int id, double x, double Q2)  
Returns the valence or sea part of the specified distribution. These methods also use caching, as described above, and will call xfUpdate to calculate the distributions if necessary.

virtual void setExtrapolate(bool extrapolate)  
Subclasses of PDF may override this method to switch between freezing parametrizations at the low-x boundary (false) or extrapolate them outside the boundary (true). This method works both for LHAPDF 5, LHAPDF6 and modern internal PDFs. (For some older PDFs the behaviour implemented by the original authors is maintained.) In either case the PDFs are frozen at Q_min and Q_max. (And also at x_max, but this is irrelevant when x_max = 1.)

virtual bool insideBounds(double x, double Q2)  
Subclasses of PDF may override this method to give the user information about whether the specified (x, Q^2) pair falls inside the fit region or not. Currently only implemented for LHAPDF6.

double alphaS(double Q2)  
double mQuarkPDF(int id)  
Subclasses of PDF may override these methods to respectively give the alpha_s of the PDF at the specified Q^2 scale, and the quark mass used to set the flavour threshold for the specified quark id. Currently only implemented for LHAPDF6.

Symmetries and special cases

The PDF class is designed to handle particles through charge conjugation and isospin symmetries when available. For this reason, xfUpdate should always behave the same way, independent of which beam variant is specified for the PDF. Specifically, the particle should always be assumed to have a positive id, and if there are isospin variants, it should be assumed it is the particle with the largest available isospin (the only exceptions are Delta^+^+ and Delta^-, which are treated as variants of the proton). For instance, that means that if the beam is n, then xfUpdate should return values as though it was p. Particles where u and d are symmetric (at least at LO), such as Sigma^0 and Lambda^0, use the average of the u and d contents. The pi^0 also uses the average of pi^+/pi^-, with additional complications due to its ambiguous valence content, as described in the next paragraph. Finally, K^0_S/K^0_L should be treated as K^+ by xfUpdate.

Some mesons have ambiguous valence content. These are eta/eta', K^0_S/K^0_L, the pomeron, and all unflavoured diagonal mesons such as pi^0, rho^0, omega, f_0(980), etc. In these cases, the PDF class keeps track of the current valence content, and gives the corresponding PDF values. The valence content is randomly chosen for each generated event. When the PDF is created, the default choice is defined as the content that is implied by the particle id, i.e. d dbar for pi^0 or rho^0, u ubar for eta or omega, and s sbar for eta'.

For diagonal mesons (except pi^0), the q and qbar contents are always the same. In some contexts, it is still physically meaningful to separate the content into valence and sea, but the valence content can no longer be defined as v(x) = q(x) - qbar(x), since qbar does not correspond to sea content in this scenario. To circumvent this, the antiquark content will instead be used to store the sea content, and the PDF class will take this into account when determining which value to return. This is implemented in the SU21 data files, e.g. the -4 column in SU21Jpsi.dat gives the value of the c/cbar sea. This is also true for eta/eta', which use this scheme for d/dbar, u/ubar and s/sbar.

Derived classes

There is only one pure virtual method, xfUpdate, that therefore must be implemented in any derived class. A reasonable number of such classes come with the program:

For any particle, including all modern proton sets and the SU21 family covering almost all hadrons:

For protons: The current default is NNPDF 2.3.

For charged pions:

For Pomerons (used to describe diffraction):

For photons:

For charged leptons (e, mu, tau) and the proton:

For neutrinos:

There is another method, isSetup(), that returns the base-class boolean variable isSet. This variable is initially true, but could be set false if the setup procedure of a PDF failed, e.g. if the user has chosen an unknown PDF set.

The MRST/MSTW, CTEQ/CT, NNPDF and H1 PDF routines are based on the interpolation in (x, Q) grids. The grid files are stored in the xmldoc subdirectory, like settings and particle data. Only PDF sets that will be used are read in during the initialization stage. Just as input streams can be used to initialize the settings and particle data, so can the individual PDFs be constructed. See the header files for explicit constructor descriptions.