LHAPDF is hosted by Hepforge, IPPP Durham

LHAPDF manual

LHAPDF version 5 User Guide 1

Contents

1  Introduction
2  Installing LHAPDF
    2.1  Version 4.1 onwards
    2.2  Version 4.0 and earlier
3  Interfacing LHAPDF with a Code
    3.1  Using the LHAPDF routines directly
    3.2  Using the LHAGLUE inteface
    3.3  Whether to use .LHpdf or .LHgrid files?
    3.4  Nuclear PDFs
4  Multiset Initialization with Version 5
    4.1  How many sets can be initialised
    4.2  Using multiset initialization with LHAglue
    4.3  Using multiset initialization with native LHAPDF routines
5  C++ wrapper
    5.1  Documentation for new version 5.4 onwards
    5.2  Description (old version 5.3)
6  Routines for calculating PDF uncertainties and correlations

Appendices

A  PDF set numbers and names
B  Examples
    B.1  Example 1: A PDF table
    B.2  Example 2: Calculating Uncertainties for Monte Carlo PDF sets
    B.3  Example 3: A Convenient Wrap
    B.4  Example 4: Using LHAGLUE to do Example 1
    B.4  Example 5: Using Multiset Initalisation

Abstract

The Les Houches Accord PDF (LHAPDF) interface package is designed to work with PDF sets. A PDF set can consist of many individual member PDFs. While the interpretation of the member PDFs depends on the particular set, the LHAPDF interface is specifically designed to accommodate PDFs with uncertainties. For PDFs with uncertainties the PDF set represents one ``fit'' to the data. The individual member of a PDF set are needed to calculate the PDF uncertainty of the observable.

All PDF sets are defined through external files. This means that in many cases a new set can be added by simply downloading its file while the LHAPDF interface code does not change. The user has, since LHAPDF version 2, the option of using parameter files (.LHpdf) and doing the evolution "on the fly" or of using the interpolation grid files (.LHgrid) as supplied by the PDF set authors. The evolution code is not part of LHAPDF. Currently, QCDNUM [1] is the default evolution code fully interfaced with LHAPDF. Other evolution codes can easily be interfaced with the LHAPDF.

Since version 3 the LHAGLUE package 2 has been included as an alternative, and PDFLIB-like, inteface to the LHAPDF code.

The major changes in version 4 are the additional of the photon and pion PDF sets and the access to the QCD parameters Lamdba4/5 quoted by the authors of the PDF sets as applicable to that set.

Version 4.1 introduces a more standard "configure; make; makeinstall" installation procedure using gnu autoconf tools with and has some small changes for compatibility with f90/95 compilers.

Version 5 introduces multiset initialisation whereby several PDFs can be initialised a the beginning and then used interchangeably without incurring the cpu penalty of re-initialization.

1  Introduction

The Les Houches Accord Parton Density Function interface originated at the Les Houches 2001 workshop [2] in the PDF working group to enable the usage of Parton Density Functions with uncertainties in a uniform manner. When PDFs with uncertainties are considered, a ``fit'' to the data no longer is described by a single PDF. Instead in its most flexible implementation, a fit is represented by a PDF set consisting of many individual members. Calculating the observable for all the PDF members enables one to reconstruct the uncertainty on the observable. The LHAPDF interface was made with this in mind and manipulates PDF sets.

The LHAPDF interface can be viewed as a successor to PDFLIB [3]. Many improvements were added, to list some of the features:

Note that the current ``best fit'' PDFs can be viewed as sets with one member PDF and can be easily defined through the PDF set external file definition. Alternatively one can group these ``fits'' is single sets (e.g. MRST98 set) as they often represent best fits given different model assumptions and as such reflect theoretical modeling uncertainties.

As mentioned above, using LHAPDF to determine the PDF uncertainty on an observable will involve evaluating N different PDFs in a single set. How to use the N predictions of the observable depends on the method used in the PDF set for propagation of errors. During the fitting of the PDFs many approximations can be made. An overview is given in the 2001 Les Houches proceedings [2].

2  Installing LHAPDF

The method of installing changed between versions 4.0 and 4.1. These are desribed below:

2.1   LHAPDF Installation (4.1 onwards)

First download the required gzipped tar file (eg lhapdf-v.r.tar.gz) from the downloads section (either with or without the PDFsets as required). Then do the following:-

tar -xvzf lhapdf-v.r.tar.gz to unpack this into the directory lhapdf-v.r.

cd lhapdf-v.r to change directory (v.r = version.revision, eg 4.1).

If you have root priviledge and want the installed files to go by default into /usr/local then do:

./configure

If you do not have root priviledge and/or want the files installed into a different directory then do:

./configure --prefix=/path/to/directory

note: this should be a different directory to the 'lhapdf-v.r.p' directory, otherwise the install step will not work.

If you want to install a memory light version to work with mainly single pdfs then use:

./configure --prefix=/path/to/directory --enable-low-memory

If you want to install with a maximum number of sets different from the default of 3 then use:

./configure --prefix=/path/to/directory --with-max-num-pdfsets=N

From version 5.8.0 onwards there is the additional configuration option to limit the virtual memory footprint of LHAPDF by building with only the code for selected PDFs as follows: ./configure --prefix=/path/to/directory -enable-pdfsets=LIST where LIST is a comma separated list chosen from:
mrst mrst06 mrst98 mrstqed cteq grv nnpdf gjr h1 zeus h1 hera alekhin botje fermi hkn pions photons

Note that -ve values in the list take precedence and exclude the selected PDF set.

Any of the above configuration options can of course be combined to tailor the build to your requirements.

Then do:

./make

./make install

The following directories/files should now have been installed in your selected installation directory.

lib/libLHAPDF.a
The library of LHAPDF (and LHAGLUE) routines to link against your program.
share/lhapdf/PDFsets/ (5.7.0 and earlier only)
The directory containing all the PDF parameter/grid data sets. Note that all the available sets are downloaded in the full tar file, or they can be selected individually after installation. In the latter case they should be put into this directory.
From 5.7.1 onwards the grid files are not included in the distribution and can be downloaded using the '/bin/lhapdf-getdata' script. The default expected location is share/lhapdf/PDFsets but they can be locate anywhere using the 'LHAPATH' environmental variable.
bin/lhapdf-config
A script (which must be in the users execution path) used by the LHAPDF routine "InitPDFsetByName" to determine the correct path to the PDF data sets.
bin/lhapdf-getdata (from 5.7.1 onwards)
A script to download the PDF grid files as required.

From version 5.2.3 onwards additionally the following files are installed:

lib/libLHAPDF.so
The dynamic LHAPDF library

From version 5.3.0 onwards additionally the following files are installed:

lib/libLHAPDFWrap.a (version 5.3.x only).
The static C++ wrapper library
lib/libLHAPDFWrap.so (version 5.3.x only)
The dynamic C++ wrapper library
share/lhapdf/PDFsets.index
A text file detailing the LHaglue PDF numbers and, where applicable, the old PDFLIB equivalent numbers as well as the max and min ranges of X and Q**2.

Note that from verion 5.4.0 onwards all the C++ routines are in the main libLHAPDF library

If you wish to install the various components into different directories than above, the following options to ./configure (as well as --prefix=) can be used:

--bindir=DIR --datadir=DIR --libdir=DIR

More details are given in the INSTALL file in the downloaded package.

2.2   LHAPDF Installation (up to version 4.0)

Installing LHAPDF is simple and can be accomplished in two ways:

    1. Download all the LHAPDF files (including LHAGLUE) in one go from the download page on the web site. Un-tarring this file will create a directory LHAPDFv3 with all the files and makefiles in a subdirectory structure beneath this. There is a Makefile in this directory which will create (with the 'make' or 'make all' command) a library 'libLHAPDF.a', in this same directory, which can then be linked to external programmes.

    2. Alternatively the programme code and input parameter/grid files can be downloaded separately.

The Makefile has other options for compiling only the code relevant to the EVLCTEQ (make evlcteq) evolution code programmes. This is included mainly for compatibility with LHAPDF version 1 and in general it is better to compile the complete code as this will allow different PDF sets from the different authors and also the different type of input files (parameter or grid) to be used seamlessly without recompiling any code.

The 'make clean' command will remove the .o files from the directories once the installation has been successfully accompished.

Thus in its simplest form

download the file 'LHAfullv4.0'
tar -xvf LHAfullv4.0.tar
cd LHAPDFv4
make
make clean
should suffice to install LHAPDF version 4.

3  Interfacing LHAPDF with a Code

Since version 3 there are two ways of interfacing the LHAPDF code into a user program.

1) Using the LHAPDF routines directly.
2) Using the LHAGLUE interface.

3.1  Using the LHAPDF routines directly

The interface of LHAPDF with an external code is easy. We will describe the basic steps sufficient for most applications. In this section we describe single set intitalization. In a following section we describe how to use multiset initialization introduced in version 5. The function calls described here will not be altered in any way in future versions. Including the LHAPDF code into a program involves three steps:

  1. First one has to setup the LHAPDF interface code:

    call InitPDFset(name)

      It is called only once at the beginning of the code. The string variable name is the fully qualified file name of the external PDF file (i.e. including specific directory path) that defines the PDF set. For the default evolution code QCDNUM it will either calculate or read from file the LO/NLO splitting function weights. The calculation of the weights might take some time depending on the chosen grid size. However, after the first run a grid file is created. Subsequent runs will use this file to read in the weights so that the lengthy calculation of these weights is avoided. The file depends on the grid parameters and flavor thresholds. This means different PDF sets can have different grid files. The name of the grid file is specified in the PDF setup file. Appendix B gives a table showing the names of all the available files.

    As emphasised above, when using call InitPDFset the parameter name is the full path qualified name of the set. From version 4.1 onwards and additional routine:

    call InitPDFsetByName(name)

    has been added which uses the "lhapdf-config" script generated during the LHAPDF installation to determine and use the correct path so that in this case name is only the specific PDFset name itself (eg MRST2001nlo.LHpdf).

  2. To use a individual PDF member it has to be initialized:

    call InitPDF(mem)

      The integer mem specifies the member PDF number. This routine only needs to be called when changing to a new PDF member. The time needed to setup depends on the evolution code used. For QCDNUM the grid size is the determining factor. Note that mem=0 selects the ``best fit'' PDF.

  3. Once the PDF member is initialized one can call the evolution codes which will use the selected member.

    The subroutine call

    call evolvePDF(x,Q,f)

    returns the PDF momentum densities f (i.e. x × PDF number density) at double precision momentum fraction x and double precision scale Q. The double precision array f(-6:6) will contain the momentum PDFs using the labeling convention of table 1.

  4.                

    -6
    -5
    -4
    -3
    -2
    -1
     0
    1
    2
    3
    4
    5
    6
    Parton
    tbar
    bbar
    cbar
    sbar
    ubar
    dbar
    g
    d
    u
    s
    c
    b
    t

    Table 1: The flavor enumeration convention used in the LHAPDF interface.

    As long as the member PDF is not changed (by the call InitPDF of step 2) the evolution calls will always use the same PDF member.

    Note also special routine and function for the MRST2004qed set, which has an extra parameter for the photon density distribution generated in this fit:

    call evolvePDFphoton(x,Q,f,photon)

    has_photon() returns true for this set.

    A different subroutine call

    call evolvePDFp(x,Q,P2,IP2,f)

    is available for the photon PDFs where Q is the QCD scale in GeV, P2 is the vitruality of the photon in GeV2, which should by 0 for an on-shell photon, and IP2 is the parameter to evaluate the off-shell anomalous component. x and f are as above. Note that all inputs and outputs are defined in DOUBLE PRECISION

