
The last step of any PDF analysis is of course to make it available to any interested
user.
%
In the earlier days of PDF fitting, this was achieved by means of $(x,Q)$ interpolation tables
and the corresponding driver codes.
%
Back then, the specific format of these tables and of the driver codes
were specific to each PDF group.
%
This was however far from optimal, since standardization was rather difficult,
with programs requiring PDFs as input having to be adapted each time a new
PDF set was released.
%
A first step towards PDF access standardization was achieved with the
release in 1993 of {\tt PDFLIB}~\cite{PlothowBesch:1992qj} as part of the CERN
Program Library software.
%
This allowed a unique interface for calling PDFs to be used without the need
to add external files on a case by case basis.
%
In addition to the PDFs, the value of $\alpha_s(Q)$ used in each specific fit
could also be accessed.

The next step in this standardisation process came with the release in 2005 of {\tt LHAPDF},
the {\it Les Houches Accord on PDFs}~\cite{Whalley:2005nh,Bourilkov:2006cj}, which was developed
as a functional replacement for {\tt PDFLIB}.
%
In order to ensure backwards compatibility, {\tt LHAPDF} included {\tt LHAPDF}Glue, a PDFLIB-like
interface.
%
One of the main motivations to release {\tt LHAPDF} was the realization that dealing with
a large number of error PDF sets, that had then recently became available, was
extremely cumbersome with {\tt PDFLIB}.
%
In particular, {\tt LHAPDF} was organized around the concept of {\it PDF set}, which
was constituted by the central (average) member as well as the corresponding error PDF sets.
%
As in the case of {\tt PDFLIB}, {\tt LHAPDF} was written in Fortran 77, although later a {C/C++} interface was
also developed.

While the Fortran incarnation of {\tt LHAPDF} was very popular and widely used, at some point
its further development became very challenging in particular due to the intrinsic
limitations of Fortran 77 as its native language.
%
In particular, since Fortran 77 required to allocate space for all available
PDFs at compilation time, the memory footprint eventually become impossible to handle
and {\tt LHAPDF} v5.9.1 was the last release.
%
To overcome these limitations, a complete rewriting of {\tt LHAPDF} from scratch in
{\tt C++} was completed in 2014, dubbed {\tt LHAPDF6}~\cite{Buckley:2014ana}.
%
In addition to reducing static memory requirements by orders of magnitude,
this {\tt C++} incarnation of {\tt LHAPDF} offered improved CPU
performance and improved interpolation and extrapolation
functionalities.
%
Moreover, its cascading meta-data system ensured that software releases
are completely decoupled from the availability of novel PDF sets.
%
To ensure backwards compatibility, Fortran 77 interfaces, still very
popular within many MC programs, were also
provided.

In terms of interpolation accuracy, {\tt LHAPDF6} reproduces the v5
results down to residual differences of at most 0.1\%.
%
This is illustrated in Fig.~\ref{fig:lhapdf6}, where we show
the relative difference between {\tt LHAPDF} v5 and v6
  for the gluon PDF $g(x,Q)$ for different values of $x$ as a function of $Q$, using
  CT10 as input PDF.
  %
  In Ref.~\cite{Buckley:2014ana} it was also shown that
  {\tt LHAPDF}6 improves also the CPU timings as compared to v5 by a factor between
  2 and 6. This is seen in the right table in Fig.~\ref{fig:lhapdf6},
  which represents the timing improvements in v6 as compared to v5, $t_6/t_5$,
  for a cross-section integration of 1M phase space points
  with {\tt Sherpa}~\cite{Gleisberg:2008ta} and for CKKW event generation of
  100k $pp \to 4$ jet events.
  %
  The reason of this improvement is the adoption of a more efficient $(x,Q^2)$
  interpolation algorithm.
  %
  Indeed, as opposed to v5 where each group had to provide their own
  interpolation code, in v6 the interpolation settings are universal.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{figure}[t]
\begin{center}
  \includegraphics[scale=0.45]{4-fitting/plots/lhapdf6.pdf}
   \caption{\small 
  Left plot: the relative difference between {\tt LHAPDF} v5 and v6
  for $g(x,Q)$ for different values of $x$ as a function of $Q$, using
  CT10 as input PDF.
  %
  Right plot: the timing improvement in v6 as compared to v5, $t_6/t_5$,
  for a cross-section integration of 1M phase space points
  with {\tt Sherpa} and for CKKW event generation of
  100k $pp \to 4$ jet events.
    \label{fig:lhapdf6}
  }
\end{center}
\end{figure}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Currently {\tt LHAPDF}6 has established itself as the almost universal
software to access PDFs.
%
Its current version is 6.2 and more than 700 PDF sets can be accessed.
%
In addition to unpolarized parton distributions, the flexibility
of the {\tt LHAPDF}6 framework makes it suitable to release other types
of non-perturbative QCD objects, and indeed also polarized PDFs~\cite{Nocera:2014gqa},
nuclear PDFs~\cite{Eskola:2016oht}, and even
fragmentation functions~\cite{Bertone:2017tyb},
are available.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
