DPD tutorial
Load a dense or hybrid double parton distribution set and evaluate a DPD from C++ or Python.
Before you start
Build or install the DPD-enabled PDFxTMD library. Download either set from the DPD page, choose a directory for PDFxTMD data sets, and extract the archive there.
mkdir -p /path/to/PDFxTMDSets
tar --use-compress-program=unzstd \
-xf ~/Downloads/MSTW2008lo68cl_GSDPDF_Hybrid_256x3.tar.zst \
-C /path/to/PDFxTMDSets
On Linux and macOS, edit ~/.PDFxTMDLib/config.yaml so that paths includes the data directory:
paths:
- /path/to/PDFxTMDSets
On Windows, edit C:\ProgramData\PDFxTMDLib\config.yaml and use the same paths entry with a Windows directory path.
Use one of these directory names exactly:
MSTW2008lo68cl_GSDPDF_PDFxTMDfor the dense gridMSTW2008lo68cl_GSDPDF_Hybrid_256x3for the hybrid set
Python
import pdfxtmd
set_name = "MSTW2008lo68cl_GSDPDF_Hybrid_256x3"
dpd = pdfxtmd.GenericCDPDFactory().mkCDPD(set_name, 0)
value = dpd.dpd(
pdfxtmd.PartonFlavor.g, pdfxtmd.PartonFlavor.g,
1.0e-2, 100.0, 2.0e-2, 400.0,
)
print(value)
The arguments are the two parton flavours, x1, mu1², x2, and mu2². The Python bindings must have been built with DPD support.
C++
#include "PDFxTMDLib/GenericPDF.h"
#include <iostream>
int main() {
using namespace PDFxTMD;
CollinearDPD dpd("MSTW2008lo68cl_GSDPDF_Hybrid_256x3", 0);
const auto value = dpd.dpd(g, g, 1.0e-2, 100.0, 2.0e-2, 400.0);
std::cout << value << '\\n';
}
Next steps
The repository includes the complete C++ DPD example and Python DPD example. To train and package a new hybrid set, follow the DPDFSurrogate guide.