Full simulation


Tutorials are available on a dedicated websites:

Detector simulation

Perticipate in feedback!


Particle gun

There are at least 2 ways of running a particle gun out of the box:

  • using npsim command line

  • using geant macro file and invoke gps

Using npsim (wrapper around ddsim) command line:

# Assumed to run from the root of Athena detector repo
# no spread
npsim --compactFile=athena.xml --runType=run -G -N=2 --outputFile=test_gun.root --gun.position "0.0 0.0 1.0*cm" --gun.direction "1.0 0.0 1.0" --gun.energy 100*GeV --part.userParticleHandler=''

# uniform spread inside an angle:
npsim --compactFile=athena.xml -N=2 --random.seed 1 --enableGun --gun.energy 2*GeV --gun.thetaMin 0*deg --gun.thetaMax 90*deg --gun.distribution uniform --outputFile test.root

Geometry visualization

There are many ways to see the geometry and tracks:

  1. Through Geant4 event display

  2. geoDisplay (root geoViewer)

  3. ddeve (root EVE based event display…)

  4. dd_web_display (using browser and jsroot library)

Geant4 event display

Example command:

# Assumed to run from the root of Athena detector repo
npsim --runType vis --compactFile athena.xml --macro macro/vis.mac --outputFile test.root --enableG4GPS --enableQtUI

Geometry conversion

Convert to GDML

There is a convert_to_gdml.py script in the detector repository (https://eicweb.phy.anl.gov/EIC/detectors/athena/-/blob/master/scripts/convert_to_gdml.py). That can be used to export ALL of ATHENA to gdml, but not individual detector systems.

This is actually done on every commit and the results are saved as job artifacts.

The latest athena.gdml from the master branch

Convert to root

One can use dd_web_display to actually just save root geometry

dd_web_display --export athena.xml  # will create a .root file with the geometry