Installation Guide
This guide will walk you through the process of installing PDFxTMDLib on your system.
Prerequisites
Before you begin, make sure you have the following software installed:
- A C++17 compatible compiler (e.g., GCC, Clang, MSVC).
- CMake (version 3.10 or higher).
- LHAPDF (version 6.2 or higher) is recommended for full compatibility.
Building from Source
1. Clone the Repository
First, clone the PDFxTMDLib repository from GitHub:
git clone https://github.com/Raminkord92/PDFxTMD.git
cd PDFxTMD
2. Configure and Build
Create a build directory and use CMake to configure and build the project. For a release build, use the following commands:
mkdir build
cd build
cmake -B Release -DCMAKE_BUILD_TYPE=Release -S ..
cmake --build .
3. Install the Library (Optional)
To install the library on your system (e.g., in /usr/local/
on Linux), run the following command from the build directory:
cmake --install .
Important: After installation, you’ll need to download and configure PDF sets:
- For TMD sets, visit our Downloads page to obtain the supported sets
- For collinear PDF sets, download from the LHAPDF website
- Configure your PDF set paths as explained on the PDF Sets page
Linking with Your Project
The recommended method for integrating PDFxTMDLib into a project is through CMake.
Using CMake
Add the following to your CMakeLists.txt
file:
find_package(PDFxTMDLib REQUIRED)
target_link_libraries(your-project-name PDFxTMD::PDFxTMDLib)
Manual Linking
Alternatively, you can link the executable with the compiler directly. For example, with GCC:
g++ main.cpp -lPDFxTMDLib
Platform-Specific Notes
Windows
On Windows systems, Microsoft Visual Studio 2022 is typically required for successful compilation. The build process will produce a static library.
PDFxTMDLib uses a standardized approach for PDF set organization and selection. Understanding this structure is essential for correctly using the library.