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
 Pair of resize strategies for volume stacking. More...

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) noexcept
 Explicit constructor with shared arguments.
 Volume (const Volume &vol) noexcept=default
 Copy Constructor.
 Volume (VolumePlacementBase &positioner, std::shared_ptr< VolumeBounds > volbounds) noexcept
 Constructor that connects the volume to an external alignment I.e.
void assignVolumeBounds (std::shared_ptr< VolumeBounds > volbounds)
 Set volume bounds and update volume bounding boxes implicitly.
BoundingBox boundingBox (const GeometryContext &gctx, const Vector3 &envelope=Vector3::Zero()) const
 Construct bounding box for this shape.
Vector3 center (const GeometryContext &gctx) const
 Get the center position of the volume.
const Transform3 & globalToLocalTransform (const GeometryContext &gctx) const
 Get the transformation matrix from the global experiment's frame to the local volume frame.
bool inside (const GeometryContext &gctx, const Vector3 &gpos, double tol=0.) const
 Inside() method for checks.
bool isAlignable () const
 Is the volume connected to the experiment's alignment system (I.e.
const Transform3 & localToGlobalTransform (const GeometryContext &gctx) const
 Get the transformation matrix from the local volume frame to the global experiment's frame.
Volume & operator= (const Volume &vol) noexcept=default
 Assignment operator.
Volume & operator= (Volume &&other) noexcept=default
 Move 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.
Volume shifted (const GeometryContext &gctx, const Transform3 &shift) const
 Shift the volume by a transform.
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.
VolumeBounds & volumeBounds ()
 Get mutable access to the volume bounds.
const VolumeBounds & volumeBounds () const
 Get the volume bounds that define the shape of the volume.
std::shared_ptr< VolumeBounds > volumeBoundsPtr ()
 Get shared pointer to the mutable volume bounds.
std::shared_ptr< const VolumeBounds > volumeBoundsPtr () const
 Get shared pointer to the const volume bounds.
VolumePlacementBase * volumePlacement ()
 VolumePlacement object that dynamically aligns the volume.
const VolumePlacementBase * volumePlacement () const
 VolumePlacement object that dynamically aligns the volume.
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.
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< Volume > addGapVolume (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::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