Skip to content

CI: validate Herwig and MadGraph5 tutorial output - #5

Open
ianna wants to merge 3 commits into
codex/lhe-generator-cifrom
codex/herwig-madgraph-ci
Open

ianna wants to merge 3 commits into
codex/lhe-generator-cifrom
codex/herwig-madgraph-ci

Conversation

@ianna

@ianna ianna commented Nov 12, 2026 •

Copy link
Copy Markdown
Owner

Stacked on #4. This diff adds short generation examples to the existing Herwig and MadGraph5 sections and runs them as separate CTest fragment tests.

  • Herwig generates 100 electron–positron hadronic events at 91.2 GeV using the LEP setup. The HepMC3 ASCII check verifies the file markers, event count, and particle-record count in each event.
  • MadGraph5 generates 100 dimuon events at the same energy. The test decompresses the LHE output and validates it with the checker from CI: validate BHLUMI and BabaYaga LHE tutorial output #4.

LXPLUS verification

Test Result CTest time
MadGraph5 Passed. The LHE validator reported 100 events and valid: true. 74.17 s
Herwig Passed with Key4hep 2026-04-08 and the runtime setup below. The HepMC3 validator reported 100 events and valid: true. Herwig reported a maximum four-momentum violation of 0.000 MeV. 3.46 s

Herwig runtime setup

The April release setup left libThePEG.so.30 unresolved. The library was present under the matching release's ThePEG installation in lib/ThePEG. After adding that directory to LD_LIBRARY_PATH, Herwig also needed the CT14lo and CT14nlo PDF sets from LHAPDF.

From the PR checkout in a fresh Bash shell on LXPLUS:

source /cvmfs/sw.hsf.org/key4hep/setup.sh -r 2026-04-08
cmake -S . -B build-2026-04-08
(
  set -e
  thepeg=/cvmfs/sw.hsf.org/key4hep/releases/2026-04-08/x86_64-almalinux9-gcc14.2.0-opt/thepeg/2.3.0-lvgwyn/lib/ThePEG
  export LD_LIBRARY_PATH="$thepeg${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"

  pdf_dir=$(mktemp -d)
  trap 'rm -rf "$pdf_dir"' EXIT
  for pdf in CT14lo CT14nlo; do
    mkdir "$pdf_dir/$pdf"
    for file in "$pdf.info" "${pdf}_0000.dat"; do
      curl -fsSL "https://lhapdfsets.web.cern.ch/current/$pdf/$file" \
        -o "$pdf_dir/$pdf/$file"
    done
  done
  export LHAPDF_DATA_PATH="$pdf_dir${LHAPDF_DATA_PATH:+:$LHAPDF_DATA_PATH}"

  ctest --test-dir build-2026-04-08 -R 'fragments-herwig$' --no-tests=error -V
)

CI now sets up the matching ThePEG library path when needed and supplies both PDF sets. The Key4hep release and nightly jobs passed. CI run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant