-
Notifications
You must be signed in to change notification settings - Fork 3
HowtoGeant
Andrey edited this page Aug 15, 2019
·
12 revisions
Back to How-to guides
- Install Geant4 (v.10.5+ is recommended)
For example, on Ubuntu 18.04 one can follow these instructions - Install G4ants: see https://github.com/andrmor/G4ants
On Mainwindow -> "Simulation" tab -> "Particle + photons" tab press "Show / hide advanced options" button.
- Configure the paths (press "Paths" button):
- Set exchange directory: the files for Geant4 - Ants2 exchange will be created there
- Indicate location of the G4ants executable (e.g. /home/username/G4ants/g4ants - it should include the file name!)
- Check "Track particles in Geant4" - it will activate delegation of particle tracking to Geant4 in simulations
- Configure "Options":
- Select the physics list
- Modify / add additional Geant4 command which will be activated before Geant4 simulation starts.
- Select sensitive volumes: energy deposition in these volumes will be collected and send back to ANTS2 for generation of optical photons. One can introduce directly the volume names or wildcards (e.g. Scint* will add to sensitive volumes all volumes with names starting with "Scint"). Multiple volumes can be added: use one volume/wildcard per line.
- Maximum step can be defined for certain volumes (volume name / wildcard per line, e.g. Scint* 0.1 signifies that in all volumes with names starting with "Scint" the maximum step length will be set to 0.1 mm)
- "Cluster merge radius" is only used during storing "true positions" of scintillation events - the events situated closer than this distance will be grouped in clusters. Does not affect photon generation!
- It is possible to activate collection of particle tracks.
- If "Particle transport log" is activated (use "logs" button on the right of the "Simulate" button), detailed information on particle tracking is collected (WARNING: can be huge is size for complicated detectors!). These data, in a form of a tree-like list, as well as some high level information related to tracking (e.g. list and statistics on reactions, particles, traveled distances and distributions of several parameters with cuts) can be accessed on the OutputWindow: see "Event viewer" and "particle log".
- Geant4 can generate particles which are not configured in the current ANTS2 simulation. If you want energy deposition of these particles to result in generation of photons, configure photon yield for "Undefined" particle in the optical properties of the relevant materials.
-
G4ants is a simple c++ / Geant4 project which only requires cmake to build. One can easily modify it to provide additional functionality or adjust physics.
-
If Ants2 is simulating in multi-thread mode, each thread will call its own instance of G4ants. Therefore, multiple copies of exchange files (except the file with the geometry/materials) are generated.
Back to How-to guides