Quarkonium-System

Getting started

Requirements

  version needed for
C++ compiler C++23 with <expected> (GCC 14 or newer) everything
CMake 4.1 or newer (the presets use Ninja) build
Eigen 5.0 or newer linear algebra
SQLite3 any recent reading the PDG file
GoogleTest any recent tests
CERN ROOT 6.30 or newer, optional Minuit2, the report figures, the ROOT file
Python 3 optional the Python binding and examples/

ROOT is detected automatically. Force it on or off with -DQGEM_WITH_ROOT=ON or OFF.

Build and test

git clone https://github.com/LeventKaanOguz/Quarkonium-System
cd Quarkonium-System
cmake --preset release
cmake --build --preset release
ctest --preset release

The binary is build/release/qs, the shared library build/release/libqs.so. For a build with the address and undefined-behaviour sanitizers use the asan preset instead of release.

!!! tip “A machine without administrator rights” scripts/bootstrap.sh installs a toolchain into ~/.qs with micromamba (conda-forge) when the system one is too old, builds, and runs the fast tests. It writes scripts/env.sh; prefix later commands with it, for example scripts/env.sh cmake --build --preset release.

Installing

cmake --install build/release --prefix ~/.local     # any prefix
scripts/install-smoke.sh build/release              # or first try it in a temporary one

installs bin/qs, lib/libqs.so, include/qs.h, and under share/quarkonium-system/ the state files, the language bindings and the PDG extract. The installed qs fit finds its state files by itself; give it the PDG file with --pdg. Set QS_ROOT to use another directory with a config/ in it.

Your own programs find the library through CMake or pkg-config (examples/consumer is a complete project):

find_package(QuarkoniumSystem 2 REQUIRED)
target_link_libraries(mine PRIVATE QuarkoniumSystem::qs)
cc mine.c $(pkg-config --cflags --libs qs) -o mine

cd build/release && cpack -G TGZ makes a binary archive of the same tree.

The PDG data

Fits and reports read masses and widths from the PDG’s SQLite file, pdg-2026.0.sqlite, which you download from the PDG API page and put into data/. It is not redistributed in this repository.

A small extract, tests/data/pdg-subset.sqlite, holds the rows of the fitted (c\bar c), (b\bar b) and (B_c) states (PDG data, CC BY 4.0). The tests use it, and so can you for a single fit:

./build/release/qs fit --pdg tests/data/pdg-subset.sqlite

The sweeps and qs report need the full file.

First commands

./build/release/qs                    # list of commands
./build/release/qs version
./build/release/qs fit --help         # every fit option

A published potential needs no data file at all:

echo '{"task":"spectrum","model":{"family":"AL1"},"particles":["c","c~"],"L_max":1,"levels":2}' \
  | ./build/release/qs run -

which returns, for each partial wave, the masses and root-mean-square radii of the lowest levels. Abridged:

state n (J^{PC}) mass (GeV) (\sqrt{\langle r^2\rangle}) (fm)
1S0 0 (0^{-+}) 3.0053 0.362
3S1 0 (1^{–}) 3.1013 0.398
1P1 0 (1^{+-}) 3.4628 0.609
3P2 0 (2^{++}) 3.4865 0.632
1S0 1 (0^{-+}) 3.6082 0.772

Next: your first fit.

Long runs

The full analysis runs over a thousand fits and takes hours. Run it in the background and resume it at will:

cp /path/to/pdg-2026.0.sqlite data/
scripts/run.sh sweep main          # background job, log in logs/; the same command resumes
./build/release/qs sweep stop      # stop running sweeps and their fits

See the full analysis.