Select Git revision
full_simulation.rst
full_simulation.rst 2.89 KiB
Full simulation
Tutorials
Tutorials are available on a dedicated websites:
Detector simulation
- Full simulation tutorials
- Quick start guide
- Part I. Simple detecotor
- Part II. Part 2: Modifying and Adding Detectors
Tracking
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:
- Through Geant4 event display
- geoDisplay (root geoViewer)
- ddeve (root EVE based event display...)
- 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