LHAPDF 6 update
Andy Buckley
University of Glasgow / CERN PH-ADP
+ James Ferrando, David Hall, Steve Lloyd, Martin Ruefenacht, Karl Nordstrom, Graeme Watt PDF4LHC, CERN, 13 Dec 2013
1/11
LHAPDF 6 update Andy Buckley University of Glasgow / CERN PH-ADP + - - PowerPoint PPT Presentation
LHAPDF 6 update Andy Buckley University of Glasgow / CERN PH-ADP + James Ferrando, David Hall, Steve Lloyd, Martin Ruefenacht, Karl Nordstrom, Graeme Watt PDF4LHC, CERN, 13 Dec 2013 1/11 The problem(s) with LHAPDF 5 (recap) Fortran
University of Glasgow / CERN PH-ADP
1/11
◮ Fortran codebase with static memory. Most sets’ common block
◮ Multiset, low-memory, etc. modes are hacks on top of
xMin, etc. ◮ Many different grid formats, and single-file sets add big parsing
2/11
◮ Ground-up rewrite (in C++, with Python wrapper) attempting
AB, Martin Ruefenacht, Karl Nordstrom, James Ferrando, others
◮ Key feature: dynamic allocation: allocate only what you use —
PDF member (1 PDF for each of several flavours) is fundamental
◮ Uniform data format and powerful “cascading” metadata
3/11
◮ Maintainability: single PDF grid format and standard
◮ Speed: Single-flavour loading and interpolation are faster than
◮ Backward compatibility Fortran and C++ interfaces. PYTHIA6,
◮ αs system with analytic, ODE, and interpolation implementations,
◮ ForcePositive option (allow-neg, pos and pos-def behaviours)
4/11
SetDesc: PDF fits using the standard CTEQ PDF evolution [...] Authors: H.-L.Lai, M.Guzzi, J. Huston, Z.Li, P.M.Nadolsky, [...] Reference: arXiv:1007.2241 NumMembers: 53 Flavors: [-5,-4,-3,-2,-1,1,2,3,4,5,21] OrderQCD: 1
PdfType: central Format: lhagrid1
1.690000e+00 2.254442e+00 3.079814e+00 4.317128e+00 ... [Q2s]
[flavs] 0.000000e+00 0.000000e+00 5.253407e+00 6.215917e+00 ... [xfs] 0.000000e+00 1.868643e-01 5.367774e+00 6.316984e+00 ... [xfs...] ...
5/11
#include "LHAPDF/LHAPDF.h" ... LHAPDF::PDF* pdf = LHAPDF::mkPDF("CT10nlo", 0); size_t num_mems = pdf->numMembers(); // One value: double xf_g = pdf->xfxQ(21, 1e-3, 126.0); // Quark and gluon values: vector<double> xfs; pdf->xfxQ(1e-3, 126.0, xfs); // All values (partons, photon, gluino, ...): map<int, double> xfs = pdf->xfxQ(1e-3, 126.0); delete pdf;
vector<unique_ptr<LHAPDF::PDF>> pdfs; LHAPDF::mkPDFs("CT10nlo", pdfs); for (const auto& p : pdfs) double xf_g = p->xfxQ(21, 1e-3, 126.0);
6/11
>>> import lhapdf >>> pdf0 = lhapdf.mkPDF("CT10nlo", 0) >>> pdf0.xfxQ(21, 1e-3, 126) 31.199466144272378
>>> pdfs = lhapdf.mkPDFs("CT10nlo") >>> len(pdfs) 52 >>> [pdf.xfxQ(21, 1e-3, 126) for pdf in pdfs] [31.199466144272378, 31.10261967456719, ... ...
7/11
#if defined LHAPDF_MAJOR_VERSION && LHAPDF_MAJOR_VERSION == 6 LHAPDF::PDF* pdf = LHAPDF::mkPDF("CT10nlo", 0); cout << "xf_g = " << pdf->xfxQ(21, 1e-3, 126.) << endl; delete pdf; #else LHAPDF::initPDFSet("CT10nlo", LHAPDF::LHGRID, 0); cout << "xf_g = " << LHAPDF::xfx(x, 1e-3, 126.) << endl; #endif
8/11
Numbers from 6.0.0beta1 but still relevant
$ size -B -d ~/heplocal/lib/libLHAPDF.so text data bss dec 1509082 142048 2039405376 2041056506
$ size -B -d ~/heplocal/lib/libLHAPDF.so text data bss dec 265310 8504 1552 275366
9/11
◮ We set a nominal LHA5 → 6 reproduction accuracy target of
◮ Regularised deviation measure ∆ = |f6 − f5|/(|f5| + ǫ) ◮ Get sets from http://www.hepforge.org/archive/lhapdf/pdfsets/6.0/
10
10
10
10
10
10
10
10
10
10
10 x 10
10
10
|f6−f5 |/(|f5| +ǫ)
xfacc, flav = g, q =10 xfacc, flav = g, q =50 xfacc, flav = g, q =1 ×102 xfacc, flav = g, q =2 ×102 xfacc, flav = g, q =5 ×102 xfacc, flav = g, q =1 ×103 xfacc, flav = g, q =2 ×103 xfacc, flav = g, q =5 ×103
10/11
◮ We set a nominal LHA5 → 6 reproduction accuracy target of
◮ Regularised deviation measure ∆ = |f6 − f5|/(|f5| + ǫ) ◮ Get sets from http://www.hepforge.org/archive/lhapdf/pdfsets/6.0/
10 10
1
10
2
10
3
10
4
Q 10
10
10
10
10
10 |f6−f5 |/(|f5| +ǫ)
xfacc, flav = g, x =1 ×10−8 xfacc, flav = g, x =1 ×10−6 xfacc, flav = g, x =0.0001 xfacc, flav = g, x =0.01 xfacc, flav = g, x =0.1 xfacc, flav = g, x =0.2 xfacc, flav = g, x =0.5 xfacc, flav = g, x =0.8
10/11
◮ We set a nominal LHA5 → 6 reproduction accuracy target of
◮ Regularised deviation measure ∆ = |f6 − f5|/(|f5| + ǫ) ◮ Get sets from http://www.hepforge.org/archive/lhapdf/pdfsets/6.0/
10 10
1
10
2
10
3
10
4
Q 10
10
10
10
10
|α6−α5|/(|α5| +ǫ)
asacc
10/11
◮ No photon or nuclear PDFs (at least not yet) ◮ All PDFs so far are interpolation grids ◮ Slightly larger files (CT10nlo is 28 MB vs. 21). ◮ Build requires ext libs: recent Boost and yaml-cpp libs. ◮ Not all PDFs will be migrated, not all approved by groups so far
◮ Maybe add flavour aliasing and zipped reading. ◮ Speed-ups in both ipol and init (fast istream, vectorisation, etc.) ◮ Reduce Boost dependency and bundle yaml-cpp ⇒ 6.0.5 ◮ Generalized αs thresholds and other minor αs details ◮ Manager script to replace/upgrade lhapdf-getdata ◮ Zipped data files (for speed and space) ◮ Write-up!
11/11