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

DetectorElement plugin for ROOT TGeo shapes. More...

#include <ActsPlugins/Root/TGeoDetectorElement.hpp>

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

Public Types

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

 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 plugin for ROOT TGeo shapes.

Added possibility to hand over transformation matrix.

Todo
what if shape conversion fails? add implementation of more than one surface per module, implementing also for other shapes->Cone,ConeSeg,Tube? what if not used with DD4hep?

Member Typedef Documentation

◆ ContextType

◆ Identifier

◆ identifier_diff

◆ identifier_type

Constructor & Destructor Documentation

◆ TGeoDetectorElement() [1/3]

ActsPlugins::TGeoDetectorElement::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.

Note
this constructor used auto-translation
Parameters
identifieris the detector identifier
tGeoNodeis the TGeoNode which should be represented
tGeoMatrixThe Matrix to global (i.e. ACTS transform)
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.
Note
This parameter only needs to be set for plane modules
Parameters
scaloris the scale factor for unit conversion if needed
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
materialPossible material of detector element

◆ TGeoDetectorElement() [2/3]

ActsPlugins::TGeoDetectorElement::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.

Note
this detector element constructor needs everything pre-computed.
Parameters
identifieris the detector identifier
tGeoNodeis the TGeoNode which should be represented
tgTransformthe transform of this detector element
tgBoundsthe bounds of this surface
tgThicknessthe thickness of this detector element

◆ TGeoDetectorElement() [3/3]

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.

Note
this detector element constructor needs everything pre-computed.
Parameters
identifieris the detector identifier
tGeoNodeis the TGeoNode which should be represented
tgTransformthe transform of this detector element
tgBoundsthe bounds of this surface
tgThicknessthe thickness of this detector element

◆ ~TGeoDetectorElement()

ActsPlugins::TGeoDetectorElement::~TGeoDetectorElement ( )
override

Member Function Documentation

◆ isSensitive()

bool ActsPlugins::TGeoDetectorElement::isSensitive ( ) const
finalvirtual

Is the detector element a sensitive element.

Implements Acts::SurfacePlacementBase.

◆ nominalTransform()

const Acts::Transform3 & ActsPlugins::TGeoDetectorElement::nominalTransform ( ) const

Return the nominal - non-contextual transform.

Returns
Reference to the transformation matrix from local to global coordinates

◆ tgeoNode()

const TGeoNode & ActsPlugins::TGeoDetectorElement::tgeoNode ( ) const

Return the TGeoNode for back navigation.

Returns
Reference to the underlying TGeoNode