Systems
A detector in gemc is composed by one or more systems, each a hierarchical collection of geant4 volumes. In the example below an example with two systems, Forward Detector and Central Detector, is shown.
Systems Hierarchy Visualisation | Corresponding Hierarchy List |
---|---|
|
Create a system
To create a new system, use the sci-g template script scigTemplate.py
. It setups a new directory
with the name of the system containing template files with default geometry and materials.
For example, to create a ‘forward’ system:
scigTemplate.py -s forward
In the directory forward
, the following files appear:
README.md
: a template markdown fileforward.py
: the main python script that calls geometry and material buildersgeometry.py
: the geometry builder; has a box and a tube as example volumesmaterials.py
: the materials’ builder; shows two different ways to define materialsforward.jcard
: the steering card that loads the detector and defines the event generator, the output and the options
Build the system and run gemc
Following the above example, to build the detector, execute forward.py
. This will create the databases for the geometry and materials. The default
database format is text
and the default variation is default
, so the files
forward__geometry_default.txt
and forward__materials_default.txt
will appear.
To load the system in gemc, the following entry is added to the steering card:
"+gsystem": [
{
"system": "./forward",
"factory": "text",
"variation": "default"
}
]
The steering card also setups 200 events, each with one π0, with two outputs: a root file and a text file. Modify as needed and run gemc:
gemc forward.jcard
These steps have been summarized in the following recording:
Variations
The scigTemplate
script accepts a -v
option to create one or more variations of a system.
For example, to create a forward
system with two variations, default
and lead_target
:
scigTemplate.py -s forward -v default lead_target
This will allow to have two versions of the same forward
detector. As an example, the lead_target
variation could be identical
to the default except for the target material. For more details check the Variations Example.
## Database factories