ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
Acts::TrackingGeometry Class Reference

The TrackingGeometry class is the owner of the constructed TrackingVolumes. More...

#include <Acts/Geometry/TrackingGeometry.hpp>

Public Types

enum class  GeometryVersion { Gen1 , Gen3 }
 Which type of geometry this represents: Gen1 or Gen3. More...

Public Member Functions

 TrackingGeometry (const std::shared_ptr< TrackingVolume > &highestVolume, const IMaterialDecorator *materialDecorator=nullptr, const GeometryIdentifierHook &hook={}, const Logger &logger=getDummyLogger(), bool close=true)
 Constructor.
 ~TrackingGeometry ()
 Destructor.
template<typename Callable>
requires (detail::callableWithAnyMutable<Callable>() && !detail::callableWithAnyConst<Callable>())
void apply (Callable &&callable)
 Apply an arbitrary callable as a visitor to the tracking volume.
template<typename Callable>
requires (detail::callableWithAnyConst<Callable>())
void apply (Callable &&callable) const
 Apply an arbitrary callable as a visitor to the tracking volume.
void apply (TrackingGeometryMutableVisitor &visitor)
 Apply a visitor to the tracking volume.
void apply (TrackingGeometryVisitor &visitor) const
 Apply a visitor to the tracking volume.
const LayerassociatedLayer (const GeometryContext &gctx, const Vector3 &gp) const
 Forward the associated Layer information.
const SurfacefindSurface (GeometryIdentifier id) const
 Search for a surface with the given identifier.
const TrackingVolumefindVolume (GeometryIdentifier id) const
 Search for a volume with the given identifier.
const std::unordered_map< GeometryIdentifier, const Surface * > & geoIdSurfaceMap () const
 Access to the GeometryIdentifier - Surface association map.
GeometryVersion geometryVersion () const
 Return the generation of this TrackingGeometry.
TrackingVolumehighestTrackingVolume ()
 Access to the world volume.
const TrackingVolumehighestTrackingVolume () const
 Access to the world volume.
std::shared_ptr< const TrackingVolumehighestTrackingVolumePtr () const
 Access to the world volume.
const TrackingVolumelowestTrackingVolume (const GeometryContext &gctx, const Vector3 &gp) const
 return the lowest tracking Volume
template<SurfaceVisitor visitor_t>
void visitSurfaces (visitor_t &&visitor) const
 Visit all sensitive surfaces.
template<SurfaceVisitor visitor_t>
void visitSurfaces (visitor_t &&visitor, bool restrictToSensitives) const
 Visit all reachable surfaces.
template<TrackingVolumeVisitor visitor_t>
void visitVolumes (visitor_t &&visitor) const
 Visit all reachable tracking volumes.
void visualize (IVisualization3D &helper, const GeometryContext &gctx, const ViewConfig &viewConfig=s_viewVolume, const ViewConfig &portalViewConfig=s_viewPortal, const ViewConfig &sensitiveViewConfig=s_viewSensitive) const
 Visualize a tracking geometry including substructure.

Detailed Description

The TrackingGeometry class is the owner of the constructed TrackingVolumes.

It enables both, a global search for an asociatedVolume (respectively, if existing, a global search of an associated Layer or the next associated Layer), such as a continuous navigation by BoundarySurfaces between the confined TrackingVolumes.

Member Enumeration Documentation

◆ GeometryVersion

Which type of geometry this represents: Gen1 or Gen3.

Enumerator
Gen1 
Gen3 

Constructor & Destructor Documentation

◆ TrackingGeometry()

Acts::TrackingGeometry::TrackingGeometry ( const std::shared_ptr< TrackingVolume > & highestVolume,
const IMaterialDecorator * materialDecorator = nullptr,
const GeometryIdentifierHook & hook = {},
const Logger & logger = getDummyLogger(),
bool close = true )
explicit

Constructor.

Parameters
highestVolumeis the world volume
materialDecoratoris a dediated decorator that can assign surface or volume based material to the TrackingVolume
hookIdentifier hook to be applied to surfaces
loggerinstance of a logger (defaulting to the "silent" one)
closeIf true, run the Gen1 geometry closure

◆ ~TrackingGeometry()

Acts::TrackingGeometry::~TrackingGeometry ( )

Destructor.

Member Function Documentation

◆ apply() [1/4]

template<typename Callable>
requires (detail::callableWithAnyMutable<Callable>() && !detail::callableWithAnyConst<Callable>())
void Acts::TrackingGeometry::apply ( Callable && callable)

Apply an arbitrary callable as a visitor to the tracking volume.

Parameters
callableThe callable to apply
Note
The visitor can be overloaded on any of the arguments that the methods in TrackingGeometryVisitor receive.

◆ apply() [2/4]

template<typename Callable>
requires (detail::callableWithAnyConst<Callable>())
void Acts::TrackingGeometry::apply ( Callable && callable) const

Apply an arbitrary callable as a visitor to the tracking volume.

