Saturation physics at One Loop Order

This project is maintained by diazona

This is the program used to calculate the complete next-to-leading cross section for inclusive hadron production in pA collisions, described in the paper

Anna M. Stasto, Bo-Wen Xiao, David Zaslavsky
"Towards the Test of Saturation Physics Beyond Leading Logarithm"
arXiv:1307.4057 [hep-ph]

Please cite this paper if you use the results of the code in a publication.

Quick start

Downloading the code

If you have git installed

The quickest way to obtain the code is to use git. Run the following commands:

git clone
git submodule init
git submodule update

If you don't have git installed

If you don't have git (and don't want to download it), you can download the source code manually.

  1. Download the latest designated release as a GZIP'd TAR file or a ZIP file. It contains the following directory structure:
    • SOLO-0.1/
      • cmake/ (contains files)
      • interp2d/ (empty)
      • quasimontecarlo/ (empty)
      • src/ (contains files)
      • README
      • CMakeLists.txt
      • .gitmodules
    Extract this into a folder of your choice.
  2. Download the latest release of interp2d as a GZIP'd TAR file or a ZIP file. It contains the following directory structure:
    • interp2d-0.1/
      • CMakeLists.txt
      • COPYING
      • bicubic.c
      • bilinear.c
      • interp2d.c
      • interp2d.h
      • interp2d.kdev4
      • interp2d_spline.c
      • interp2d_spline.h
      • test.c
    Move the files from interp2d-0.1/ into SOLO-0.1/interp2d/.
  3. Download the latest release of quasimontecarlo as a GZIP'd TAR file or a ZIP file. It contains the following directory structure:
    • quasimontecarlo-0.1/
      • CMakeLists.txt
      • cmake/ (contains files)
      • quasimontecarlo.c
      • quasimontecarlo.h
      • quasimontecarlo.kdev4
      • test.c
    Move the files from quasimontecarlo-0.1/ into SOLO-0.1/quasimontecarlo/.

Downloading external files

At this point you will need to manually download the MSTW PDF interface from Extract the files and mstwpdf.h from the tarball and place them in SOLO's src/ directory. (We are not authorized to distribute the MSTW PDF interface as part of SOLO, which is why this has to be done manually.)


You will need to have the following dependencies already installed:

If you have CMake installed

CMake is a cross-platform build system that fills roughly the same role as configure from GNU autotools. If you have it installed, it will check that the dependencies are satisfied, and show an error message if they are not.

To compile with CMake: from the directory SOLO/ or SOLO-0.1/ (the parent directory of src/), run these commands:

mkdir build
cd build
cmake .. && make

At the end of this you should have a build/ directory containing the executable files.

If you don't have CMake installed

If you don't have CMake installed (and don't want to download it), you can compile the source code manually, but it is up to you to make sure all the dependencies are properly installed. In the directory src/, make an empty file named git_revision.h. Then, from the parent directory of src/, run this command:

c++ src/oneloopcalc.cpp src/integrator.cpp src/hardfactors_position.cpp \
src/hardfactors_radial.cpp src/hardfactors_momentum.cpp src/dss_pinlo.cpp \
src/ src/cubature.c src/gluondist.cpp src/coupling.cpp \
src/factorizationscale.cpp src/integrationcontext.cpp \
src/integrationtype.cpp src/context.cpp src/utils.cpp interp2d/interp2d.c \
interp2d/bilinear.c interp2d/bicubic.c quasimontecarlo/quasimontecarlo.c \
-I interp2d/ -I quasimontecarlo/ -lgsl -lgslcblas -lm -lssl -lcrypto \
-o oneloopcalc

At least, this is the command for GCC; if you are using a different compiler, adjust it accordingly.

Extra runtime files

In order to run the program, you will need two additional files:


The main executable is called oneloopcalc. It should be invoked as

./oneloopcalc <options>

where the <options> can include any number of the following, in any order:

Hard factor group specifications

Hard factor specifications and hard factor group specifications tell the program which terms to calculate out of the complete NLO expression.

If no hard factor groups are specified on the command line, the program behaves as if lo nlo was given, which prints out the total of the LO terms and the total of the NLO terms, as well as the overall total.

