Skip to content

Repository files navigation

DICE

DICE (Detector In a Collider Experiment) is a Geant4-based simulation framework for modelling a typical HEP detector at a collider. It builds a simplified barrel and endcap geometry, runs particle transport through the detector, and can optionally write out history and event information for further analysis.

What this project does

  • Constructs a configurable tracking and calorimetry system with barrel and endcap sections.
  • Uses Geant4 for detector simulation and particle tracking.
  • Supports optional Pythia-based event generation.
  • Can save simulation history and output ROOT files.
  • Includes a test suite built with Catch2.

Requirements

To build and run DICE, the following dependencies are expected to be available:

  • Geant4
  • ROOT
  • Pythia8
  • FastJet
  • Python 3 with development headers
  • pybind11 (bundled in this repository)
  • Catch2

Build

git clone <repository-url>
cd dice
mkdir build && cd build
cmake ..
make -j$(nproc)

The build produces an executable named dice and a test binary named tests.

Run

Run the simulation with:

./dice

Command-line options

./dice [options]

Common options include:

  • -f, --filename <file>: output ROOT filename (default: output.root)
  • -p, --pythia: enable Pythia-based event generation
  • -s, --save-history: save history information
  • -j, --jet-library <name>: specify a jet library
  • -c, --config <config_file>: specify config file for detector configuration (default: config/dice.toml)
  • --check_geometry: run geometry validation instead of a standard run
  • -h, --help: show usage information

Examples:

./dice -f myrun.root --pythia
./dice --save-history -p -f data.root
./dice --check_geometry

Tests

Run the test suite with:

ctest --output-on-failure

or directly:

./tests

Docker

A Docker image with Geant4, Pythia8, FastJet, ROOT and Catch2 support is available for easier setup.

License

This project is distributed under the MIT License. See the LICENSE file for details.

About

DICE (Detector In a Collider Experiment)

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages