|
| 1 | +# GEMC — Geant4 Monte-Carlo simulation framework |
| 2 | + |
| 3 | +**GEMC** (the *GEant Monte-Carlo*) is a database-driven [Geant4](https://geant4.web.cern.ch) application for |
| 4 | +detector and radiation-transport simulations. Detector descriptions live outside the compiled C++ application: |
| 5 | +you define geometry, materials, optics, sensitive detectors, and run configuration in Python or data files, and |
| 6 | +GEMC loads them at run time to execute the full Geant4 pipeline. |
| 7 | + |
| 8 | +These images ship a ready-to-run GEMC development environment — the compiled `gemc` simulator, the bundled |
| 9 | +`pygemc` Python tools, and all Geant4 dependencies — so you can simulate without managing a local Geant4 build. |
| 10 | + |
| 11 | +- 🏠 Homepage & docs: https://gemc.github.io/home/ |
| 12 | +- 📦 Source: https://github.com/gemc/src |
| 13 | +- 🐍 Python API (`pygemc`): https://pypi.org/project/pygemc/ |
| 14 | + |
| 15 | +> These images are mirrored from the canonical GitHub Container Registry build at `ghcr.io/gemc/src`. |
| 16 | +> The two registries carry identical content and tags; use whichever is closer to your infrastructure. |
| 17 | +
|
| 18 | +<br/> |
| 19 | + |
| 20 | +## Quick start |
| 21 | + |
| 22 | +```shell |
| 23 | +docker run -it --rm -v "$PWD":/work docker.io/maureeungaro/gemc:dev-ubuntu-24.04 bash |
| 24 | +``` |
| 25 | + |
| 26 | +Inside the container the `gemc` binary and the `pygemc` Python environment are already on the `PATH`: |
| 27 | + |
| 28 | +```shell |
| 29 | +gemc -v # version sanity check |
| 30 | +gemc-system-template -s counter # scaffold a minimal detector system |
| 31 | +cd counter && ./counter.py # build geometry (writes gemc.db) |
| 32 | +gemc counter.yaml # run the simulation |
| 33 | +gemc-analyzer counter_t0_digitized.csv totEdep --kind csv --bins 50 |
| 34 | +``` |
| 35 | + |
| 36 | +<br/> |
| 37 | + |
| 38 | +## Supported tags |
| 39 | + |
| 40 | +Tags follow the pattern `<gemc-version>-<os>-<os-version>` and are multi-architecture |
| 41 | +(`linux/amd64` + `linux/arm64`, except Arch Linux which is `amd64`-only). |
| 42 | + |
| 43 | +| OS | Example tag | Architectures | |
| 44 | +|------------|----------------------|------------------| |
| 45 | +| AlmaLinux | `dev-almalinux-10` | `amd64`, `arm64` | |
| 46 | +| Arch Linux | `dev-archlinux-latest` | `amd64` | |
| 47 | +| Debian | `dev-debian-13` | `amd64`, `arm64` | |
| 48 | +| Fedora | `dev-fedora-44` | `amd64`, `arm64` | |
| 49 | +| Ubuntu | `dev-ubuntu-24.04` | `amd64`, `arm64` | |
| 50 | +| Ubuntu | `dev-ubuntu-26.04` | `amd64`, `arm64` | |
| 51 | + |
| 52 | +The `dev` prefix tracks the latest `main`; versioned release tags follow the same scheme. |
| 53 | + |
| 54 | +<br/> |
| 55 | + |
| 56 | +## What's inside |
| 57 | + |
| 58 | +- The compiled `gemc` Geant4 simulator |
| 59 | +- The bundled `pygemc` Python environment (geometry building, PyVista preview, VTK.js export, analyzer) |
| 60 | +- Geant4, CLHEP, Xerces-C, and the supporting toolchain |
| 61 | + |
| 62 | +Key GEMC features: |
| 63 | + |
| 64 | +- Python-first detector definition through `pygemc` |
| 65 | +- Geometry/material storage in SQLite or GEMC ASCII databases; imports from GDML and CAD meshes |
| 66 | +- Built-in sensitive-detector digitizations: `flux`, `gPhotonDetector`, `dosimeter`, `particle_counter` |
| 67 | +- C++ plugin infrastructure for custom digitization, fields, particle readers, and output streamers |
| 68 | +- Output streamers for ASCII, CSV, JSON, JLAB SRO, and optional ROOT |
| 69 | +- Magnetic-field support, including a built-in multipole field plugin |
| 70 | +- Interactive Geant4/Qt visualization and off-screen image generation |
| 71 | + |
| 72 | +<br/> |
| 73 | + |
| 74 | +## Mounting your work |
| 75 | + |
| 76 | +The examples above mount the current directory at `/work`. Use a bind mount to keep geometry scripts, steering |
| 77 | +cards, and output on the host: |
| 78 | + |
| 79 | +```shell |
| 80 | +docker run -it --rm -v "$PWD":/work -w /work docker.io/maureeungaro/gemc:dev-ubuntu-24.04 bash |
| 81 | +``` |
| 82 | + |
| 83 | +For the interactive Geant4/Qt GUI and Apptainer recipes, see the |
| 84 | +[installation page](https://gemc.github.io/home/installation/). |
| 85 | + |
| 86 | +<br/> |
| 87 | + |
| 88 | +## Documentation & support |
| 89 | + |
| 90 | +- [Installation guide](https://gemc.github.io/home/installation/) |
| 91 | +- [Quickstart tutorial](https://gemc.github.io/home/documentation/quickstart/) |
| 92 | +- [Examples gallery](https://gemc.github.io/home/examples/) |
| 93 | +- [Issue tracker](https://github.com/gemc/src/issues) |
| 94 | + |
| 95 | +<br/> |
| 96 | + |
| 97 | +## Citation |
| 98 | + |
| 99 | +If you use GEMC in scientific work, please cite: |
| 100 | + |
| 101 | +> M. Ungaro, "Geant4 Monte-Carlo (GEMC) A database-driven simulation program," EPJ Web of Conferences 295, |
| 102 | +> 05005 (2024). https://doi.org/10.1051/epjconf/202429505005 |
| 103 | +
|
| 104 | +## License |
| 105 | + |
| 106 | +GEMC is distributed under the project license (see the [source repository](https://github.com/gemc/src/blob/main/LICENSE.md)). |
| 107 | +The images also contain separately licensed third-party components, including Geant4, CLHEP, Qt, ROOT, SQLite, and |
| 108 | +Assimp. |
0 commit comments