GEant4 Monte-Carlo

GEMC is a c++ framework that uses geant4 to simulate the passage of particles through matter. It provides:

  • application independent geometry description

  • easy interface to build / run experiments

  • cad/gdml imports

From left to right: the electron beam in the clas12 detector; electron and ion beans in the electron-ion collider project; the electron-ion collider detector at interaction point; the cebaf bubble experiment .


gemc makes easy things trivial and hard things possible.

Users can build or import from cad complex setups with minimal programming knowledge. See for example how to build a TOF with few lines of code or how to import TOF from cad.

Experiments can be loaded using a combination of these factories:


  • TEXT

  • GDML

  • CAD (STL, PLY, OBJ formats)

  • C++ Plugin

gemc can import models from CAD and GDML. Left: the upper gastrointestinal system is modeled in CAD. It can be imported in GEMC and made it sensitive so that radiation doses can be measured. Right: the mighty USS Enterprise NCC 1701-A (CAD) can be used to shoot protons torpedos at a dragon (CAD) while a GDML sphere is watching.

Simulations are application independent

Once the user defined setup is loaded, gemc translates it in geant4. This includes:

  • geometry

  • materials

  • mirrors

  • physics list

  • digitization

  • electromagnetic fields

All particles are transported through matters and produce radiation, hits, secondaries. gemc then collects the geant4 results and produce the output specified by the user.


Open source

gemc is open source. Please visit the contributing to gemc page if you’re interested in the code development.

If you have any bug/code optimization to report, new ideas, features request, please open a code issue / feature request in github.