ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DD4hepPlugins

Build Acts tracking geometry from DD4hep input. More...

+ Collaboration diagram for DD4hepPlugins:

Build Acts tracking geometry from DD4hep input.

The DD4hepPlugin allows building of the Acts TrackingGeometry from DD4hep input. DD4hep uses ROOT TGeo as an underlying geometry model.

General

The basic input for building the detector are a detector description in the XML file format and a corresponding detector constructor written in C++. These two components have to be changed accordingly. Detector constructors use these XML files as an input and construct a detector in the DD4hep geometry format. The whole detector is segmented into different detector parts, e.g. barrels and endcaps which describe different sub-detectors. Since these sub-detectors are built differently, they need different detector constructors. In this way one detector description in XML can use various detector constructors, needed for the different kinds of detector parts.

In the detector description model of DD4hep any detector is a tree of instances of the so-called DetElement class. This DetElement class provides all needed detector information, e.g. readout segmentation, geometrical information, environmental conditions. This tree is parallel to the volume tree, which provides the TGeoVolumes and their placements. The relation between these two trees is one-directional, i.e. every volume can be accessed via its corresponding DetElement, but not vice versa. Not every supporting material will be declared as a detector element, hence, the geometrical tree can have a deeper hierarchy structure. In order to access both, detector specific and geometrical information, the conversion to the tracking geometry navigates through the detector tree. The DetElement can also be extended, to add specific features or to access information. This extension mechanism is used during the translation process.

ActsExtensions

DD4hep provides a special extension mechanism for the DetElement which allows to add custom features. In Acts this functionality is used for the conversion from DD4hep into Acts. The extensions are used to indicate certain volumes, e.g. if a DetElement is the beam pipe or if a DetElement is a layer carrying the sensitive modules. In addition the extensions are used in order to distinguish if a sub detector is a barrel (described as a cylinder volume in Acts) or an endcap (which is described as a disc volume in Acts). Furthermore the extensions are used to hand over specific information needed for tracking, e.g. paramters for material mapping. Please find further information in Acts::ActsExtension.

DD4hepDetectorElement

In Acts the surfaces describing the sensitive modules of a detector are directly linked to these of the initial geometry input. In the case of DD4hep the Acts::DD4hepDetectorElement was introduced which is the direct link of Acts to DD4hep. In the case for tracking relevant paramters in the DD4hep geometry description are changed (e.g. alignment) it will be automatically changed in Acts.

Build

The DD4hepPlugin is only build on demand. The DD4hepPlugin depends on the TGeoPlugin therefore both Plugins need to be installed. During the cmake configuration the flags ACTS_BUILD_DD4HEP_PLUGIN and ACTS_BUILD_TGEO_PLUGIN need to be set ON. In addition ROOT and DD4hep need to be added to the CMAKE_PREFIX_PATH. When using the DD4hepPlugin both the TGeoPlugin and the DD4hepPlugin components need to be loaded in the user's CMake configuration.

Prerequisites

To guarantee a working translation from DD4hep input to Acts geometry the following conditions need to be met:

There are two modes building the layers around the sensitive detector modules:

The volumes are automatically build around the layers:

Furthermore parameters can be handed over for material mapping or the axes orientation of modules.

Summing up the DetElement tree in DD4hep should have the following structure:

DD4hepPlugin_DetElementStructure.jpg

It is also possible to translate a very simple detector geometry, which just consists of cylindrical (for a barrel) or disc (for endcaps) layers which either have material, or, are declared sensitive in dd4hep themselves without containing any detector modules.

Usage

To receive the Acts::TrackingGeometry the user should use the global function Acts::convertDD4hepDetector(), where he/she needs to hand over the world DetElement of DD4hep. For a valid translation the user needs to make sure, that all prerequisites described above are met and that the right Acts::ActsExtension's are added during the DD4hep construction.