A C++ Monte Carlo event generator for simulating scalar meson production in electron-positron annihilation (e⁺e⁻ → scalar meson + photon).
- Two integration methods available:
- TFoam — adaptive Monte Carlo integrator from ROOT
- von Neumann — rejection sampling
- Comparative cross-section scan over a configurable energy range
- Output as ROOT TTrees (
.root) and tables (.csv) - MPI-parallelised event generation (
mpi.cpp) for distributed runs
- ROOT (CERN data analysis framework)
- CLHEP (C++ class library for HEP)
- MPI (for the parallel build target, e.g. OpenMPI or MPICH)
- g++ with C++11 support
# Default build
make spectre.out
# Parallelised MPI build
make mpi.out
# Validation executable
make validation.out
# Clean all build artefacts
make cleanRun the energy-scan executable:
./spectre.out [nEvents]nEvents— optional number of Monte Carlo events per energy point (default: 10 000 000)- Energy range and step are configured inside
spectre.cpp(default: 500–1500 MeV, step 10 MeV)
Output files produced:
treeTFoam.root— ROOT TTree with TFoam-generated four-momentatreeNeum.root— ROOT TTree with Neumann-generated four-momentaintegrals.csv— energy vs. cross-section integral for both methods
For the MPI parallel run:
mpirun -np <N> ./mpi.out