A few additional calls listed below can be useful:

function alphasPDF(Q) This double precision function call returns the values of aS(Q) at double precision scale Q. Note that its value can change between different PDF members.
call GetLam4(mem,qcdl4)
call GetLam5(mem,qlam5)
return the values of qcdl4 and qcdl5 for the member number mem of the current set.. Note that the values should be used with care due to the differing defintions of lambda.
call GetXmin(mem,xmin)
call GetXmin(mem,xmin)
call GetQ2max(mem,q2max)
call GetQ2min(mem,q2min)
return the minimum and maximum values of x and Q**2 as defined by the PDF authors for the member number mem of the current set (version 5.3.0 onwards) ..
call numberPDF(Nmem) Returns as Nmem the number of PDF members in the set:(excluding the special ``best fit'' member, i.e. the member numbers run from 0 to Nmem)
call GetOrderPDF(order) To get the evolution order of the PDFs. The integer variable order is 0 for Leading Order, 1 for Next-to-Leading Order, etc.
call GetOrderAs(order) To get the evolution order of aS. The integer variable order is 0 for Leading Order, 1 for Next-to-Leading Order, etc.
call GetRenFac(muf) Gives the ratio of the renormalization scale over the factorization scale used in the ``fit''. The double precision variable muf contains the ratio. Usually muf is equal to unity.
call GetDesc() This call will print the PDF description to the default output stream.
call GetQmass(nf,mass) The mass mass is returned for quark flavor nf. The quark masses are used in the aS evolution.
call GetThreshold(nf,Q) The flavor threshold Q is returned for flavor nf. If Q=-1d0 the flavor is not in the evolution (e.g. the top quark is usually not included in the evolution). If Q=0d0 the flavor is parametrized at the parametrization scale. For positive non-zero values of Q the value is set to the flavor threshold at which the PDF starts to evolve.
call GetNf(nfmax) For the PDF sets of the .LHpdf type, returns the number of flavor thresholds in the PDF evolution. Usually the returned value for nfmax is equal to five as the top quark is usually not considered in the PDFs. For the PDF sets of the .LHgrid type -1 is returned.
call GetLHAPDFVersion(version) Returns the version number of LHAPDF being used

3.2  Using the LHAGLUE interface

The LHAGLUE interface 2 has been designed as a PDFLIB look alike interface to LHAPDF.

The interface contains four subroutines (similar to PDFLIB) and can be used seamlessly by Monte Carlo generators interfaced to PDFLIB or in stand-alone mode.

Of course any of the LHAPDF routines, except the initialization routines InitPDFset and InitPDF, described in the previous subsection can also be used, for example to return the value of alphas (alphasPDF(Q)) or print the file description (GetDesc()).

The interface can be invoked 3 ways depending on the value of parm(1) provided by the user when calling PDFSET(parm,value)

The LHAPDF set/number is selected depending on the value of:

There are other CONTROL switches which determine how the interface operates. The location of the LHAPDF library has to be specified as described below, the rest are optional.If the user does nothing, sensible defaults are active. To change the behaviour the corresponding values of parm() should be set to the values given below.

1) Location of the LHAPDF library of PDFs (pathname):

From version LHAPDF v4.1 onwards, and the LHAglue routines distributed with it, the location of the PDFsets data files is set automatically using the "lhapdf-config" script, provided that the precribed installation instructions have been used.

Alternatively from version 5.0 onwards the PDFsets path can also be specified

(a) with the call

(b) with the environmental variable

The order of precedence is (a), (b) then, lhapdf-config

The maximum length of the path is set to 232. Should this need to be increased then it can be changed in the include file "src/pathsetup.inc", followed by a complete recompilation.

For previous version (4.0 and earlier) the following describes the situation:

The following use the common block

CHARACTER*20 LHAPARM(20)
REAL*8 LHAVALUE(20)

COMMON/LHACONTROL/LHAPARM,LHAVALUE

which can be used directly in the user's program.

Alternatively the various flags can be set and reset using the CALL SetLHAPARM(string) function call, thus removing the need to include the common block in the user's program.

2) Collect statistics on under/over-low requests for PDFs outside their validity ranges in X and Q**2.

or then

3) Option to use the values for the strong coupling alpha_s as computed in LHAPDF

or

4) Extrapolation of PDFs outside the LHAPDF validity range given by [Xmin,Xmax] and [Q2min,Q2max]:

or    The values [Xmin,Xmax] and [Q2min,Q2max] are available in the common block
   COMMON/W50513/XMIN,XMAX,Q2MIN,Q2MAX as in PDFLIB

5) Printout of initialization information in PDFSET (by default):

or

6) Double Precision values of qcdl4 and qcdl5 relevant to the selected PDF are available in the COMMON block

   Note that these are read-only and changing these values in this common block has no effect in the program.

3.3  Whether to use the ".LHpdf" or ".LHgrid" files ?

The way in which the PDFs are calculated depends on whether the user selects ".LHpdf" or ".LHgrid" files (either by name or LHAGLUE number). In some cases only one type exists, but in others the user has a choice of either. Generally once the initialisation is done the LHgrid files are faster. This is particularly true when using QCDNUM (for example with the MRST sets) especially if the user makes repeated initialisations of different members of the same set using for example PDFSET(mem). This could be the case in using the PDF error sets.

The advantage of the .LHpdf files is that they are much smaller than the equivalent .LHgrid files.

Whichever the user chooses the method of using the LHAPDF and LHAGLUE routines is exactly the same.

3.4  Using Nuclear PDFs

LHAPDF provides the ability to add nuclear corrections to PDFs in the same way as in PDFLIB
By default the native LHAPDF routines

togther with the lhaglue routine add the nuclear corrections using the ESK98 formula as in PDFLIB.

From version 5.4 onwards the EPS08 corrections can be used instead by preceding the call with

and from version 5.8.4 onwards the latest EPS09 (lo,nlo + errors) corrections can be used instead by preceding the call with

4  Multiset initialization with Version 5

Version 5 introduces the concept holding more than one PDF set initialized in memory at the same time. This is implemented to speed up the running of programmes where it is necessary to switch frequently between PDF sets, for example to use nucleon,photon and possibly pion PDF sets together. Speed has been shown to be a particular issue when using the .LHpdf sets.

4.1  How many sets can be initialised?

This is determined by the parameter nmxset in the file src/parmsetup.inc. It is set as a default to 3 but can be set to whatever the user wishes. Obviously the larger it is the larger will be the size of the executable programme. When changing this parameter it is necessary to recompile all the routines since the file is included in most of them. To do this do make clean followed by make then make install.

4.2  Using multiset initialization with LHAglue

The LHAglue in version 5 program will do multiset initialization automatically with no changes to the users routines. Of course the parameter nmxset in the file src/parmsetup.inc described in the previous subsection the has to be large enough for the maximum number of sets.

4.3  Using multiset initialization with the native LHAPDF routines

Version 5 contains a set of subroutines which perform the same functions as those described in section 3.1 (using LHADF routines dirtectly) but with the additional parameter nset. This allows specific PDF sets/members to be assigned to nset and used interchangeably once they have been intialized. The table below lists those routines and their use.

call InitPDFsetM(nset,name)
or
call InitPDFsetByNameM(nset,name)
Called once per PDF set to allocate nset to a specific set
call InitPDFM(nset,mem) Called once per PDF set/member to allocate the member number (mem) to nset.
The above two calls are each made only ONCE per run no matter how many times a PDF set is used thereafter
call evolvePDFM(nset,x,Q,f) Returns the PDF momentum density (f ) for the nucleon or pion PDF set initialised as nset for the given x and Q.
call evolvePDFphotonM(nset,x,Q,f,photon) Special call from the MRST2004qed set.
call evolvePDFpM(nset,x,Q,P2,IP2,f) Returns the PDF momentum density (f ) for the photon PDF set initialised as nset for the given x,Q,P2and IP2.
call GetLam4M(nset,mem,qcdl4)
call GetLam5M(nset,mem,qcdl5)
Return the values of qcdl4 and qcdl5 for the member number mem of the set nset. Note that the values should be used with care due to the differing defintions of lambda.
call GetXminM(nset,mem,xmin)
call GetXmaxM(nset,mem,xmax)
call GetQ2minM(nset,mem,q2min)
call GetQ2maxM(nset,mem,q2max)
Return the minimum and maximum values of x and Q**2 for the member number mem of the set nset (version 5.3.0 onwards)
call numberPDFM(nset,Nmem) Returns as Nmem the number of PDF members in the set nset:(excluding the special ``best fit'' member, i.e. the member numbers run from 0 to Nmem)
call GetOrderPDFM(nset,order) To get the evolution order of the PDFs in set nset. The integer variable order is 0 for Leading Order, 1 for Next-to-Leading Order, etc.
call GetOrderAsM(nset,order) To get the evolution order of aS in set nset. The integer variable order is 0 for Leading Order, 1 for Next-to-Leading Order, etc.
call GetRenFacM(nset,muf) Gives the ratio of the renormalization scale over the factorization scale used in the ``fit'' for set nset. The double precision variable muf contains the ratio. Usually muf is equal to unity.
call GetDescM(nset) This call will print the PDF description of set nset to the default output stream.
call GetQmassM(nset,nf,mass) The mass mass is returned for quark flavor nf for set nset. The quark masses are used in the aS evolution.
call GetThresholdM(nset,nf,Q) The flavor threshold Q is returned for flavor nf for set nset. If Q=-1d0 the flavor is not in the evolution (e.g. the top quark is usually not included in the evolution). If Q=0d0 the flavor is parametrized at the parametrization scale. For positive non-zero values of Q the value is set to the flavor threshold at which the PDF starts to evolve.
call GetNfM(nset,nfmax) For the PDF sets of type .LHpdf returns the number of flavor thresholds in the PDF evolution for set nset. Usually the returned value for nfmax is equal to five as the top quark is usually not considered in the PDFs For the PDF sets of the .LHgrid type it returns -1.
call GetMaxNumSets(MaxNumSets) Returns the maximum number of sets which can be initialised (from parmsetup.inc)
call GetNset(nset) Returns the set number of the current set
call GetNmem(nset,nmem) Returns the set member number of the set nset

5  The C++ wrapper class LHAPDFWrap

A C++ class (LHAPDFwrap) and methods are provided to allow interfacing with a users C++ code. Since version 5.3.0 this code is now bundled into the tarball and the libraries LHAPDFWrap.a and LHAPDFWrap.so are built and installed, along with the fortran libraries, during the "make"/"make install" procedures. The methods follow broadly the same functionality as the fortran subroutines.

5.1  Description see:5.4 onwards

5.2  Description (version 5.3 only)

class LHAPDFWrap

// constructors LHAPDFWrap();
  // std c'tor d'tor
LHAPDFWrap(char *name); // (uses initPDFSetByName)
  // typical constructor with pdfset 'name', where 'name' is the name
  // of the data file of the desired set.
LHAPDFWrap(char *name, int memset); // (uses initPDFSetByName)
  // typical constructor with pdfset 'name' and subset 'memset'
  // 'name' is the name of the pdf set and 'memset' the subset member number.
// intialisers void initPDFSet(char *name);
  // initialises the pdfset by full name (including the path directory)
void initPDFSetByName(char *name);
  // initialises the pdfset by name only
void initPDF(int memset);
  // selects the pdf subset out of the initialised pdf distribution
// methods for nucleon and pion pdfs std::vector< double > xfx(const double &x;, const double &Q;);
  // returns a vector xf(x, Q) with index 0 < i < 12.
  // 0..5 = tbar, ..., ubar, dbar;
  // 6 = g;
  // 7..12 = d, u, ..., t
double xfx(const double &x;, const double &Q;, int fl);
  // returns xf(x, Q) for flavour fl - this time the flavour encoding
  // is as in the LHAPDF manual...
  // -6..-1 = tbar,...,ubar, dbar
  // 1..6 = duscbt
  // 0 = g
// methods for photon pdfs ($P2 and ip are ) std::vector< double > xfxp(const double &x;, const double &Q;, const double &P2;, int ip);
  // returns a vector xf(x, Q) with index 0 < i < 12.
  // 0..5 = tbar, ..., ubar, dbar;
  // 6 = g;
  // 7..12 = d, u, ..., t
double xfxp(const double &x;, const double &Q;, const double &P2;, int ip, int fl);
  // returns xf(x, Q) for flavour fl - this time the flavour encoding
  // is as in the LHAPDF manual...
  // -6..-1 = tbar,...,ubar, dbar
  // 1..6 = duscbt
  // 0 = g
// methods for nuclear pdfs (&a; is the atomic number) std::vector< double > xfxa(const double &x;, const double &Q;, const double &a;);
  // returns a vector xf(x, Q) with index 0 < i < 12.
  // 0..5 = tbar, ..., ubar, dbar;
  // 6 = g;
  // 7..12 = d, u, ..., t
double xfxa(const double &x;, const double &Q;, const double &a;, int fl);
  // returns xf(x, Q) for flavour fl - this time the flavour encoding
  // -6..-1 = tbar,...,ubar, dbar
  // is as in the LHAPDF manual...
  // -6..-1 = tbar,...,ubar, dbar
  // 1..6 = duscbt
  // 0 = g
// methods for pdfs in MRST2004qed.LHgrid std::vector< double > xfxphoton(const double &x;, const double &Q;);
  // returns a vector xf(x, Q) with index 0 < i < 14.
  // 0..5 = tbar, ..., ubar, dbar;
  // 6 = g;
  // 7..12 = d, u, ..., t
  // 13 = photon
double xfxphoton(const double &x;, const double &Q;, int fl);
  // returns xf(x, Q) for flavour fl - this time the flavour encoding
  // is as in the LHAPDF manual...
  // -6..-1 = tbar,...,ubar, dbar
  // 1..6 = duscbt
  // 0 = g
  // 7 = photon
// other methods void getDescription();
  // prints a brief description of the current pdf set to stdout
int numberPDF();
  // return the number of subsets available in the current distribution.
double alphasPDF(double Q);
  // return the alphas used by the current pdf.
int getOrderPDF();
  // returns the order (LO, NLO, NNLO) of the current pdf
int getOrderAlphaS();
  // return is order (LO, NLO, NNLO) of alpha_S.
double getQMass(int f);
  // returns quark mass used for flavour f.
double getThreshold(int f);
  // returns the threshold for flavour f.
int getNf();
  // returns the number of flavours used in the current pdf set.
double getLam4(int m);
  // returns the value of qcd lambda4 for member m
double getLam5(int m);
  // returns the value of qcd lambda5 for member m
double getXmin(int m);
  // returns the value of Xmin for member m
double getXmax(int m);
  // returns the value of Xmax for member m
double getQ2min(int m);
  // returns the value of Q2min for member m
double getQ2max(int m);
  // returns the value of Q2max for member m
void extrapolate();
  // sets the flag to extrapolate beyond the x and Q2 limits of the pdf set.
// Equivalent methods for multiset pdf use LHAPDFWrap(int nset, char *name);
LHAPDFWrap(int nset, char *name, int memset);

void initPDFSetM(int nset, char *name);
void initPDFSetByNameM(int nset, char *name);
void initPDFM(int nset, int memset);

std::vector< double > xfxM(int nset, const double &x;, const double &Q;);
double xfxM(int nset, const double &x;, const double &Q;, int fl);

std::vector< double > xfxpM(int nset, const double &x;, const double &Q;, const double &P2;, int ip);
double xfxpM(int nset, const double &x;, const double &Q;, const double &P2;, int ip, int fl);

std::vector< double > xfxaM(int nset, const double &x;, const double &Q;, const double &a;);
double xfxaM(int nset, const double &x;, const double &Q;, const double &a;, int fl);

std::vector< double > xfxphotonM(int nset, const double &x;, const double &Q;);
double xfxphotonM(int nset, const double &x;, const double &Q;, int fl);

void getDescriptionM(int nset);
int numberPDFM(int nset);
double alphasPDFM(int nset, double Q);
int getOrderPDFM(int nset);
int getOrderAlphaSM(int nset);
double getQMassM(int nset, int f);
double getThresholdM(int nset, int f);
int getNfM(int nset);
double getLam4M(int nset, int m);
double getLam5M(int nset, int m);
double getXminM(int nset, int m);
double getXmaxM(int nset, int m);
double getQ2minM(int nset, int m);
double getQ2maxM(int nset, int m);

6  Routines for calcualating PDF uncertainties and correlations

Provided by Graeme Watt using the formulae for PDF uncertainties and correlations in:
G. Watt, JHEP 1109 (2011) 069 [arXiv:1106.5788 [hep-ph]].

The code distinguishes between:
   NNPDF (Monte Carlo approach)
   Alekhin02/ABKM09/ABM11 (symmetric Hessian approach)
   all other PDF sets (asymmetric Hessian approach).

call GetPDFUncType(lMonteCarlo,lSymmetric)

returns (.true./.false.)(.false./.true.) (.false/.false) respectively for the above cases.

GetPDFuncertainty(values,central,errplus,errminus,errsym)

Calculates the PDF uncertainty using the appropriate formula for either the Hessian or Monte Carlo approach given an array "values(0:nmem)". In the Monte Carlo approach, the uncertainty is given by the standard deviation, and the central (average) value is not necessarily "values(0)" for quantities with a non-linear dependence on PDFs. In the Hessian approach, the central value is the best-fit "values(0)" and the uncertainty is given by either the symmetric or asymmetric formula using eigenvector PDF sets.

GetPDFcorrelation(valuesA,valuesB,correlation)

Calculates the PDF correlation using the appropriate formula for either the Hessian or Monte Carlo approach given two arrays "valuesA(0:nmem)" and "valuesB(0:nmem)". The correlation can vary between -1 and +1 where values close to {-1,0,+1} mean that the two quantities A and B are {anticorrelated,uncorrelated,correlated}.

GetPDFUncTypeM(nset,lMonteCarlo,lSymmetric)
GetPDFuncertaintyM(nset,values,central,errplus,errminus,errsym)
GetPDFcorrelationM(nset,valuesA,valuesB,correlation)

Equivalent routines for the multiset use, with the extra parameter 'nset'

Appendices

A  PDF set numbers and names

Notes:

Proton PDFs

