PDFxTMDLib · C++17 and Python

A unified library for PDFs and TMDs.

PDFxTMDLib is an open-source library for evaluating collinear parton distribution functions and transverse-momentum-dependent distributions from standard or custom grids.

Language
C++17 with Python bindings
Scope
Collinear PDFs and TMDs
License
GPL-3.0
Platforms
Linux, macOS, and Windows

I

Principal features

A practical interface with room to extend

Unified set access

Load collinear or TMD sets, select individual members, inspect metadata, and evaluate flavors through a consistent family of interfaces.

Browse the API reference

Extensible C++ design

Use the default components or provide custom readers, interpolators, and extrapolators for specialized data and research workflows.

Read the C++ tutorial

Analysis utilities

Calculate central values, asymmetric uncertainties, correlations, and the strong coupling using set metadata in C++ or Python.

Read the Python tutorial

II

A first calculation

Evaluate a collinear distribution

The high-level PDFSet interface manages all members of a set and provides access to metadata, uncertainty calculations, correlations, and strong coupling.

Install the library, configure a data-set search path, and evaluate the desired parton flavor.

example.cppC++
#include <PDFxTMDLib/PDFSet.h>
#include <iostream>

int main() {
    PDFxTMD::PDFSet<PDFxTMD::CollinearPDFTag> set("MSHT20nlo_as120");
    auto central = set[0];

    const double x = 0.1;
    const double mu2 = 10000.0; // GeV^2
    const double gluon = central->pdf(PDFxTMD::PartonFlavor::g, x, mu2);

    std::cout << "g(x, mu2) = " << gluon << '\n';
}

III

A simple path

From installation to analysis

  1. 01

    Install

    Build the C++ library with CMake or install the Python bindings from PyPI.

    Open
  2. 02

    Configure

    Download a collinear or TMD set and add its parent directory to config.yaml.

    Open
  3. 03

    Calculate

    Follow complete C++ and Python examples for values, uncertainties, correlations, and αs.

    Open

IV

Reference shelf

Project resources

Open-source research software

Use PDFxTMDLib in your work.

When PDFxTMDLib contributes to published research, please cite the project paper.