CLAS12 Drift Chamber Example
This example shows the CLAS12 drift chamber geometry from clas12-systems. It is upcoming in the next
release.
Quickstart
From the clas12-systems repository, build the geometry database and run a short simulation:
cd $GEMC_HOME/../clas12-systems/geometry_src/dc
./dc.py
gemc dc.yaml -n=1
Geometry
The geometry, shown below, is defined in geometry_src/dc/dc.py and geometry_src/dc/geometry.py.
The DC builder reads the local coatjava geometry factory, converts the CLAS12 drift chamber regions and
superlayers to GEMC volumes, and stores them in gemc.db.
The world (a box named root) contains:
- six sectors of region mother volumes named region1_s1 through region3_s6
- six sectors of superlayer volumes named sl1_s1 through sl6_s6
Interactive viewer:
Physics List
FTFP_BERT is used by default, selected in the YAML file with phys_list: FTFP_BERT.
phys_list
The physics list can be selected using the option
gemc -phys_list <value>where
<value>can be a combination of the Geant4 physics constructors separated by the+sign. For examplegemc -phys_list="FTFP_BERT + G4NeutronCrossSectionXS"To see a list of the available Geant4 constructors:
gemc -showPhysics
Generator
The particle kinematics are defined in the YAML file:
gparticle:
- name: e-
p: 5000*MeV
delta_p: 1*GeV
theta: 25*deg
delta_theta: 15*deg
randomThetaModel: cosine
delta_phi: 180*deg
See also the Internal Generator Documentation for more information.
Digitization
The superlayer sensitivities use the CLAS12-specific dc digitization plugin. The identifiers record sector, superlayer, layer, and wire numbers:
gvolume.digitization = "dc"
gvolume.set_identifier("sector", sector, "superlayer", superlayer, "layer", 1, "wire", 1)
Usage
Building the detector
Use geometry_src/dc/dc.py to build the detector. By default, the setup is stored in a SQLite file named
gemc.db.
See also the Building Geometry for more information.
Running GEMC
The file dc.yaml can be used to run the setup. Add -gui to run interactively:
gemc dc.yaml -gui
Modify dc.yaml as needed, in particular to add particles, control the number of threads, or change the output.
Running Events
Output
The gstreamer option selects the output filenames and formats:
gstreamer:
- format: csv
filename: dc
- format: hipo
filename: dc
See also the Output Documentation for more information.