File DD4hepDetectorSurfaceFactory.hpp
-
namespace Acts
Note
This file is foreseen for the
Geometry
module to replaceExtent
-
class DD4hepDetectorSurfaceFactory
- #include <Acts/Plugins/DD4hep/DD4hepDetectorSurfaceFactory.hpp>
A factory to convert DD4hep DetectorElements into sensitive of passive surfaces which are filled into a Cache object, also the create DD4hepDetector elements are provided.
Public Types
-
using DD4hepPassiveSurface = std::tuple<std::shared_ptr<Surface>, bool>
Collect the passive surfaces, bool whether it should be added as an “always try, i.e. assignToAll=true” surface.
-
using DD4hepSensitiveSurface = std::tuple<std::shared_ptr<DD4hepDetectorElement>, std::shared_ptr<Surface>>
Collect the sensitive surface & detector element.
Public Functions
-
DD4hepDetectorSurfaceFactory(std::unique_ptr<const Logger> mlogger = getDefaultLogger("DD4hepDetectorSurfaceFactory", Acts::Logging::INFO))
The DD4hep detector element factory.
- Parameters
mlogger – a screen output logger
-
void construct(Cache &cache, const dd4hep::DetElement &dd4hepElement, const Options &options)
Construction method of the detector elements.
Note
this method will call the recursive construction
- Parameters
cache – [in,out] into which the Elements are filled
dd4hepElement – the detector element representing the super structure
options – to steer the conversion
Private Functions
-
void attachSurfaceMaterial(const dd4hep::DetElement &dd4hepElement, Acts::Surface &surface, ActsScalar thickness, const Options &options) const
Attach surface material if present.
Note
void function that also checks the options if the attachment should be applied
- Parameters
dd4hepElement – the detector element
surface – the surface to attach the material to
thickness – the thickness of the condensed component
options – to steer the conversion
-
DD4hepPassiveSurface constructPassiveComponents(const dd4hep::DetElement &dd4hepElement, const Options &options) const
Method to convert a single sensitive detector element.
- Parameters
dd4hepElement – the detector element
options – to steer the conversion
- Returns
a created surface
-
DD4hepSensitiveSurface constructSensitiveComponents(const dd4hep::DetElement &dd4hepElement, const Options &options) const
Method to convert a single sensitive detector element.
- Parameters
dd4hepElement – the detector element
options – to steer the conversion
- Returns
a created detector element and surface
-
void recursiveConstruct(Cache &cache, const dd4hep::DetElement &dd4hepElement, const Options &options, int level)
Construction method of the detector elements - recursive walk down.
Note
this method is called recursively
- Parameters
cache – [in,out] into which the Elements are filled
dd4hepElement – the detector element representing the super structure
options – to steer the conversion
level – the current level of the tree, used for log message output
Private Static Attributes
-
static constexpr ActsScalar unitLength = Acts::UnitConstants::mm / dd4hep::millimeter
auto-calculate the unit length conversion
-
struct Cache
- #include <Acts/Plugins/DD4hep/DD4hepDetectorSurfaceFactory.hpp>
Nested cache that records the conversion status.
Public Members
-
std::vector<Experimental::ProtoBinning> binnings = {}
The collected binnings.
-
std::size_t convertedMaterials = 0
matching and conversion statistics: materials
-
std::size_t convertedSurfaces = 0
matching and conversion statistics: surfaces
-
std::vector<DD4hepPassiveSurface> passiveSurfaces
The created non-const surfaces - for further processing,.
-
std::vector<DD4hepSensitiveSurface> sensitiveSurfaces
The created detector elements - for the detector store.
-
std::vector<Experimental::ProtoSupport> supports = {}
The collected supports.
-
std::vector<Experimental::ProtoBinning> binnings = {}
-
struct Options
- #include <Acts/Plugins/DD4hep/DD4hepDetectorSurfaceFactory.hpp>
Nested options struct to steer the conversion.
Public Members
-
bool convertMaterial = true
Convert material directly.
-
bool convertPassive = true
Convert passive surfaces.
-
bool convertProxyMaterial = true
Convert proxy material - overrides convertMaterial if present.
-
bool convertSensitive = true
Convert sensitive surfaces.
-
ActsScalar surfaceMaterialThickness = 1_mm
New reference material thickness for surfaces.
-
bool convertMaterial = true
-
using DD4hepPassiveSurface = std::tuple<std::shared_ptr<Surface>, bool>
-
class DD4hepDetectorSurfaceFactory
-
namespace dd4hep