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

A stack of volumes. More...

#include <Acts/Geometry/VolumeStack.hpp>

Inheritance diagram for Acts::VolumeStack:
[legend]
Collaboration diagram for Acts::VolumeStack:
[legend]

Classes

struct  ResizeStrategies

Public Member Functions

const std::vector< std::shared_ptr< Volume > > & gaps () const
 Access the gap volume that were created during attachment or resizing.
bool isGapVolume (const Volume &volume) const
 Check if a volume is a gap volume.
Public Member Functions inherited from Acts::Volume
 Volume (const Transform3 &transform, std::shared_ptr< VolumeBounds > volbounds)
 Explicit constructor with shared arguments.
 Volume (const Volume &vol, const Transform3 &shift=Transform3::Identity())
 Copy Constructor - with optional shift.
 ~Volume () noexcept override=default
void assignVolumeBounds (std::shared_ptr< VolumeBounds > volbounds)
 Set volume bounds and update volume bounding boxes implicitly.
BoundingBox boundingBox (const Vector3 &envelope={0, 0, 0}) const
 Construct bounding box for this shape.
const Vector3center () const
 Get the center position of the volume.
const Vector3center (const GeometryContext &gctx) const
 Get the center position of the volume.
const Transform3globalToLocalTransform (const GeometryContext &gctx) const
 Get the transformation matrix from the global experiment's.
bool inside (const GeometryContext &gctx, const Vector3 &gpos, double tol=0.) const
 Inside() method for checks.
bool inside (const Vector3 &gpos, double tol=0.) const
 Inside() method for checks.
const Transform3itransform () const
 Get the inverse transform matrix of the volume.
const Transform3localToGlobalTransform (const GeometryContext &gctx) const
 Get the transformation matrix from the local volume frame to the global experiment's frame.
Volumeoperator= (const Volume &vol)
 Assignment operator.
bool operator== (const Volume &other) const
 Compare this volume with another for equality.
BoundingBox orientedBoundingBox () const
 Construct oriented bounding box for this shape.
Vector3 referencePosition (const GeometryContext &gctx, AxisDirection aDir) const override
 The binning position method.
void setTransform (const Transform3 &transform)
 Set the transform matrix for the volume and update internal state.
const Transform3transform () const
 Get the transform matrix that positions the volume in 3D space.
virtual void update (const GeometryContext &gctx, std::shared_ptr< VolumeBounds > volbounds, std::optional< Transform3 > transform=std::nullopt, const Logger &logger=Acts::getDummyLogger())
 Set the volume bounds and optionally also update the volume transform.
void visualize (IVisualization3D &helper, const GeometryContext &gctx, const ViewConfig &viewConfig) const
 Produces a 3D visualization of this volume.
VolumeBoundsvolumeBounds ()
 Get mutable access to the volume bounds.
const VolumeBoundsvolumeBounds () const
 Get the volume bounds that define the shape of the volume.
std::shared_ptr< VolumeBoundsvolumeBoundsPtr ()
 Get shared pointer to the mutable volume bounds.
std::shared_ptr< const VolumeBoundsvolumeBoundsPtr () const
 Get shared pointer to the const volume bounds.
Public Member Functions inherited from Acts::GeometryObject
 GeometryObject ()=default
 Defaulted constructor.
 GeometryObject (const GeometryIdentifier &geometryId)
 Constructor from a value.
 GeometryObject (const GeometryObject &)=default
 Defaulted copy constructor.
virtual ~GeometryObject () noexcept=default
void assignGeometryId (const GeometryIdentifier &geometryId)
 Set the value.
GeometryIdentifier geometryId () const
virtual double referencePositionValue (const GeometryContext &gctx, AxisDirection aDir) const
 Implement the binningValue.

Protected Member Functions

 VolumeStack (std::vector< Volume * > &volumes, AxisDirection direction, std::pair< VolumeResizeStrategy, VolumeResizeStrategy > resizeStrategies)
std::shared_ptr< VolumeaddGapVolume (const Transform3 &transform, const std::shared_ptr< VolumeBounds > &bounds)

Protected Attributes

AxisDirection m_direction {}
 Direction axis along which volumes are stacked.
std::vector< std::shared_ptr< Volume > > m_gaps {}
 Container of gap volumes created during volume attachment or resizing.
ResizeStrategies m_resizeStrategies
 Resize strategies for volume attachment and modification.
std::vector< Volume * > & m_volumes
 Reference to the vector of volumes in the stack.
Protected Attributes inherited from Acts::Volume
Vector3 m_center
 Center position of the volume in global coordinates.
Transform3 m_itransform
 Inverse of the transform matrix for efficient calculations.
Transform3 m_transform
 Transform matrix that positions the volume in 3D space.
Protected Attributes inherited from Acts::GeometryObject
GeometryIdentifier m_geometryId
 Unique geometry identifier for this object.

Additional Inherited Members

Public Types inherited from Acts::Volume
using BoundingBox = AxisAlignedBoundingBox<Volume, double, 3>
 Type alias for the axis-aligned bounding box of the volume.

Detailed Description

A stack of volumes.

Note
This is a base class for the different types of volume stacks

Constructor & Destructor Documentation

◆ VolumeStack()

Acts::VolumeStack::VolumeStack ( std::vector< Volume * > & volumes,
AxisDirection direction,
std::pair< VolumeResizeStrategy, VolumeResizeStrategy > resizeStrategies )
protected
Parameters
volumesis the vector of volumes
directionis the direction of the stack
resizeStrategiesis the pair of resize strategies

Member Function Documentation

◆ addGapVolume()

std::shared_ptr< Volume > Acts::VolumeStack::addGapVolume ( const Transform3 & transform,
const std::shared_ptr< VolumeBounds > & bounds )
protected
Parameters
transformis the transform of the gap volume
boundsis the bounds of the gap volume
Returns
the shared pointer to the gap volume

◆ gaps()

const std::vector< std::shared_ptr< Volume > > & Acts::VolumeStack::gaps ( ) const

Access the gap volume that were created during attachment or resizing.

Returns
the vector of gap volumes

◆ isGapVolume()

bool Acts::VolumeStack::isGapVolume ( const Volume & volume) const

Check if a volume is a gap volume.

Parameters
volumeis the volume to check
Returns
true if the volume is a gap volume, false otherwise

Member Data Documentation

◆ m_direction

AxisDirection Acts::VolumeStack::m_direction {}
protected

Direction axis along which volumes are stacked.

◆ m_gaps

std::vector<std::shared_ptr<Volume> > Acts::VolumeStack::m_gaps {}
protected

Container of gap volumes created during volume attachment or resizing.

◆ m_resizeStrategies

ResizeStrategies Acts::VolumeStack::m_resizeStrategies
protected

Resize strategies for volume attachment and modification.

◆ m_volumes

std::vector<Volume*>& Acts::VolumeStack::m_volumes
protected

Reference to the vector of volumes in the stack.