Note that specifying several hard factors as a group (with commas) is considerably more efficient than specifying them individually and having the program print out the results for each one separately.

Configuration file names

Command-line arguments can also include the names of any number of configuration files, which contain parameters for the program in the format


and so on. Keys are case-insensitive. All the possible keys are defined throughout the file context.cpp. Here's a list which should be complete:

A (no default)
the mass number of the target nucleus
abserr (default 10-20)
the absolute error at which to stop an integration, for integration strategies which use this termination condition
alphas (default 0.2)
if fixed coupling is being used, value for the coupling
beta (default 11-2*Nf/3)
if running coupling is being used, coefficient for the LO running coupling
c (no default)
the centrality coefficient, in the range 0 (central) to 1 (peripheral)
c0r_optimization (default true)
if the factorization scale scheme is c0r, whether to skip calculating terms that should be zero
CF (default 1.5)
the color factor
coupling_type (default fixed)
fixed or running
cubature_iterations (default 1000000)
number of calls to use for cubature integration
exact_kinematics (default false)
whether to use exact kinematic expressions
factorization_scale (default fixed)
"fixed" to set the factorization scale to a fixed value, or "4pT2" or "CpT2" to set it to a multiple of hadron transverse momentum, or "c0r" to set it to be inversely proportional to transverse position
factorization_scale_coefficient (no default)
if factorization_scale is "CpT2", this is the coefficient to multiply by pT2 to get mu2 (setting this to 4 is equivalent to specifying factorization_scale = 4pT2)
ff_filename (default PINLO.DAT)
filename to read DSS fragmentation function data from
gammaMV (default 1)
if gdist_type is set to MV, the anomalous dimension in the MV gluon distribution
gdist_momentum_filename (no default)
file to read the momentum-space gluon distribution from, which should contain three columns of space-separated numbers: Q^2, ln(1/x), and F(x,Q^2)
gdist_position_filename (no default)
file to read the position-space gluon distribution from, which should contain three columns of space-separated numbers: r^2, ln(1/x), and S(x,r^2)
gdist_subinterval_limit (default 10000)
if gdist_type is set to MV, the number of subdivisions to use when performing the Fourier integral of the position-space gluon distribution
gdist_type (default GBW)
the type of the gluon distribution: GBW, MV, fMV, file, GBW+file (which uses the GBW distribution at large x and data from a file at small x), or MV+file (same but with MV)
hadron (no default)
the type of hadron to be detected, pi-, pi0, or pi+ (this influences which fragmentation function is used)
inf (default 40)
the cutoff used for integration over an infinite region (for most integration types, integration over the plane is replaced by integration over a square of half-side equal to the value of inf
integration_strategy (default VEGAS)
the integration type to use for Monte Carlo integrals: MISER, VEGAS (best), or QUASI
lambda (default 0.288)
if gdist_type is GBW, MV, GBW+file, or MV+file, the exponent in the definition of the saturation scale
lambdaMV (default 0.241)
if gdist_type is MV or MV+file, the scale for 1/r in the MV gluon distribution, in GeV
lambdaQCD (default 0.2428711 = sqrt(0.0588))
if coupling_type is running, the QCD scale in GeV
miser_iterations (default 10000000)
if integration_strategy is MISER, the number of iterations to use in MISER integration
mu2 (default 10)
if factorization_scale is fixed, the factorization scale in GeV
Nc (default 3)
number of colors
Nf (default 3)
number of flavors
pdf_filename (default mstw2008nlo.00.dat)
filename to read MSTW PDF from
projectile (no default)
the type of projectile, deuteron or proton
pseudorandom_generator_seed (default 0)
seed for the GSL random number generator (0 tells GSL to use a system-dependent default; see the GSL documentation for details)
pseudorandom_generator_type (default mt19937)
algorithm to use for generating random numbers; allowed values are in the GSL documentation
pT (no default)
comma-separated list of transverse momenta
quasirandom_generator_type (default halten)
algorithm to use for generating quasirandom numbers for QMC integration; allowed values are in the GSL documentation
quasi_iterations (default 1000000)
the number of iterations at which to stop quasi Monte Carlo integration
regulator (default 1)
if coupling is running, the position of the Landau pole for the regulated LO running coupling
relerr (default 0)
the relative error at which to stop an integration, for strategies which use this termination condition
satscale_source (default extract from momentum)
for a file gluon distribution, how to extract the saturation scale; allowed values are analytic (Q0²(x0/x)^λ), extract from momentum, which determines the saturation scale by finding the momentum where the gluon distribution equals a fixed fraction of its value at a reference momentum, and extract from position, which finds the radius where the gluon distribution equals a fixed threshold value
satscale_threshold (no default)
if satscale_source is extract from momentum or extract from position, this is the fixed threshold value (or fraction of its value at a reference point, in the momentum case) that the gluon distribution should equal at the saturation scale
Sperp (default 1)
cross-sectional area of the hadron
sqs (no default)
sqrt(s), the collider's CM energy
TR (default 0.5)
group coefficient
vegas_incremental_iterations (default 1000000)
number of function evaluations to use in each step of the VEGAS Monte Carlo algorithm after the first
vegas_initial_iterations (default 100000)
number of function evaluations to use to refine the grid in the first step of the VEGAS algorithm
x0 (default 0.000304)
the fit parameter from the definition of the saturation scale
Y (no default)
comma-separated list of rapidities (in the center of mass frame) to run the calculation at

The configuration files have to at least set A, c, sqs, and Y, and also pT if no transverse momenta are specified as command line arguments.

Transverse momentum values

Any numbers given as command line arguments are put together into one big list of transverse momentum values to run the calculation at. If a comma-separated list of numbers is given, then it will be split apart and each number added to the one big list. There's no significance to putting certain pT values together and others not. (0.5 0.7 0.8,0.9 and 0.5,0.7 0.8 0.9 are exactly equivalent.) Any pT values specified on the command line will replace pT values specified in configuration files.

Literal options

Print out the results for each individual hard factor, not just the total for each hard factor groups
Track and print out the minimum and maximum values of kinematic variables
Print out parameters and values for every call to the gluon distribution. Output goes to the file trace_gdist.output in the working directory. (Expect this file to grow to several hundred megabytes.)
Print out selected variables from the integration context after every single evaluation of the function. The output goes to the file trace.output in the working directory. (Expect this file to grow to several megabytes.) The allowable variables are those in, or you can use --trace=all or --trace=* to print out all available variables.


Basically the code runs as follows:

  1. Collect the command line options and settings from configuration files and put everything into a ResultsCalculator
  2. For each combination of pT and Y, and for each hard factor group:

    1. Create an Integrator with the current values of pT and Y and the current hard factor group
    2. The Integrator calls the GSL Monte Carlo integration routine
    3. For each time the MC routine evaluates the function
      1. Update the variables in the IntegrationContext
      2. Go through the list of HardFactor instances in the current group and get a value from each one
      3. Return the total value
    4. Store the value and error bound returned from the Monte Carlo
  3. Print out all the results


Source code for the program itself

Main program
Declares an output stream to write status messages to
Declares an exception to be thrown when GSL reports an error
A class that abstractly represents a hard factor (i.e. an expression to be integrated)
Implementation of the momentum space hard factors (terms)
Implementation of the position space hard factors (terms)
Implementations of the gluon distributions
A program to print out values from the gluon distributions
Implementations of the fixed and LO running couplings
A C++ interface to the DSS fragmentation functions
Implementations of the various schemes for the factorization scale
A class that stores the kinematic variables used in the calculation. The values stored in this get updated every time the function is evaluated.
A class that stores the parameters for the integral and actually calls the GSL Monte Carlo integration functions
Definitions of integration types. An integration type specifies how many dimensions are in the Monte Carlo integral and what the limits are.
Some string and list processing functions
Variables from the integration context, listed in a separate file as a preprocessor hack of sorts

Source code provided separately

A 2D interpolation library compatible with the GSL. Full source code at
A library for quasi Monte Carlo integration compatible with the GSL. Full source code at
A C++ interface to the MSTW PDFs
A library for multidimensional cubature (deterministic integration)

Other files

Instructions for the build system, CMake
DSS fragmentation function data
DSS fragmentation function data with extrapolation to lower z (the significance of this file will be described in an upcoming long paper about SOLO)