ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
ActsPlugins::DD4hepDetectorElement Class Reference

DetectorElement class implementation for DD4hep geometry. More...

#include <ActsPlugins/DD4hep/DD4hepDetectorElement.hpp>

Inheritance diagram for ActsPlugins::DD4hepDetectorElement:
[legend]
Collaboration diagram for ActsPlugins::DD4hepDetectorElement:
[legend]

Public Types

using ContextType = Acts::GeometryContext
 Broadcast the context type.
using DD4hepVolumeID = dd4hep::DDSegmentation::VolumeID
 Type alias for DD4hep volume identifier used in segmentation.
using Store
 Define a string based store.
Public Types inherited from ActsPlugins::TGeoDetectorElement
using ContextType = Acts::GeometryContext
 Broadcast the context type.
using Identifier = identifier_type
using identifier_diff = long long
using identifier_type = unsigned long long

Public Member Functions

 DD4hepDetectorElement (const dd4hep::DetElement detElement, const std::string &axes="XYZ", double scalor=1., bool isDisc=false, std::shared_ptr< const Acts::ISurfaceMaterial > material=nullptr)
 Constructor.
 ~DD4hepDetectorElement () override=default
const dd4hep::DetElement & sourceElement () const
 Give access to the DD4hep detector element.
Public Member Functions inherited from ActsPlugins::TGeoDetectorElement
 TGeoDetectorElement (const Identifier &identifier, const TGeoNode &tGeoNode, const Acts::Transform3 &tgTransform, const std::shared_ptr< const Acts::DiscBounds > &tgBounds, double tgThickness=0.)
 Constructor with pre-computed disk surface.
 TGeoDetectorElement (const Identifier &identifier, const TGeoNode &tGeoNode, const Acts::Transform3 &tgTransform, const std::shared_ptr< const Acts::PlanarBounds > &tgBounds, double tgThickness=0.)
 Constructor with pre-computed surface.
 TGeoDetectorElement (const Identifier &identifier, const TGeoNode &tGeoNode, const TGeoMatrix &tGeoMatrix=TGeoIdentity(), const std::string &axes="XYZ", double scalor=10., std::shared_ptr< const Acts::ISurfaceMaterial > material=nullptr)
 Constructor.
 ~TGeoDetectorElement () override
Identifier identifier () const
 Get the detector element identifier.
bool isSensitive () const final
 Is the detector element a sensitive element.
const Acts::Transform3localToGlobalTransform (const Acts::GeometryContext &gctx) const override
 Return local to global transform associated with this identifier.
const Acts::Transform3nominalTransform () const
 Return the nominal - non-contextual transform.
const Acts::Surfacesurface () const override
 Return surface associated with this detector element.
Acts::Surfacesurface () override
 Return surface associated with this detector element.
const TGeoNode & tgeoNode () const
 Return the TGeoNode for back navigation.
double thickness () const
 Returns the thickness of the module.
Public Member Functions inherited from Acts::SurfacePlacementBase
virtual ~SurfacePlacementBase ()=default
 Virtual default constructor.

Detailed Description

DetectorElement class implementation for DD4hep geometry.

DetectorElement plugin for DD4hep detector elements. DD4hep is based on TGeo shapes, therefore the DD4hepDetectorElement inherits from TGeoDetectorElement in order to perform the conversion.

The full geometrical information is provided by the TGeoDetectorElement. The DD4hepDetectorElement extends the TGeoDetectorElement by containing a segmentation for the readout.

Member Typedef Documentation

◆ ContextType

◆ DD4hepVolumeID

using ActsPlugins::DD4hepDetectorElement::DD4hepVolumeID = dd4hep::DDSegmentation::VolumeID

Type alias for DD4hep volume identifier used in segmentation.

◆ Store

Initial value:
std::map<std::string,
std::vector<std::shared_ptr<DD4hepDetectorElement>>>

Define a string based store.

Constructor & Destructor Documentation

◆ DD4hepDetectorElement()

ActsPlugins::DD4hepDetectorElement::DD4hepDetectorElement ( const dd4hep::DetElement detElement,
const std::string & axes = "XYZ",
double scalor = 1.,
bool isDisc = false,
std::shared_ptr< const Acts::ISurfaceMaterial > material = nullptr )
explicit

Constructor.

Parameters
detElementThe DD4hep DetElement which should be associated to an ACTS surface
axesis the axis orientation with respect to the tracking frame it is a string of the three characters x, y and z (standing for the three axes) There is a distinction between capital and lower case characters :
  • capital -> positive orientation of the axis
  • lower case -> negative orientation of the axis

Example options are:

  • "XYZ" -> identical frame definition (default value)
  • "YZX" -> node y axis is tracking x axis, etc.
  • "XzY" -> negative node z axis is tracking y axis, etc.
    Parameters
    scaloris the scale factor for unit conversion if needed
    isDiscin case the sensitive detector module should be translated as disc (e.g. for endcaps) this flag should be set to true
    Note
    In the translation from a 3D geometry (TGeo) which only knows tubes to a 2D geometry (Tracking geometry) a distinction if the module should be described as a cylinder or a disc surface needs to be done. Since this information can not be taken just from the geometry description (both can be described as TGeoTubeSeg), one needs to set the flag 'isDisc' in case a volume with shape TGeoTubeSeg should be translated to a disc surface. Per default it will be translated into a cylindrical surface.
    Parameters
    materialOptional material of detector element

◆ ~DD4hepDetectorElement()

ActsPlugins::DD4hepDetectorElement::~DD4hepDetectorElement ( )
overridedefault

Member Function Documentation

◆ sourceElement()

const dd4hep::DetElement & ActsPlugins::DD4hepDetectorElement::sourceElement ( ) const

Give access to the DD4hep detector element.

Returns
Reference to the underlying DD4hep detector element