LDMX Software
|
The Geant4 plugin allows to build {class}Acts::TrackingGeometry
and {class}Acts::Experimental::Detector
directly from Geant4 geometry input. Both rely on the conversion of G4VPhysicalVolume
into corresponding Acts
objects.
Converting physical volumes into {class}Acts::Surface
objects that represent sensitive detector elements, is done via the {class}Acts::Geant4DetectorSurfaceFactory
. This helper class allows to select volumes from the Geant4 geometry and convert them either into pairs of {class}Acts::Geant4DetectorElement
and {class}Acts::Surface
objects in case of sensitive elements, or simply surfaces objects in the case of passive surfaces.
The selection is hereby done by providing one or more {class}Acts::IGeant4PhysicalVolumeSelector
objects to the surface factory.
Possible implementations of this type of conversions can be seen in the corresponding unit test ActsUnitTestGeant4DetectorSurfaceFactory
The ActsExamples
python bindings allow to conveniently test the conversion of Geant4
volumes into sensitive and passive surfaces, assuming you have a GDML file called detector.gdml
where Geant4PhysVolume
objects can be identified by a certain string, e.g. names containing the flag Sensitive
, or Passive
. Also, multiple match strings are allowed. The converted surfaces can then be displayed with .obj
(part of the Core functionality) or as .svg
files (if ACTS_BUILD_PLUGIN_ACTSVG
is switched on)
In order to build an Acts::Detector
object from Geant4
input, the following steps needs to be done
Geant4PhysVolume
objects into Acts::Surface
and Acts::DetectorVolume
objects (see before)There are several helper methods and tools that can be used, many of them accessible through python bindings. One core component is the selection and assignment of surfaces to dedicated volume. This can be done using e.g. a KDT structure, this can be tested with:
Selected surfaces can be put as a layer structure into a volume