What is EGSnrc - nrc-cnrc/EGSnrc GitHub Wiki

EGSnrc is a software toolkit to perform Monte Carlo simulation of ionizing radiation transport through matter. It models the propagation of photons, electrons and positrons with kinetic energies between 1 keV and 10 GeV, in homogeneous materials. EGSnrc was originally released in 2000, as a complete overhaul of the Electron Gamma Shower (EGS) software package originally developed at the Stanford Linear Accelerator Center (SLAC) in the 1970s. Most notably, EGSnrc incorporates crucial refinements in charged particle transport, better low energy cross sections, and the egs++ class library to model elaborate geometries and particle sources.

What does "EGSnrc" mean? How is it pronounced?

EGSnrc is an acronym of "Electron Gamma Shower, National Research Council", because this sofware models particule "showers" induced by the passage of electrons and photons (and positrons) in materials. The current version has been developed at the National Research Council of Canada, in Ottawa, Canada. We pronounce it "eggs-N-R-C", but others prefer to spell out all the letters as "E-G-S-N-R-C".

What programming language dose EGSnrc use?

The EGSnrc core physics engine is written in Mortran (version 3), which is essentially a macro language with a preprocessor (included with EGSnrc) that transpiles Mortran into Fortran source code, which is compiled as usual. For higher level operation, such parsing simulation input files, and modelling geometries and radiation sources, EGSnrc comprises a C++ library called egs++ (under the hood, the egs++ library links to the core physics Mortran routines). We highly recommend to develop new EGSnrc applications using the egs++ library.

What tools does EGSnrc provide?

Beyond the core radiation physics code library, from which you can build your own radiation transport application, EGSnrc contains a range of ready-made tools to model common radiation transport scenarios. These applications have been developed by numerous authors over decades to advance radiation dosimetry at NRC, and to support the user community at large:

BEAMnrc (Mortran)

  • Models linear accelerator and x-ray tubes
  • Includes geometries that can easily represent flattening filters, collimators, MLCs, etc.
  • Accelerators can be compiled as shared libraries to be used as a particle source for other applications
  • Includes time-synchronized capabilities, for example dynamic jaws and MLCs
  • Used to be distributed as a separate software package, but now it is integrated and installed as part of EGSnrc

DOSXYZnrc (Mortran)

  • Calculates voxel dose distribution in a voxelized phantoms
  • Includes a variety of source models, for example a BEAMnrc shared library
  • Includes time synchronization capabilities

The RZ applications (Mortran)

  • For radiation transport in geometries that have cylindrical symmetry
  • DOSRZnrc (dose and kerma)
  • CAVRZnrc (ionization chamber correction factors and relevant quantities)
  • FLURZnrc (particle fluence)
  • SPRRZnrc (Spencer-Attix spectrum averaged stopping-power ratios for arbitrary media)

The SPH applications (Mortran)

  • For radiation transport in geometries that have spherical symmetry
  • CAVSPHnrc (dose and kerma)
  • EDKnrc (energy deposition kernels for photons or electrons)
  • g (radiative yield, calculates quantities such as mu_tr, mu_en and g-bar)

egs_chamber (C++)

  • Calculates dose and energy deposited in regions
  • Optimized for ionization chamber calculations
  • Further optimized via relevant variance reduction techniques

egs_cbct (C++)

  • Quickly estimates the scatter contribution to an ideal detector in a cone-beam CT (CBCT) setup by means of sophisticated variance reduction techniques and a smoothing algorithm
  • Also estimates the total signal to the detector and its individual components: transmitted and scattered
  • Designed specifically for the purpose of simulating a CBCT scanner, but can also model conventional CT scanners

egs_fac (C++)

  • Calculates free air chamber (FAC) correction factors

cavity (C++)

  • Calculates dose in ionization chamber and correction factors
  • The predecessor of egs_chamber and egs_fac

Tutorials (Mortran and C++)

  • 7 tutorial applications, written both in MORTRAN3, and some in C++ as well
  • The codes are heavily documented and intended to teach the user how to write their own EGSnrc applications