PDF set .LHpdf .LHgrid File Name Member Xmin Xmax Q2min GeV2 Q2max GeV2
CTEQ6m (central value) 10000 10050 cteq6m 0 10-6 1 1.69 108
CTEQ6 (40 error sets) 10001-10040 10051-10090 cteq6 | cteq6mE 1-40 10-6 1 1.69 108
CTEQ6l (LO fit/NLO alphas) 10041 - cteq6l 0/1 10-6 1 1.69 108
CTEQ6ll (LO fit/LO alphas) 10042 - cteq6ll 0/1 10-6 1 1.69 108
CTEQ61 (central value) 10100 10150 cteq61 0 10-6 1 1.69 108
CTEQ61 (40 error sets) 10101-10140 10151-10190 cteq61 1-40 10-6 1 1.69 108
CTEQ6AB (20 sets, variable alphas) - 10250-10269 cteq6AB 0-19 10-6 1 1.69 108
CTEQ65 (40 sets) - 10350-10390 cteq65 0-40 10-7 1 1.69 1010
CTEQ65c (6 sets) - 10450-10456 cteq65c 0-6 10-7 1 1.69 1010
CTEQ65s (8 sets) - 10460-10467 cteq65s 0-7 10-7 1 1.69 1010
CTEQ66 (44 sets) - 10550-10594 cteq66 0-44 10-8 1 1.69 1010
CTEQ66alphas (5 sets) - 10595-10599 cteq66alphas 0-4 10-8 1 1.69 1010
CTEQ66c (4 sets) - 10650-10653 cteq66c 0-3 10-8 1 1.69 1010
CTEQ66a (4 sets) - 10660-10663 cteq66a0 to a3 0-3 10-8 1 1.69 1010
CTEQ66lg (light-gluino 8 sets) - 10670-10677 cteq66lg 0-7 10-5 1 1.69 106
CT09MCS (LO evnt gen) - 10770 CT09MCS 0 10-5 1 1.69 106
CT09MC1 (LO evnt gen) - 10771 CT09MC1 0 10-5 1 1.69 106
CT09MC2 (LO evnt gen) - 10772 CT09MC1 0 10-5 1 1.69 106
CT10 (central value) - 10800 CT10 0 10-5 1 1.69 106
CT10 (52 error sets) - 10801 CT10 1-52 10-5 1 1.69 106
CT10as (11 alphas variations) - 10860-10870 CT10as 0-10 10-5 1 1.69 106
CT10w (central value) - 10900 CT10w 0 10-5 1 1.69 106
CT10w (52 error sets) - 10901 CT10w 1-52 10-5 1 1.69 106
CT10was (11 alphas variations) - 10960-10970 CT10was 0-10 10-5 1 1.69 106
CT10f3 (fixed flavour) - 10980 CT10f3 0 10-5 1 1.69 106
CT10f4 (fixed flavour) - 10981 CT10f4 0 10-5 1 1.69 106
CT10wf3 (fixed flavour) - 10982 CT10wf3 0 10-5 1 1.69 106
CT10wf4 (fixed flavour) - 10983 CT10wf4 0 10-5 1 1.69 106
CT10nlo (new fit - central value) - 11000 CT10nlo 0 10-5 1 1.69 106
CT10nlo (new fit - 52 error sets) - 11001 CT10nlo 1-52 10-5 1 1.69 106
CT10nlo_as_0xxx (new fit - 16 alphas variations 112-127) - 11062-11077 CT10nlo_as_0xxx 0-10 10-5 1 1.69 106
CT10nlo_nf3 (new fit - fixed flavour) - 11080 CT10nlo_nf3 0 10-5 1 1.69 106
CT10nlo_nf4 (new fit - fixed flavour) - 11080 CT10nlo_nf4 0 10-5 1 1.69 106
CT10wnlo (new fit - central value) - 11100 CT10wnlo 0 10-5 1 1.69 106
CT10wnlo (new fit - 52 error sets) - 11201 CT10wnlo 1-52 10-5 1 1.69 106
CT10wnlo_as_0xxx (new fit - 16 alphas variations 112-127) - 11162-11177 CT10wnlo_as_0xxx 0-10 10-5 1 1.69 106
CT10wnlo_nf3 (new fit - fixed flavour) - 11180 CT10wnlo_nf3 0 10-5 1 1.69 106
CT10wnlo_nf4 (new fit - fixed flavour) - 11180 CT10wnlo_nf4 0 10-5 1 1.69 106
CT10nnlo (new fit - central value) - 11200 CT10nnlo 0 10-5 1 1.69 106
CT10nnlo (new fit - 50 error sets) - 11201 CT10nnlo 1-50 10-5 1 1.69 106
CT10nnlo_as_0xxx (new fit - 21 alphas variations 110-130) - 11260-11280 CT10nnlo_as_0xxx 0-10 10-5 1 1.69 106
CJ12min (central) - 12000 CJ12min 0 10-6 1 1.69 1010
CJ12min (error sets) - 12001-12038 CJ12min 1-38 10-6 1 1.69 1010
CJ12mid (central) - 12100 CJ12mid 0 10-6 1 1.69 1010
CJ12mid (error sets) - 12101-12138 CJ12mid 1-38 10-6 1 1.69 1010
CJ12max (central) - 12200 CJ12max 0 10-6 1 1.69 1010
CJ12max (error sets) - 12201-12238 CJ12max 1-38 10-6 1 1.69 1010
CTEQ5m (Standard MSbar) - 19050 cteq5m 0/1 10-5 1 1.00 108
CTEQ5m1 (updated CTEQ5m) - 19051 cteq5m1 0/1 10-5 1 1.00 108
CTEQ5f3 (3-flav-DIS) - 19053 cteq5f3 0/1 10-5 1 1.00 108
CTEQ5f4 (4-flav-DIS) - 19054 cteq5f4 0/1 10-5 1 1.00 108
CTEQ5d (Standard DIS) - 19060 cteq5d 0/1 10-5 1 1.00 108
CTEQ5l (LO fit) - 19070 cteq5l 0/1 10-5 1 1.00 108
CTEQ4m (Standard MSbar) - 19150 cteq4m 0/1 10-5 1 2.56 108
CTEQ4d (Standard DIS) - 19160 cteq4d 0/1 10-5 1 2.56 108
CTEQ4l (LO fit) - 19170 cteq4l 0/1 10-5 1 2.56 108
MRST2001nlo (Standard MSbar) 20000 20050 MRST2001nlo 0/1 10-5 1 1.25 107
MRST2001nlo (lower $\alpha_S$) 20002 20052 MRST2001nlo 2 10-5 1 1.25 107
MRST2001nlo (higher $\alpha_S$) 20003 20053 MRST2001nlo 3 10-5 1 1.25 107
MRST2001nlo (Jet Fit) 20004 20054 MRST2001nlo 4 10-5 1 1.25 107
MRST2001lo (LO fit) - 20060 MRST2001lo 0/1 10-5 1 1.25 107
MRST2001nnlo (NNLO fit) - 20070 MRST2001nnlo 0/1 10-5 1 1.25 107
MRST2001E (central value) 20100 20150 MRST2001E 0 10-5 1 1.25 107
MRST2001E (30 error sets) 20101-20130 20151-20180 MRST2001E 1-30 10-5 1 1.25 107
MRST2002nlo (Standard MSbar) 20200 20250 MRST2002nlo 0/1 10-5 1 1.25 107
MRST2002nnlo (NNLO fit) - 20270 MRST2002nnlo 0/1 10-5 1 1.25 107
MRST2003cnlo (NLO - restricted ) 20300 20350 MRST2003cnlo 0/1 10-3 1 10.0 107
MRST2003cnnlo (NNLO - restricted) - 20370 MRST2003cnnlo 0/1 10-3 1 7.0 107
MRST2004nlo (Standard MSbar) 20400 20450 MRST2004nlo 0/1 10-5 1 1.25 107
MRST2004FF3lo (fixed flavour) - 20452 MRST2004FF3lo 0/1 10-5 1 1.25 107
MRST2004FF4lo (fixed flavour) - 20454 MRST2004FF4lo 0/1 10-5 1 1.25 107
MRST2004FF3nlo (fixed flavour) - 20456 MRST2004FF3nlo 0/1 10-5 1 1.25 107
MRST2004FF4nlo (fixed flavour) - 20458 MRST2004FF4nlo 0/1 10-5 1 1.25 107
MRST2004qed (photon) - 20460 MRST2004qed 0/1 10-5 1 1.25 107
MRST2004nnlo (NNLO fit) - 20470 MRST2004nnlo 0/1 10-5 1 1.25 107
MRST2006nnlo (NNLO fit) - 20550-20580 MRST2006nnlo 0-30 10-6 1 1.0 109
MRST2007lomod (LO* for MC) - 20650 MRST2007lomod 0 10-5 1 1.25 107
MRSTMCal (for MC) - 20651 MRSTMCal 0 10-5 1 1.25 107
MSTW2008 (LO central) - 21000 MSTW2008lo68cl 0 10-6 1 1.0 109
MSTW2008lo68cl - 21001-21040 MSTW2008lo68cl 1-40 10-6 1 1.0 109
MSTW2008lo90cl - 21041-21080 MSTW2008lo90cl 1-40 10-6 1 1.0 109
MSTW2008 (NLO central) - 21100 MSTW2008nlo68cl 0 10-6 1 1.0 109
MSTW2008nlo68cl - 21101-21140 MSTW2008nlo68cl 1-40 10-6 1 1.0 109
MSTW2008nlo90cl - 21141-21180 MSTW2008nlo90cl 1-40 10-6 1 1.0 109
MSTW2008 (NNLO central) - 21200 MSTW2008nnlo68cl 0 10-6 1 1.0 109
MSTW2008nnlo68cl - 21201-21240 MSTW2008nnlo68cl 1-40 10-6 1 1.0 109
MSTW2008nnlo90cl - 21241-21280 MSTW2008nnlo90cl 1-40 10-6 1 1.0 109
MSTW2008nlo_asmzrange - 22000-22021 MSTW2008nlo_asmzrange 0-21 10-6 1 1.0 109
MSTW2008nnlo_asmzrange - 22500-22521 MSTW2008nlo_asmzrange 0-21 10-6 1 1.0 109
MSTW2008CPdeut (NLO central) - 23800 MSTW2008CPdeutnlo68cl 0 10-6 1 1.0 109
MSTW2008CPdeut (NLO error sets) - 23801-23846 MSTW2008CPdeutnlo68cl 1-46 10-6 1 1.0 109
MSTW2008CPdeut (NNLO central) - 23850 MSTW2008CPdeutnnlo68cl 0 10-6 1 1.0 109
MSTW2008CPdeut (NNLO error sets) - 23851-23896 MSTW2008CPdeutnnlo68cl 1-46 10-6 1 1.0 109
MRST98 (central gluon/alphas) 29000 - MRST98 0/2 10-5 1 1.25 107
MRST98 (lower gluon) 29001 - MRST98 1 10-5 1 1.25 107
MRST98lo (LO) - 29041-29045 MRST98lo 1-5 10-5 1 1.25 107
MRST98nlo (NLO) - 29051-29055 MRST98nlo 1-5 10-5 1 1.25 107
MRST98dis (DIS) - 29061-29065 MRST98dis 1-5 10-5 1 1.25 107
MRST98ht (HT) - 29071 MRST98dis 1 10-5 1 1.25 107
Fermi2002_100 (101 sets) 30100-30200 - Fermi2002_100 0-100 10-6 1 1.00 1010
Fermi2002_1000 (1001 sets) 31000-32000 - Fermi2002_1000 0-1000 10-6 1 1.00 1010
Alekhin_100 (101 sets) 40100-40200 - Alekhin_100 0-100 10-6 1 1.00 1010
Alekhin_1000 (1000 sets) 41000-41999 - Alekhin_1000 0-999 10-6 1 1.00 1010
Alekhin2002 (LO - cent val) - 40350 a02m_lo 0 10-7 1 0.8 2 x 108
Alekhin2002 (NLO - cent val) - 40450 a02m_nlo 0 10-7 1 0.8 2 x 108
Alekhin2002 (NNLO - cent val) - 40550 a02m_nnlo 0 10-7 1 0.8 2 x 108
Alekhin2002 (LO VFN 17 sets) - 40351-40367 a02m_lo 1-15 10-7 1 0.8 2 x 108
Alekhin2002 (NLO VFN 17 sets) - 40451-40467 a02m_nlo 1-15 10-7 1 0.8 2 x 108
Alekhin2002 (NNLO VFN 17 sets) - 40551-40567 a02m_nnlo 1-15 10-7 1 0.8 2 x 108
ABKM09 (NLO 3FLV central) - 40650 abkm09_3_nlo 0 10-7 1 0.8 2 x 108
ABKM09 (NNLO 3FLV central) - 40750 abkm09_3_nnlo 0 10-7 1 0.8 2 x 108
ABKM09 (NLO 5FLV central) - 40850 abkm09_5_nlo 0 10-7 1 0.8 2 x 108
ABKM09 (NNLO 5FLV central) - 40950 abkm09_5_nnlo 0 10-7 1 0.8 2 x 108
ABKM09 (NLO 3FLV 25 sets) - 40651-40675 abkm09_3_nlo 1-25 10-7 1 0.8 2 x 108
ABKM09 (NNLO 3FLV 25 sets) - 40751-40775 abkm09_3_nnlo 1-25 10-7 1 0.8 2 x 108
ABKM09 (NLO 5FLV 25 sets) - 40851-40875 abkm09_5_nlo 1-25 10-7 1 0.8 2 x 108
ABKM09 (NNLO 5FLV 25 sets) - 40951-40975 abkm09_5_nnlo 1-25 10-7 1 0.8 2 x 108
ABM11 (NLO 3FLV central) - 42000 abm11_3n_nlo 0 10-7 1 0.8 2 x 108
ABM11 (NLO 4FLV central) - 42030 abm11_4n_nlo 0 10-7 1 0.8 2 x 108
ABM11 (NLO 5FLV central) - 42060 abm11_5n_nlo 0 10-7 1 0.8 2 x 108
ABM11 (NNLO 3FLV central) - 42100 abm11_3n_nnlo 0 10-7 1 0.8 2 x 108
ABM11 (NNLO 4FLV central) - 42130 abm11_4n_nnlo 0 10-7 1 0.8 2 x 108
ABM11 (NNLO 5FLV central) - 42160 abm11_5n_nnlo 0 10-7 1 0.8 2 x 108
ABM11 (NLO 5FLV 28 sets) - 42000-42028 abm11_5n_nlo 1-28 10-7 1 0.8 2 x 108
ABM11 (NLO 4FLV 28 sets) - 42030-42058 abm11_4n_nlo 1-28 10-7 1 0.8 2 x 108
ABM11 (NLO 3FLV 28 sets) - 42060-42088 abm11_3n_nlo 1-28 10-7 1 0.8 2 x 108
ABM11 (NNLO 5FLV 28 sets) - 42100-42128 abm11_5n_nnlo 1-28 10-7 1 0.8 2 x 108
ABM11 (NNLO 4FLV 28 sets) - 42130-42158 abm11_4n_nnlo 1-28 10-7 1 0.8 2 x 108
ABM11 (NNLO 3FLV 28 sets) - 42160-42188 abm11_3n_nnlo 1-28 10-7 1 0.8 2 x 108
ABM11 (NLO 5FLV ALPHAS VAR. 21 sets) - 42200-42220 abm11_5n_as_nlo 0-20 10-7 1 0.8 2 x 108
ABM11 (NNLO 5FLV ALPHAS VAR. 17 sets) - 42230-42246 abm11_5n_as_nnlo 0-16 10-7 1 0.8 2 x 108
Botje_100 (101 sets) 50100-50200 - Botje_100 0-100 10-6 1 1.00 1010
Botje_1000 (1000 sets) 51000-51999 - Botje_1000 0-999 10-6 1 1.00 1010
ZEUS2002 (VFN/TR cent value) 60000 - ZEUS2002_TR 0 10-6 1 0.3 2 x 105
ZEUS2002 (ZM cent value) 60100 - ZEUS2002_ZM 0 10-6 1 0.3 2 x 105
ZEUS2002 (FF cent value) 60200 - ZEUS2002_FF 0 10-6 1 0.3 2 x 105
ZEUS2005 (ZJ cent value) 60300 - ZEUS2005_ZJ 0 10-6 1 0.3 2 x 105
ZEUS2002 (VFN/TR 22 sets) 60001-60022 - ZEUS2002_TR 1-22 10-6 1 0.3 2 x 105
ZEUS2002 (ZM 22 sets) 60101-60122 - ZEUS2002_ZM 1-22 10-6 1 0.3 2 x 105
ZEUS2002 (FF 22 sets) 60201-60222 - ZEUS2002_FF 1-22 10-6 1 0.3 2 x 105
ZEUS2005 (ZJ 22 sets) 60301-60322 - ZEUS2005_ZJ 1-22 10-6 1 0.3 2 x 105
HERAPDF01 (Combined ZEUS+H1 central value) 60400 - HERAPDF01 0 10-6 1 1.0 2 x 108
HERAPDF01 (Combined ZEUS+H1 22 sets) 60401-60422 - HERAPDF01 1-22 10-6 1 1.0 2 x 108
HERAPDF01 (Combined ZEUS+H1 central value) - 60430 HERAPDF01 0 10-6 1 1.0 2 x 108
HERAPDF01 (Combined ZEUS+H1 14 variation sets) - 60431-60444 HERAPDF01 1-14 10-6 1 1.0 2 x 108
HERAPDF10 (Combined ZEUS+H1 central value) - 60500 HERAPDF10_EIG 0 10-6 1 1.0 2 x 108
HERAPDF10 (Combined ZEUS+H1 20 sets) - 60501-60520 HERAPDF10_EIG 1-20 10-6 1 1.0 2 x 108
HERAPDF10 (Combined ZEUS+H1 central value) - 60530 HERAPDF10_VAR 0 10-6 1 1.0 2 x 108
HERAPDF10 (Combined ZEUS+H1 13 variation sets) - 60531-60543 HERAPDF10_VAR 1-13 10-6 1 1.0 2 x 108
HERAPDF10 (Combined ZEUS+H1 12 alphas sets) - 60550-60561 HERAPDF10_ALPHAS 0-11 10-6 1 1.0 2 x 108
HERAPDF15(NNLO) (Combined ZEUS+H1 central value NNLO) - 60600 HERAPDF15NNLO_EIG 0 10-8 1 1.0 1 x 109
HERAPDF15(NNLO) (Combined ZEUS+H1 28 sets NNLO) - 60601-60628 HERAPDF15NNLO_EIG 1-28 10-8 1 1.0 1 x 109
HERAPDF15(NNLO) (Combined ZEUS+H1 central value NNLO) - 60630 HERAPDF15NNLO_VAR 0 10-8 1 1.0 1 x 109
HERAPDF15(NNLO) (Combined ZEUS+H1 10 variation sets NNLO) - 60631-60640 HERAPDF15NNLO_VAR 1-10 10-8 1 1.0 1 x 109
HERAPDF15(NNLO) (Combined ZEUS+H1 12 alphas sets NNLO) - 60650-60661 HERAPDF15NNLO_ALPHAS 0-11 10-8 1 1.0 1 x 109
HERAPDF15(NLO) (Combined ZEUS+H1 central value NLO) - 60700 HERAPDF15NLO_EIG 0 10-8 1 1.0 1 x 109
HERAPDF15(NLO) (Combined ZEUS+H1 20 sets NLO) - 60701-60720 HERAPDF15NLO_EIG 1-20 10-8 1 1.0 1 x 109
HERAPDF15(NLO) (Combined ZEUS+H1 central value NLO) - 60730 HERAPDF15NLO_VAR 0 10-8 1 1.0 1 x 109
HERAPDF15(NLO) (Combined ZEUS+H1 12 variation sets NLO) - 60731-60742 HERAPDF15NLO_VAR 1-12 10-8 1 1.0 1 x 109
HERAPDF15(NLO) (Combined ZEUS+H1 12 alphas sets NLO) - 60750-60761 HERAPDF15NNLO_ALPHAS 0-11 10-8 1 1.0 1 x 109
LHeCNLO (simulated LHeC data fit) - 68000 LHECNLO_EIG 0 10-9 1 1.0 1 x 109
LHeCNLO (error pdfs) - 68001-68024 LHECNLO_EIG 1-24 10-9 1 1.0 1 x 109
GRV98 (lo) - 80060 GRV98lo 0 10-9 1 0.8 2 x 106
H12000 (nlo msbar cent value) - 70050 H12000ms 0 5.7 x 10-5 1 1.5 106
H12000E (nlo msbar 20 sets) - 70051-70070 H12000msE 1-20 5.7 x 10-5 1 1.5 106
H12000 (nlo dis cent value) - 70150 H12000dis 0 5.7 x 10-5 1 1.5 106
H12000E (nlo dis 20 sets) - 70151-70170 H12000disE 1-20 5.7 x 10-5 1 1.5 106
H12000 (lo cent value) - 70250 H12000lo 0 5.7 x 10-5 1 1.5 106
H12000E (lo 20 sets) - 70251-70270 H12000loE 1-20 5.7 x 10-5 1 1.5 106
GJR08 (FF lo) - 80150 GJR08lo 0 10-9 1.0 0.3 1 x 108
GJR08 (VF lo) - 80151 GJR08lo 1 10-9 1.0 0.3 1 x 108
GJR08 (FF nlo/DIS) - 80152 GJR08FFdis 1 10-9 1.0 0.5 1 x 108
GJR08 (FF nlo/MSbar central value) - 80160 GJR08FFnloE 0 10-9 1.0 0.5 1 x 108
GJR08 (FF nlo/MSbar 26 sets) - 80161-80186 GJR08FFnloE 1-26 10-9 1.0 0.5 1 x 108
GJR08 (VF nlo/MSbar central value) - 80260 GJR08VFnloE 0 10-9 1.0 0.5 1 x 108
GJR08 (VF nlo/MSbar 26 sets) - 80261-80286 GJR08VFnloE 1-26 10-9 1.0 0.5 1 x 108
JR09 (FF nnlo central value) - 80360 JR09FFnnloE 0 10-9 1.0 0.55 1 x 108
JR09 (FF nnlo 26 sets) - 80361-80386 JR09FFnnloE 1-26 10-9 1.0 0.55 1 x 108
JR09 (VF nnlo central value) - 80460 JR09VFnnloE 0 10-9 1.0 0.55 1 x 108
JR09 (VF nnlo 26 sets) - 80461-80486 JR09FFnnloE 1-26 10-9 1.0 0.55 1 x 108
NNPDF10 (Neutral Network 100/1000 sets) 90000-90100
91000-92000
90200-90300
93000-94000
NNPDF10_100
NNPDF10_1000
0-100
0-1000
10-9 1.0 2.0 1 x 108
NNPDF11 (Neutral Network 100 sets) - 90400-90500 NNPDF11_100 0-100 10-9 1.0 2.0 1 x 108
NNPDF12 (Neutral Network 100/1000 sets) - 90600-90700
95000-96000
NNPDF12_100
NNPDF12_1000
0-100
0-1000
10-9 1.0 2.0 1 x 108
NNPDF20 (Neutral Network 100/1000 sets) - 90800-90900
97000-98000
NNPDF20_100
NNPDF20_1000
0-100
0-1000
10-9 1.0 2.0 1 x 108
NNPDF20 (Neutral Network alphas sets) - 190000-190100
190200-190300
190400-190500
190600-190700
190800-190900
191000-191100
191200-191300
191400-191500
191600-191700
195100-191900
NNPDF20_as_0114_100
NNPDF20_as_0115_100
NNPDF20_as_0116_100
NNPDF20_as_0117_100
NNPDF20_as_0118_100
NNPDF20_as_0120_100
NNPDF20_as_0121_100
NNPDF20_as_0122_100
NNPDF20_as_0123_100
NNPDF20_as_0124_100
0-100 10-9 1.0 2.0 1 x 108
NNPDF20 (Neutral Network separate ZEUS/H1 fit) - 192000-192100 NNPDF20_heraold 0-9 10-9 1.0 2.0 1 x 108
NNPDF20 (Neutral Network DIS data fit) - 192200-192300 NNPDF20_dis 0-9 10-9 1.0 2.0 1 x 108
NNPDF20 (Neutral Network DIS+DY data fit) - 192400-192500 NNPDF20_dis+dy 0-9 10-9 1.0 2.0 1 x 108
NNPDF20 (Neutral Network DIS+JET data fit) - 192600-192700 NNPDF20_dis+jet 0-9 10-9 1.0 2.0 1 x 108
NNPDF21 (Neutral Network sets) - 192800-192900
192901-193901
NNPDF21_100
NNPDF21_1000
0-100
0-1000
10-9 1.0 2.0 1 x 108
NNPDF21 (Neutral Network alphas sets) - 194000-194100
194200-194300
194400-194500
194600-194700
194800-194900
195000-195100
195200-195300
195400-195500
195600-195700
195800-195900
NNPDF21_as_0114_100
NNPDF21_as_0115_100
NNPDF21_as_0116_100
NNPDF21_as_0117_100
NNPDF21_as_0118_100
NNPDF21_as_0120_100
NNPDF21_as_0121_100
NNPDF21_as_0122_100
NNPDF21_as_0123_100
NNPDF21_as_0124_100
0-100 10-9 1.0 2.0 1 x 108
NNPDF21 (Neutral Network m_c variation sets) - 196000-196100
196200-196300
196400-196500
NNPDF21_mc_15_100
NNPDF21_mc_16_100
NNPDF21_mc_17_100
0-100 10-9 1.0 2.0 1 x 108
NNPDF21 (Neutral Network m_b variation sets) - 196600-196700
196800-196900
197000-197100
197200-197300
NNPDF21_mb_425_100
NNPDF21_mb_45_100
NNPDF21_mb_50_100
NNPDF21_mb_525_100
0-100 10-9 1.0 2.0 1 x 108
NNPDF21 (Neutral Network Fixed Flavour Number sets - 197400-197500
197600-197700
197800-197900
NNPDF21_FFN_NF3_100
NNPDF21_FFN_NF4
NNPDF21_FFN_NF5
0-100 10-9 1.0 2.0 1 x 108
NNPDF21 (Neutral Network DIS data fits) - 198000-198100
198101-199101
NNPDF21_dis_100
NNPDF21_dis_1000
0-100
0-1000
10-9 1.0 2.0 1 x 108
NNPDF21 (Neutral Network DIS+DY data fit) - 199200-199300 NNPDF21_dis+dy_100 0-100 10-9 1.0 2.0 1 x 108
NNPDF21 (Neutral Network DIS+JET data fit) - 199400-199500 NNPDF21_dis+jet_100 0-100 10-9 1.0 2.0 1 x 108
NNPDF21_lo (Neutral Network LO sets) - 200200-200300
200400-200500
NNPDF21_lo_as_119_100
NNPDF21_lo_as_130_100
0-100 10-9 1.0 2.0 1 x 108
NNPDF21_lo* (Neutral Network LOSTAR sets) - 200600-200700
200800-200900
NNPDF21_lostar_as_119_100
NNPDF21_lostar_as_130_100
0-100 10-9 1.0 2.0 1 x 108
NNPDF21_nnlo (Neutral Network NNLO sets) - 200000-200100
201000-202000
NNPDF21_nnlo_100
NNPDF21_nnlo_1000
0-100
0-1000
10-9 1.0 2.0 1 x 108
NNPDF21_nnlo (Neutral Network m_c variation sets) - 205000-205100
205200-205300
205400-205500
NNPDF21_nnlo_mc_15_100
NNPDF21_nnlo_mc_16_100
NNPDF21_nnlo_mc_17_100
0-100 10-9 1.0 2.0 1 x 108
NNPDF21_nnlo (Neutral Network m_b variation sets) - 206000-206100
206200-206300
206400-206500
206600-206700
NNPDF21_nnlo_mb_425_100
NNPDF21_nnlo_mb_45_100
NNPDF21_nnlo_mb_50_100
NNPDF21_nnlo_mb_525_100
0-100 10-9 1.0 2.0 1 x 108
NNPDF21_nnlo (Neutral Network DIS NNLO data fits) - 207000-207100 NNPDF21_nnlo_dis_100 0-100 10-9 1.0 2.0 1 x 108
NNPDF21_nnlo (Neutral Network DIS+DY NNLO data fit) - 207200-207300 NNPDF21_nnlo_dis+dy_100 0-100 10-9 1.0 2.0 1 x 108
NNPDF21_nnlo (Neutral Network HERAONLY NNLO data fits) - 207400-207500 NNPDF21_nnlo_heraonly_100 0-100 10-9 1.0 2.0 1 x 108
NNPDF21_nnlo (Neutral Network COLLIDER NNLO data fits) - 207600-207700 NNPDF21_nnlo_collider_100 0-100 10-9 1.0 2.0 1 x 108
NNPDF21_nnlo (Neutral Network NNLO alphas sets) - 203000-203100
203200-203300
203400-203500
203600-203700
203800-203900
204000-204100
204200-204300
204400-204500
204600-204700
204800-204900
NNPDF21_nnlo_as_0114_100
NNPDF21_nnlo_as_0115_100
NNPDF21_nnlo_as_0116_100
NNPDF21_nnlo_as_0117_100
NNPDF21_nnlo_as_0118_100
NNPDF21_nnlo_as_0120_100
NNPDF21_nnlo_as_0121_100
NNPDF21_nnlo_as_0122_100
NNPDF21_nnlo_as_0123_100
NNPDF21_nnlo_as_0124_100
0-100 10-9 1.0 2.0 1 x 108
NNPDF21_nf5_nnlo (Neutral Network NNLO Nfmax=5 0+100 replicas) - 207800-207900 NNPDF21_nnlo_nf5_100 0-100 10-9 1.0 2.0 1 x 108
NNPDF22_nlo (Neutral Network NLO 0+100 replicas) - 210000-210100 NNPDF22_nlo_100 0-100 10-9 1.0 2.0 1 x 108
NNPDF23_nlo_as_ (Neutral Network NLO 0+100 replicas) - 229000-229100
229200-229300
229400-229500
229600-229700
229800-229900
230000-230100
230200-230300
230400-230500
230600-230700
230800-230900
231000-231100
NNPDF23_nlo_as_0114
NNPDF23_nlo_as_0115
NNPDF23_nlo_as_0116
NNPDF23_nlo_as_0117
NNPDF23_nlo_as_0118
NNPDF23_nlo_as_0119
NNPDF23_nlo_as_0120
NNPDF23_nlo_as_0121
NNPDF23_nlo_as_0122
NNPDF23_nlo_as_0123
NNPDF23_nlo_as_0124
0-100 10-9 1.0 2.0 1 x 108
NNPDF23_nnlo_as_ (Neutral Network NNLO 0+100 replicas) - 231200-231300
231400-231500
231600-231700
231800-231900
232000-232100
232200-232300
232400-232500
232600-232700
232800-232900
233000-233100
233200-233300
NNPDF23_nnlo_as_0114
NNPDF23_nnlo_as_0115
NNPDF23_nnlo_as_0116
NNPDF23_nnlo_as_0117
NNPDF23_nnlo_as_0118
NNPDF23_nnlo_as_0119
NNPDF23_nnlo_as_0120
NNPDF23_nnlo_as_0121
NNPDF23_nnlo_as_0122
NNPDF23_nnlo_as_0123
NNPDF23_nnlo_as_0124
0-100 10-9 1.0 2.0 1 x 108
NNPDF23_nlo_noLHC_as_ (Neutral Network NLO 0+100 replicas) - 233400-233500
233600-233700
233800-233900
234000-234100
234200-234300
NNPDF23_nlo_noLHC_as_0116
NNPDF23_nlo_noLHC_as_0117
NNPDF23_nlo_noLHC_as_0118
NNPDF23_nlo_noLHC_as_0119
NNPDF23_nlo_noLHC_as_0120
0-100 10-9 1.0 2.0 1 x 108
NNPDF23_nnlo_noLHC_as_ (Neutral Network NNLO 0+100 replicas) - 234400-234500
234600-234700
234800-234900
235000-235100
235200-235300
NNPDF23_nnlo_noLHC_as_0116
NNPDF23_nnlo_noLHC_as_0117
NNPDF23_nnlo_noLHC_as_0118
NNPDF23_nnlo_noLHC_as_0119
NNPDF23_nnlo_noLHC_as_0120
0-100 10-9 1.0 2.0 1 x 108
NNPDF23_nlo_collider_as_ (Neutral Network NLO 0+100 replicas) - 235400-235500
235600-235700
235800-235900
236000-236100
236200-236300
NNPDF23_nlo_collider_as_0116
NNPDF23_nlo_collider_as_0117
NNPDF23_nlo_collider_as_0118
NNPDF23_nlo_collider_as_0119
NNPDF23_nlo_collider_as_0120
0-100 10-9 1.0 2.0 1 x 108
NNPDF23_nnlo_collider_as_ (Neutral Network NNLO 0+100 replicas) - 236400-236500
236600-236700
236800-236900
237000-237100
237200-237300
NNPDF23_nnlo_collider_as_0116
NNPDF23_nnlo_collider_as_0117
NNPDF23_nnlo_collider_as_0118
NNPDF23_nnlo_collider_as_0119
NNPDF23_nnlo_collider_as_0120
0-100 10-9 1.0 2.0 1 x 108
NNPDF23_nlo_FFN_NF4_as_ (Neutral Network NLO 0+100 replicas) - 237400-237500
237600-237700
237800-237900
238000-238100
238200-238300
NNPDF23_nlo_FFN_NF4_as_0116
NNPDF23_nlo_FFN_NF4_as_0117
NNPDF23_nlo_FFN_NF4_as_0118
NNPDF23_nlo_FFN_NF4_as_0119
NNPDF23_nlo_FFN_NF4_as_0120
0-100 10-9 1.0 2.0 1 x 108
NNPDF23_nnlo_FFN_NF4_as_ (Neutral Network NNLO 0+100 replicas) - 238400-238500
238600-238700
238800-238900
239000-239100
239200-239300
NNPDF23_nnlo_FFN_NF4_as_0116
NNPDF23_nnlo_FFN_NF4_as_0117
NNPDF23_nnlo_FFN_NF4_as_0118
NNPDF23_nnlo_FFN_NF4_as_0119
NNPDF23_nnlo_FFN_NF4_as_0120
0-100 10-9 1.0 2.0 1 x 108
NNPDF23_nlo_FFN_NF5_as_ (Neutral Network NLO 0+100 replicas) - 239400-239500
239600-239700
239800-239900
240000-240100
230200-240300
NNPDF23_nlo_FFN_NF5_as_0116
NNPDF23_nlo_FFN_NF5_as_0117
NNPDF23_nlo_FFN_NF5_as_0118
NNPDF23_nlo_FFN_NF5_as_0119
NNPDF23_nlo_FFN_NF5_as_0120
0-100 10-9 1.0 2.0 1 x 108
NNPDF23_nnlo_FFN_NF5_as_ (Neutral Network NNLO 0+100 replicas) - 240400-240500
240600-240700
240800-240900
241000-241100
241200-241300
NNPDF23_nnlo_FFN_NF5_as_0116
NNPDF23_nnlo_FFN_NF5_as_0117
NNPDF23_nnlo_FFN_NF5_as_0118
NNPDF23_nnlo_FFN_NF5_as_0119
NNPDF23_nnlo_FFN_NF5_as_0120
0-100 10-9 1.0 2.0 1 x 108
NNPDF23_nlo_as_?_mc (Neutral Network NLO 0+100 replicas for Monte Carlos) - 241400-241500
241600-241700
241800-241900
242000-242100
242200-242300
NNPDF23_nlo_as_0116_mc
NNPDF23_nlo_as_0117_mc
NNPDF23_nlo_as_0118_mc
NNPDF23_nlo_as_0119_mc
NNPDF23_nlo_as_0120_mc
0-100 10-9 1.0 2.0 1 x 108
NNPDF23_nlo_FFN_NF4_as_?_mc (Neutral Network NLO 0+100 replicas for Monte Carlos) - 242400-242500
242600-242700
242800-242900
243000-243100
243200-243300
NNPDF23_nlo_FFN_NF4_as_0116_mc
NNPDF23_nlo_FFN_NF4_as_0117_mc
NNPDF23_nlo_FFN_NF4_as_0118_mc
NNPDF23_nlo_FFN_NF4_as_0119_mc
NNPDF23_nlo_FFN_NF4_as_0120_mc
0-100 10-9 1.0 2.0 1 x 108
NNPDF23_nlo_FFN_NF5_as_?_mc (Neutral Network NLO 0+100 replicas for Monte Carlos) - 243400-243500
243600-243700
243800-243900
244000-244100
244200-244300
NNPDF23_nlo_FFN_NF5_as_0116_mc
NNPDF23_nlo_FFN_NF5_as_0117_mc
NNPDF23_nlo_FFN_NF5_as_0118_mc
NNPDF23_nlo_FFN_NF5_as_0119_mc
NNPDF23_nlo_FFN_NF5_as_0120_mc
0-100 10-9 1.0 2.0 1 x 108
NNPDF23_nlo_as_?_qed (Neutral Network NLO 0+100 replicas for Monte Carlos) - 244400-244500
244600-244700
244800-244900
NNPDF23_nlo_as_0117_qed
NNPDF23_nlo_as_0118_qed
NNPDF23_nlo_as_0119_qed
0-100 10-9 1.0 2.0 1 x 108
NNPDF23_nlo_as_?_qed_neutron (Neutral Network NLO 0+100 replicas for Monte Carlos) - 245000-245100
245200-245300
245400-245500
NNPDF23_nlo_as_0117_qed_neutron
NNPDF23_nlo_as_0118_qed_neutron
NNPDF23_nlo_as_0119_qed_neutron
0-100 10-9 1.0 2.0 1 x 108
NNPDF23_nnlo_as_?_qed (Neutral Network NNLO 0+100 replicas for Monte Carlos) - 245600-245700
245800-245900
246000-246100
NNPDF23_nnlo_as_0117_qed
NNPDF23_nnlo_as_0118_qed
NNPDF23_nnlo_as_0119_qed
0-100 10-9 1.0 2.0 1 x 108
NNPDF23_nnlo_as_?_qed_neutron (Neutral Network NNLO 0+100 replicas for Monte Carlos) - 246200-246300
246400-246500
246600-246700
NNPDF23_nnlo_as_0117_qed_neutron
NNPDF23_nnlo_as_0118_qed_neutron
NNPDF23_nnlo_as_0119_qed_neutron
0-100 10-9 1.0 2.0 1 x 108
NNPDFpol10 (Neutral Network NLO 0+100 replicas for Monte Carlos) - 250000-250100 NNPDFpol1-_100 0-100 10-9 1.0 2.0 1 x 108

Nuclear PDFs

PDF set .LHpdf .LHgrid File Name Member Xmin Xmax Q2min GeV2 Q2max GeV2
HKN - LO - 100051-100070 HKNlo 1-19 10-9 1.0 1.0 1 x 108
HKN - NLO - 100151-100170 HKNnlo 1-19 10-9 1.0 1.0 1 x 108

Pion PDFs

PDF set .LHpdf .LHgrid File Name Member Xmin Xmax Q2min GeV2 Q2max GeV2
OW-P Set 1 LO - 211 OWPI 0/1 5 x 10-3 0.9998 4.0 2 x 103
OW-P Set 2 LO - 212 OWPI 2 5 x 10-3 0.9998 4.0 2 x 103
SMRS-P 1 NLO - 231 SMRSPI 1 10-5 0.9998 5.0 1.31 x 106
SMRS-P 2 NLO - 232 SMRSPI 0/2 10-5 0.9998 5.0 1.31 x 106
SMRS-P 2 NLO - 233 SMRSPI 3 10-5 0.9998 5.0 1.31 x 106
GRV-P HO NLO - 251 GRVPI1 0/1 10-5 0.9998 0.3 106
GRV-P HO LO - 252 GRVPI0 0/1 10-5 0.9998 0.25 106
ABFKW-P Set 1 NLO - 261 ABFKWPI 0/1 10-3 0.9998 2.0 108
ABFKW-P Set 2 NLO - 262 ABFKWPI 2 10-3 0.9998 2.0 108
ABFKW-P Set 3 NLO - 263 ABFKWPI 3 10-3 0.9998 2.0 108

Photon PDFs

PDF set .LHpdf .LHgrid File Name Member Xmin Xmax Q2min GeV2 Q2max GeV2
DO-G Set 1 LO - 311 DOG0 0/1 10-5 0.9 10.0 104
DO-G Set 2 NLO - 312 DOG1 0/1 10-5 0.9 10.0 104
DG-G Set 1 LO - 321 DGG 0/1 10-5 0.9998 1.0 104
DG-G Set 2 LO - 322 DGG 2 10-5 0.9998 1.0 50.0
DG-G Set 3 LO - 323 DGG 3 10-5 0.9998 20.0 500.0
DG-G Set 4 LO - 324 DGG 4 10-5 0.9998 200.0 104
LAC-G Set 1 LO - 331 LACG 0/1 10-4 0.9998 4.0 105
LAC-G Set 2 LO - 332 LACG 2 10-4 0.9998 4.0 105
LAC-G Set 3 LO - 333 LACG 3 10-4 0.9998 1.0 105
GAL-G LO - 334 LACG 4 10-4 0.9998 4.0 105
GS-G NLO - 341 GSG1 0/1 5 x 10-4 0.9998 5.3 108
GS-G LO Set 1 - 342 GSG0 0/1 5 x 10-4 0.9998 5.3 108
GS-G LO Set 2 - 343 GSG0 2 5 x 10-4 0.9998 5.3 108
GS-G-96 NLO - 344 GSG961 0/1 5 x 10-4 0.9998 5.3 108
GS-G-96 LO - 345 GSG960 0/1 5 x 10-4 0.9998 5.3 108
GRV-G 1HO DIS NLO - 351 GRVG1 1 10-5 0.9998 0.3 106
GRV-G HO DIS NLO - 352 GRVG1 0/2 10-5 0.9998 0.3 106
GRV-G LO - 353 GRVG0 1 10-5 0.9998 0.25 106
GRS-G LO - 354 GRVG0 0/2 10-5 0.9998 0.6 5 x 104
ACFGP-G HO NLO - 361 ACFGPG 1 1.37 x 10-3 0.9986 2.0 5.5 x 105
ACFGP-G HO-mc NLO - 362 ACFGPG 2 1.37 x 10-3 0.9986 2.0 5.5 x 105
ACFGP-G HO NLO - 363 ACFGPG 0/3 1.37 x 10-3 0.9986 2.0 5.5 x 105
WHIT-G 1 LO - 381 WHITG 0/1 10-3 0.9998 4.0 2.5 x 103
WHIT-G 2 LO - 382 WHITG 2 10-3 0.9998 4.0 2.5 x 103
WHIT-G 3 LO - 383 WHITG 3 10-3 0.9998 4.0 2.5 x 103
WHIT-G 4 LO - 384 WHITG 4 10-3 0.9998 4.0 2.5 x 103
WHIT-G 5 LO - 385 WHITG 5 10-3 0.9998 4.0 2.5 x 103
WHIT-G 6 LO - 386 WHITG 6 10-3 0.9998 4.0 2.5 x 103
SaS-G 1D (ver.1) LO - 391 SASG 1 10-5 0.9998 0.36 5 x 104
SaS-G 1M (ver.1) LO - 392 SASG 2 10-5 0.9998 0.36 5 x 104
SaS-G 2D (ver.1) LO - 393 SASG 3 10-5 0.9998 4.0 5 x 104
SaS-G 2M (ver.1) LO - 394 SASG 4 10-5 0.9998 4.0 5 x 104
SaS-G 1D (ver.2) LO - 395 SASG 5 10-5 0.9998 0.36 5 x 104
SaS-G 1M (ver.2) LO - 396 SASG 0/6 10-5 0.9998 0.36 5 x 104
SaS-G 2D (ver.2) LO - 397 SASG 7 10-5 0.9998 4.0 5 x 104
SaS-G 2M (ver.2) LO - 398 SASG 8 10-5 0.9998 4.0 5 x 104

B  Examples

The example tar file can be downloaded from the website. Untarring the file will create the directory Examples which contains the source code of the 3 examples together with the makefile to generate the executables. Note that the pathnames in the makefile have to be edited for proper execution. When running an example for the first time with the evolution code QCDNUM a grid has to be calculated. This might take some time depending on the grid size. Running with the PDF set after that the initialization time is much shorter as everything can be read in from an external file.

B.1  Example 1: A PDF table

The executable example.x is made by the command make 1. The first example code simply runs through all 100 PDF members of the Alekhin set [6], printing out aS(MZ) and the gluon PDF momentum densities at a few (x,Q) points:

  
      program example1
      implicit real*8(a-h,o-z)
      character name*64
      real*8 f(-6:6)
*
      name='cteq61.LHpdf'
      call InitPDFsetByName(name)
*
      QMZ=91.18d0
      write(*,*)
      call numberPDF(N)
       do i=0,N
         write(*,*) '---------------------------------------------'
         call InitPDF(i)
         write(*,*) 'PDF set ',i
         write(*,*)
         a=alphasPDF(QMZ)
         write(*,*) 'alpha_S(M_Z) = ',a
         write(*,*)
         write(*,*) 'x*up'
         write(*,*) '   x     Q=10 GeV     Q=100 GeV    Q=1000 GeV'
         do x=0.1d0,0.95d0,0.1d0
            Q=10d0
            call evolvePDF(x,Q,f)
            u1=f(2)
            Q=100d0
            call evolvePDF(x,Q,f)
            u2=f(2)
            Q=1000d0
            call evolvePDF(x,Q,f)
            u3=f(2)
            write(*,*) x,u1,u2,u3
         enddo
      enddo
*
     end

B.2  Example 2: Calculating Uncertainties for Monte Carlo PDF sets

Warning: only use the following on the Botje99, Fermi02 and Alekhin00 sets!

The method os NOT appiclable to other error sets such as MRST and CTEQ

The executable example.x is made by the command make 2. The second example calculates the average value of the gluon PDF and its standard deviation for several x values at Q=100 GeV using the Botje set [7]. Note that the program calculates the quantities in two manners. First by placing the loop over the PDF members inside the loop over the parton momentum fractions. Second, by exchanging this order and storing the first and second moments in an array depending on the x value. The second method is considerably faster in computing time as each PDF member is only initialized once.

Also calculated is the correlation of the gluon momentum PDF between x=0.001 and x=0.01 and the correlation between the strange quark momentum PDF at x=0.001 and aS(Q) at Q=10 GeV.

      program example2
      implicit real*8(a-h,o-z)
      character*32 name
      real*8 f(-6:6),mom1(9),mom2(9)
*
      Q=100d0
      name='../PDFsets/Botje_100.LHpdf'
      call InitPDFset(name)
*
      call numberPDF(Nmem)
      write(*,*)
      write(*,*) 'Calculating the gluon momentum PDF average <g>'
      write(*,*) 'and standard deviaton SD(g) for several x values'
      write(*,*) 'at Q=100 GeV'
      write(*,*)
      write(*,*) '1. The slow way:'
      write(*,*) 
      write(*,*) '   x       <g>         SD(g)'
      do x=0.01d0,0.095d0,0.01d0
         gmom1=0d0
         gmom2=0d0
         do i=1,Nmem
            call InitPDF(i)
            call evolvePDF(x,Q,f)
            gmom1=gmom1+f(0)
            gmom2=gmom2+f(0)**2
         enddo
         av=gmom1/Nmem
         sd=sqrt(gmom2/Nmem-av**2)
         write(*,*) x,av,sd
      enddo
      write(*,*) 
      write(*,*) '2. The fast way:'
      write(*,*) 
      write(*,*) '   x       <g>         SD(g)'
      do i=1,9
         mom1(i)=0d0
         mom2(i)=0d0
      enddo
      do i=1,Nmem
         call InitPDF(i)
         ic=0
         do x=0.01d0,0.095d0,0.01d0
            call evolvePDF(x,Q,f)
            ic=ic+1
            mom1(ic)=mom1(ic)+f(0)
            mom2(ic)=mom2(ic)+f(0)**2
         enddo
      enddo
      ic=0
      do x=0.01d0,0.095d0,0.01d0
         ic=ic+1
         av=mom1(ic)/Nmem
         sd=sqrt(mom2(ic)/Nmem-av**2)
         write(*,*) x,av,sd
      enddo
*
      Q=10d0
      x1=0.001d0
      x2=0.01d0
      write(*,*)
      write(*,*) 'Calculating the normalized correlation coefficient'
      write(*,*) '<g1g2> between g(x=0.001) and g(x=0.01) and'
      write(*,*) '<sAlpha> between the strange quark momentum PDF'
      write(*,*) 'at x=0.001 and alpha_S(Q) for Q=10 GeV'
      write(*,*)
      avg1=0d0
      avg2=0d0
      avs=0d0
      avAs=0d0
      sdg1=0d0
      sdg2=0d0
      sds=0d0
      sdAs=0d0
      Cg1g2=0d0
      CsAs=0d0
      j=3
      do i=1,Nmem
         call InitPDF(i)
         As=alphasPDF(Q)
         call evolvePDF(x1,Q,f)
         g1=f(0)
         s=f(j)
         call evolvePDF(x2,Q,f)
         g2=f(0)
         avAs=avAs+As
         avg1=avg1+g1
         avg2=avg2+g2
         avs=avs+s
         sdAs=sdAs+As**2
         sdg1=sdg1+g1**2
         sdg2=sdg2+g2**2
         sds=sds+s**2
         CsAs=CsAs+s*As
         Cg1g2=Cg1g2+g1*g2
      enddo
      avAs=avAs/Nmem
      avs=avs/Nmem
      avg1=avg1/Nmem
      avg2=avg2/Nmem
      sdAs=sdAs/Nmem-avAs**2
      sds=sds/Nmem-avs**2
      sdg1=sdg1/Nmem-avg1**2
      sdg2=sdg2/Nmem-avg2**2
      CsAs=CsAs/Nmem-avs*avAs
      Cg1g2=Cg1g2/Nmem-avg1*avg2
      write(*,*) '<g1g2>    = ',Cg1g2/sqrt(sdg1*sdg2)
      write(*,*) '<sAlpha> = ',CsAs/sqrt(sds*sdAs)
      end

B.3  Example 3: A Convenient Wrap

The executable example.x is made by the command make 3. The third example prints out the same as the first example. However it uses a wrapper around the LHAPDF code. The single call wrapper takes care of the initialization calls. Note that the number of PDF members is only known after the first call to the subroutine parden. Also the aS value is only known after the first call to the subroutine parden for a specific member PDF.

      program example3
      implicit real*8(a-h,o-z)
      real*8 f(-6:6)
*
      QMZ=91.71d0
      Nmem=100
      write(*,*)
      do i=1,Nmem
         write(*,*) '---------------------------------------------'
         write(*,*) 'PDF set ',i
         write(*,*)
         write(*,*) 'x*Gluon'
         write(*,*) '   x     Q=10 GeV     Q=100 GeV    Q=1000 GeV'
         do x=0.01d0,0.095d0,0.01d0
            Q=10d0
            call parden(x,Q,f,i)
            g1=f(0)
            Q=100d0
            call parden(x,Q,f,i)
            g2=f(0)
            Q=1000d0
            call parden(x,Q,f,i)
            g3=f(0)
            write(*,*) x,g1,g2,g3
         enddo
         a=alphasPDF(QMZ)
         write(*,*)
         write(*,*) 'alpha_S(M_Z) = ',a
         write(*,*)
      enddo
*
      end
*
      subroutine parden(x,Q,f,imem)
      implicit none
      character*32 name/'../PDFsets/Alekhin_100.LHpdf'/
      real*8 x,Q,f(-6:6),alfas
      integer imem,init/0/,lmem/-1/
      save init,lmem
*
      if (init.eq.0) then
         init=1
         call InitPDFset(name)
      endif
      if (imem.ne.lmem) then
         lmem=imem
         call InitPDF(lmem)
      endif
      call evolvePDF(x,Q,f)
      return
*
      end

B.4  Example 4: Using LHAGLUE to do Example 1

This program illustrates using the LHAGLUE routines ro repeat Example 1.


      program example4
c
c using lhaglue to do example 1
c
      implicit real*8(a-h,o-z)
      character*20 parm(20)
      double precision value(20)
*
      parm(1)='DEFAULT'
      call SetLHAPARM('SILENT')
c      parm(19)='SILENT'
      val = 10100
      do i=0,40
      value(1)=val+i
        write(*,*) '---------------------------------------------'
        call pdfset(parm,value)
        if (i.eq.0) call getdesc()
        qmz = 91.71d0
        a = alphasPDF(qmz)
        print *,'Alpha_s(Mz)=',a
         write(*,*) 'x*up'
         write(*,*) '   x     Q2=10 GeV     Q=100 GeV    Q=1000 GeV'
         do x=0.1d0,0.95d0,0.1d0
            Q=10.0d0
            call structm(x,q,upv,dnv,usea,dsea,str,chm,bot,top,glu)
            g1=upv+usea
            Q=100d0
            call structm(x,q,upv,dnv,usea,dsea,str,chm,bot,top,glu)
            g2=upv+usea
            Q=1000d0
            call structm(x,q,upv,dnv,usea,dsea,str,chm,bot,top,glu)
            g3=upv+usea
            write(*,*) x,g1,g2,g3
         enddo
      enddo
*
      end

B.4  Example 5: Using Multiset Initialisation

This program illustrates multiset initialisation LHAglue/LHAPDF.

      program example5
c
c using lhaglue for 3 different PDF sets proton/photon/pion
c using lhaglue for 3 different PDF sets proton/photon/pion
c using setpdfpath to define the path
c using PDFsta for statistics
c
      implicit real*8(a-h,o-z)
      character*20 parm(20)
      character name*64
      double precision value(20),g(3)
      integer inset(3)
      data inset/20200,391,231/
      common/W50513/xmin,xmax,q2min,q2max
*
      parm(1)='DEFAULT'

      call setlhaparm('SILENT')
      call setpdfpath('../PDFsets')
      qmz = 91.180d0
      ip2 = 0
      p2 = 0.0d0
      do j=1,3
        print *,'PDF set ',j,' is PDF set number ',inset(j)
        value(1)=inset(j)
        call pdfset(parm,value)
        call getdescm(j)
        call getlam4m(j,0,xlam4)
        call getlam5m(j,0,xlam5)
        a=alphasPDF(QMZ)
        print *,'PDF number, alpha_s(mz), xmin, xmax, q2min, q2max, lambda4, lambda5'
        print *,value(1),a,xmin,xmax,q2*
      call PDFsta
      end
wmin,q2max,xlam4,xlam5
      write(*,*) '---------------------------------------------'
      enddo
      Q=100.0d0
      print *,'x*gluon at Q = 100 GeV'
      print *,'PDF sets: ',(inset(j),j=1,3)
      write(*,*) '---------------------------------------------'
      do x=0.1d0,0.95d0,0.1d0
       do j=1,3
        value(1)=inset(j)
        call pdfset(parm,value)
        if(value(1).ge.300.and.value(1).le.399) then
          call structp(x,q2,p2,ip2,upv,dnv,usea,dsea,str,chm,bot,top,glu)
        else
          call structm(x,q,upv,dnv,usea,dsea,str,chm,bot,top,glu)
        endif
            g(j)=glu
       enddo
         write(*,*) x,(g(j),j=1,3)
      enddo
*
      call PDFsta
      end

References

[1]
M. Botje, QCDNUM version 16.12, preprint ZEUS-97-066,
http://www.nikhef.nl/ ~ h24/qcdnum.
[2]
S. Alekhin, M. Botje, W. Giele, J. Pumplin, F. Olness, G. Salam and A. Vogt,
Physics at TeV Colliders II Workshop, Les Houches, France, May 2001.
[3]
H. Plothow-Besch, Comput. Phys. Commun. 75, 396 (1993).
[4]
W. Giele, S. Keller and D. Kosower, hep-ph/0104052;
W. Giele and S. Keller, hep-ph/9803393 [Phys. Rev. D58, 1997, 094023].
[5]
W. Giele and S. Keller, hep-ph/0104053.
[6]
S. I. Alekhin, hep-ph/0011002, [Phys. Rev. D63, 2001, 094022].
[7]
M. Botje, hep-ph/9912439, [Eur. Phys. J. C14, 2000, 285].


Footnotes:

1W. Giele, Fermilab, giele@fnal.gov and M.R. Whalley, Durham U, m.r.whalley@durham.ac.uk

2Developed by D. Bourilkov and C. Group, University of Florida hep-ph/0305126.


File translated from TEX by TTH, version 3.06.
On 5 Apr 2002, 11:34.