Skip to main content
QUICK REVIEW

[Paper Review] A C++ interface to QCDNUM

Valerio Bertone, M. Botje|arXiv (Cornell University)|Dec 21, 2017
Particle physics theoretical and experimental studiesPhysics and Astronomy5 references3 citations
TL;DR

This paper presents a C++ interface to the FORTRAN-based QCDNUM program, enabling seamless integration of QCD parton density evolution into modern C++-based high-energy physics software. By wrapping legacy FORTRAN routines with C++-compatible functions, the interface preserves QCDNUM's high performance while supporting object-oriented programming, dynamic memory management, and type safety, with validated examples showing accurate NNLO evolution and structure function computations.

ABSTRACT

In this document we report on the recent development of a C++ interface to the FORTRAN-based evolution program QCDNUM. A short description of the interface is given with a few basic examples of its usage.

Motivation & Objective

  • To bridge the gap between legacy FORTRAN-based QCDNUM and modern C++-based HEP software frameworks.
  • To maintain QCDNUM's high computational performance while enabling use in object-oriented C++ applications.
  • To provide a portable, standards-compliant C++ interface using autotools and namespace encapsulation.
  • To support key QCDNUM functionalities such as NNLO PDF evolution, structure function computation, and dynamic memory access.
  • To facilitate integration with contemporary tools like xFitter and Alpos by enabling C++-native calls to QCDNUM routines.

Proposed method

  • Wrapping existing FORTRAN subroutines in C++ functions with identical names but lowercase and wrapped in the QCDNUM namespace to avoid naming conflicts.
  • Converting implicit FORTRAN typing to explicit C++ variable declarations, including handling of integer and double-precision types.
  • Mapping FORTRAN array indexing (1-based, with negative indices for antiquarks) to 0-based C++ arrays using index offset adjustments.
  • Implementing a 2D array mapping function k(i,j,n) to convert FORTRAN A(n,m) arrays into 1D C++ arrays for efficient memory access.
  • Handling function pointers by passing function arguments as pointers to C++ functions, enabling user-defined PDF input functions in the evolution routine.
  • Using autotools to build the library with proper linker and name-mangling support for interoperability between C++ and FORTRAN.

Experimental results

Research questions

  • RQ1How can a high-performance FORTRAN-based QCD evolution program be effectively exposed to modern C++ HEP applications?
  • RQ2What are the key challenges in interfacing legacy FORTRAN code with C++ in terms of type safety, memory management, and naming conventions?
  • RQ3Can a C++ interface preserve the computational speed of QCDNUM while enabling object-oriented programming practices?
  • RQ4How can array indexing differences between FORTRAN and C++ be correctly handled in a robust and maintainable way?
  • RQ5What is the impact of using autotools and namespace encapsulation on the portability and usability of the interface?

Key findings

  • The C++ interface successfully enables calling QCDNUM's NNLO PDF evolution and structure function computation routines directly from C++ code with full type safety and modularity.
  • The interface maintains QCDNUM's high performance by reusing the original FORTRAN codebase without reimplementation, avoiding performance degradation.
  • The use of autotools ensures cross-platform compatibility and proper linking, with the interface available from qcdnum release 17-01/14 onward.
  • Example code demonstrates accurate evolution of unpolarized PDFs in the variable-flavor number scheme, yielding a charm sea quark value of 1.8708 at x = 1e-3 and μ² = 1000 GeV².
  • The strong coupling constant αs(mZ²) is correctly computed as 0.11807 using the interface, confirming consistency with the underlying FORTRAN implementation.
  • The interface supports key features such as grid setup, weight computation, and evolution with LO, NLO, and NNLO order, as well as interpolation of PDFs at arbitrary x and μ².

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.