Parameters
callableThe callable to apply
Note
The visitor can be overloaded on any of the arguments that the methods in TrackingGeometryMutableVisitor receive.

◆ apply() [3/4]

void Acts::TrackingGeometry::apply ( TrackingGeometryMutableVisitor & visitor)

Apply a visitor to the tracking volume.

Parameters
visitorThe visitor to apply

◆ apply() [4/4]

void Acts::TrackingGeometry::apply ( TrackingGeometryVisitor & visitor) const

Apply a visitor to the tracking volume.

Parameters
visitorThe visitor to apply

◆ associatedLayer()

const Layer * Acts::TrackingGeometry::associatedLayer ( const GeometryContext & gctx,
const Vector3 & gp ) const

Forward the associated Layer information.

Parameters
gctxis the context for this request (e.g. alignment)
gpis the global position of the call
Returns
plain pointer to assocaiated layer

◆ findSurface()

const Surface * Acts::TrackingGeometry::findSurface ( GeometryIdentifier id) const

Search for a surface with the given identifier.

Parameters
idis the geometry identifier of the surface
Return values
nullptrif no such surface exists
pointerto the found surface otherwise.

◆ findVolume()

const TrackingVolume * Acts::TrackingGeometry::findVolume ( GeometryIdentifier id) const

Search for a volume with the given identifier.

Parameters
idis the geometry identifier of the volume
Return values
nullptrif no such volume exists
pointerto the found volume otherwise.

◆ geoIdSurfaceMap()

const std::unordered_map< GeometryIdentifier, const Surface * > & Acts::TrackingGeometry::geoIdSurfaceMap ( ) const

Access to the GeometryIdentifier - Surface association map.

Returns
Const reference to the geometry ID to surface map

◆ geometryVersion()

GeometryVersion Acts::TrackingGeometry::geometryVersion ( ) const

Return the generation of this TrackingGeometry.

Returns
the generation of this TrackingGeometry

◆ highestTrackingVolume() [1/2]

TrackingVolume * Acts::TrackingGeometry::highestTrackingVolume ( )

Access to the world volume.

Returns
plain pointer to the world volume

◆ highestTrackingVolume() [2/2]

const TrackingVolume * Acts::TrackingGeometry::highestTrackingVolume ( ) const

Access to the world volume.

Returns
plain pointer to the world volume

◆ highestTrackingVolumePtr()

std::shared_ptr< const TrackingVolume > Acts::TrackingGeometry::highestTrackingVolumePtr ( ) const

Access to the world volume.

Returns
shared pointer to the world volume

◆ lowestTrackingVolume()

const TrackingVolume * Acts::TrackingGeometry::lowestTrackingVolume ( const GeometryContext & gctx,
const Vector3 & gp ) const

return the lowest tracking Volume

Parameters
gctxThe current geometry context object, e.g. alignment
gpis the global position of the call
Returns
plain pointer to the lowest TrackingVolume

◆ visitSurfaces() [1/2]

template<SurfaceVisitor visitor_t>
void Acts::TrackingGeometry::visitSurfaces ( visitor_t && visitor) const

Visit all sensitive surfaces.

Template Parameters
visitor_tType of the callable visitor
Parameters
visitorThe callable. Will be called for each sensitive surface that is found, a selection of the surfaces can be done in the visitor
Note
If a context is needed for the visit, the visitor has to provide this, e.g. as a private member

◆ visitSurfaces() [2/2]

template<SurfaceVisitor visitor_t>
void Acts::TrackingGeometry::visitSurfaces ( visitor_t && visitor,
bool restrictToSensitives ) const

Visit all reachable surfaces.

Template Parameters
visitor_tType of the callable visitor
Parameters
visitorThe callable. Will be called for each reachable surface that is found, a selection of the surfaces can be done in the visitor
restrictToSensitivesIf true, only sensitive surfaces are visited
Note
If a context is needed for the visit, the visitor has to provide this, e.g. as a private member

◆ visitVolumes()

template<TrackingVolumeVisitor visitor_t>
void Acts::TrackingGeometry::visitVolumes ( visitor_t && visitor) const

Visit all reachable tracking volumes.

Template Parameters
visitor_tType of the callable visitor
Parameters
visitorThe callable. Will be called for each reachable volume that is found, a selection of the volumes can be done in the visitor
Note
If a context is needed for the visit, the visitor has to provide this, e.g. as a private member

◆ visualize()

void Acts::TrackingGeometry::visualize ( IVisualization3D & helper,
const GeometryContext & gctx,
const ViewConfig & viewConfig = s_viewVolume,
const ViewConfig & portalViewConfig = s_viewPortal,
const ViewConfig & sensitiveViewConfig = s_viewSensitive ) const

Visualize a tracking geometry including substructure.

Parameters
helperThe visualization helper that implement the output
gctxThe geometry context
viewConfigGlobal view config
portalViewConfigView config for portals
sensitiveViewConfigView configuration for sensitive surfaces