File ConvertDD4hepDetector.hpp¶
-
namespace Acts
Note
This file is foreseen for the
Geometry
module to replaceExtent
Note
this is foreseen for the ‘Geometry’ module
Functions
-
void collectCompounds_dd4hep(dd4hep::DetElement &detElement, std::vector<dd4hep::DetElement> &compounds)¶
Method internally used by convertDD4hepDetector to collect all volumes of a compound detector.
- Parameters
detElement – [in] the dd4hep::DetElement of the volume of which the compounds should be collected
compounds – [out] the DD4hep::DetElements of the compounds contained by detElement
-
void collectLayers_dd4hep(dd4hep::DetElement &detElement, std::vector<dd4hep::DetElement> &layers, const Logger &logger)¶
Method internally used by convertDD4hepDetector.
- Parameters
detElement – [in] the dd4hep::DetElement of the volume of which the layers should be collected
layers – [out] the DD4hep::DetElements of the layers contained by detElement
logger – a
Logger
for output
-
void collectSubDetectors_dd4hep(dd4hep::DetElement &detElement, std::vector<dd4hep::DetElement> &subdetectors, const Logger &logger)¶
Method internally used by convertDD4hepDetector to collect all sub detectors Sub detector means each ‘compound’ DetElement or DetElements which are declared as ‘isBarrel’ or ‘isBeampipe’ by their extension.
- Parameters
detElement – [in] the dd4hep::DetElement of the volume of which the sub detectors should be collected
subdetectors – [out] the DD4hep::DetElements of the sub detectors contained by detElement
logger – a
Logger
for output
Global method which creates the TrackingGeometry from DD4hep input.
This method returns a std::unique_ptr of the TrackingGeometry from the World DD4hep DetElement.
- Attention
The default thickness should be set thin enough that no touching or overlapping with the next layer can happen.
Note
Possible binningtypes:
arbitrary - of the sizes if the surfaces and the distance inbetween vary. This mode finds out the bin boundaries by scanning through the surfaces.
equidistant - if the sensitive surfaces are placed equidistantly
Note
equidistant binningtype is recommended because it is faster not only while building the geometry but also for look up during the extrapolation
Note
Layers containing surfaces per default are not allowed to be attached to each other (navigation will fail at this point). However, to allow material layers (not containing surfaces) to be attached to each other, this default thickness is needed. In this way, the layer will be thin (with space to the next layer), but the material will have the’real’ thickness.
- Parameters
worldDetElement – [in] the DD4hep DetElement of the world
loggingLevel – [in] is the debug logging level of the conversion and geometry building
bTypePhi – [in] is how the sensitive surfaces (modules) should be binned in a layer in phi direction.
bTypeR – [in] is how the sensitive surfaces (modules) should be binned in a layer in r direction
bTypeZ – [in] is how the sensitive surfaces (modules) should be binned in a layer in z direction
layerEnvelopeR – [in] the tolerance added to the geometrical extension in r of the layers contained to build the volume envelope around
layerEnvelopeZ – [in] the tolerance added to the geometrical extension in z of the layers contained to build the volume envelope around
defaultLayerThickness – [in] In case no surfaces (to be contained by the layer) are handed over, the layer thickness will be set to this value
sortSubDetectors – [in]
std::function
which should be used in order to sort all sub detectors (=all Detelements collected by the methodcollectSubDetectors()
) from bottom to top to ensure correct wrapping of the volumes, which is needed for navigation. Therefore the different hierachies need to be sorted ascending. The default is sorting by ID.gctx – The geometry context to use
matDecorator – is the material decorator that loads material maps
geometryIdentifierHook – Hook to apply to surfaces during geometry closure.
- Throws
std::logic_error – if an error in the translation occurs
- Pre
Before using this method make sure, that the preconditions described in DD4hepPlugins are met.
- Returns
std::unique_ptr to the full TrackingGeometry * The Tracking geometry needs to be built from bottom to top to ensure Navigation. Therefore the different hierachies need to be sorted ascending. Per default the sub detectors are sorted by the id of their dd4hep::DetElement. In case another sorting needs to be applied, the users can provide their own function
-
std::shared_ptr<const CylinderVolumeHelper> cylinderVolumeHelper_dd4hep(Logging::Level loggingLevel = Logging::Level::INFO)¶
Helper method internally used to create a default Acts::CylinderVolumeBuilder.
-
inline void sortDetElementsByID(std::vector<dd4hep::DetElement> &det)¶
Sort function which sorts dd4hep::DetElement by their ID.
- Parameters
det – [inout] the dd4hep::DetElements to be sorted
-
std::shared_ptr<const CylinderVolumeBuilder> volumeBuilder_dd4hep(dd4hep::DetElement subDetector, Logging::Level loggingLevel = Logging::Level::INFO, BinningType bTypePhi = equidistant, BinningType bTypeR = equidistant, BinningType bTypeZ = equidistant, double layerEnvelopeR = UnitConstants::mm, double layerEnvelopeZ = UnitConstants::mm, double defaultLayerThickness = UnitConstants::fm, const Logger &logger = Acts::getDummyLogger())¶
Method internally used to create an Acts::CylinderVolumeBuilder.
This method creates an Acts::CylinderVolumeBuilder from a sub detector (= ‘compound’ DetElement or DetElements which are declared as ‘isBarrel’ or ‘isBeampipe’ by their extension.
- Attention
The default thickness should be set thin enough that no touching or overlapping with the next layer can happen.
Note
Possible binningtypes:
arbitrary - of the sizes if the surfaces and the distance inbetween vary. This mode finds out the bin boundaries by scanning through the surfaces.
equidistant - if the sensitive surfaces are placed equidistantly
Note
equidistant binningtype is recommended because it is faster not only while building the geometry but also for look up during the extrapolation
Note
Layers containing surfaces per default are not allowed to be attached to each other (navigation will fail at this point). However, to allow material layers (not containing surfaces) to be attached to each other, this default thickness is needed. In this way, the layer will be thin (with space to the next layer), but the material will have the’real’ thickness.
- Parameters
subDetector – [in] the DD4hep DetElement of the subdetector
loggingLevel – [in] is the debug logging level of the conversion and geometry building
bTypePhi – [in] is how the sensitive surfaces (modules) should be binned in a layer in phi direction.
bTypeR – [in] is how the sensitive surfaces (modules) should be binned in a layer in r direction
bTypeZ – [in] is how the sensitive surfaces (modules) should be binned in a layer in z direction
layerEnvelopeR – [in] the tolerance added to the geometrical extension in r of the layers contained to build the volume envelope around
layerEnvelopeZ – [in] the tolerance added to the geometrical extension in z of the layers contained to build the volume envelope around
defaultLayerThickness – [in] In case no surfaces (to be contained by the layer) are handed over, the layer thickness will be set to this value
logger – [in] A logger instance
- Returns
std::shared_ptr the Acts::CylinderVolumeBuilder which can be used to build the full tracking geometry
-
void collectCompounds_dd4hep(dd4hep::DetElement &detElement, std::vector<dd4hep::DetElement> &compounds)¶