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

This class implements a z-aligned or r-aligned stack of cylinder volumes with synchronized bounds. More...

#include <Acts/Geometry/CylinderVolumeStack.hpp>

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

Public Member Functions

 CylinderVolumeStack (const GeometryContext &gctx, std::vector< Volume * > &volumes, AxisDirection direction, VolumeAttachmentStrategy strategy, std::pair< VolumeResizeStrategy, VolumeResizeStrategy > resizeStrategies, const Logger &logger=Acts::getDummyLogger())
 Constructor from a vector of volumes and direction.
 CylinderVolumeStack (const GeometryContext &gctx, std::vector< Volume * > &volumes, AxisDirection direction, VolumeAttachmentStrategy strategy=VolumeAttachmentStrategy::Midpoint, VolumeResizeStrategy resizeStrategy=VolumeResizeStrategy::Expand, const Logger &logger=Acts::getDummyLogger())
 Constructor from a vector of volumes and direction.
void update (const GeometryContext &gctx, std::shared_ptr< VolumeBounds > volbounds, std::optional< Transform3 > transform=std::nullopt, const Logger &logger=getDummyLogger()) override
 Update the volume bounds and transform.
Public Member Functions inherited from Acts::VolumeStack
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.
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.

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.
Protected Member Functions inherited from Acts::VolumeStack
 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 inherited from Acts::VolumeStack
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.

Detailed Description

This class implements a z-aligned or r-aligned stack of cylinder volumes with synchronized bounds.

Externally, it presents as a single volume. On construction, the input volumes are modified so that they are connected in z and r and have synchronized bounds. The way this is done can be configured using an attachment and a resize strategy. Depending on the configuration, the input volumes are either extended or gap volumes are created.

Note
The volumes are never shrunk, because this would potentially result in overlaps of the resulting volumes bounds.

Constructor & Destructor Documentation

◆ CylinderVolumeStack() [1/2]

Acts::CylinderVolumeStack::CylinderVolumeStack ( const GeometryContext & gctx,
std::vector< Volume * > & volumes,
AxisDirection direction,
VolumeAttachmentStrategy strategy = VolumeAttachmentStrategy::Midpoint,
VolumeResizeStrategy resizeStrategy = VolumeResizeStrategy::Expand,
const Logger & logger = Acts::getDummyLogger() )

Constructor from a vector of volumes and direction.

Parameters
gctxThe current geometry context object, e.g. alignment
volumesis the vector of volumes
directionis the binning direction
strategyis the attachment strategy
resizeStrategyis the resize strategy
Note
resizeStrategy only affects resizing along direction. Resizing in the other direction is always delegated to the child volumes, which might in turn be CylinderVolumeStack
resizeStrategy is used for both ends of the stack
Parameters
loggeris the logger
Precondition
The volumes need to have a common coordinate system relative to direction. I.e. they need to be aligned in z and cannot have a rotation in x or y.
The volumes all need to have CylinerVolumeBounds and cannot have a \(\phi\) sector or bevels.
Note
Preconditions are checked on construction

◆ CylinderVolumeStack() [2/2]

Acts::CylinderVolumeStack::CylinderVolumeStack ( const GeometryContext & gctx,
std::vector< Volume * > & volumes,
AxisDirection direction,
VolumeAttachmentStrategy strategy,
std::pair< VolumeResizeStrategy, VolumeResizeStrategy > resizeStrategies,
const Logger & logger = Acts::getDummyLogger() )

Constructor from a vector of volumes and direction.

Parameters
gctxThe current geometry context object, e.g. alignment
volumesis the vector of volumes
directionis the binning direction
strategyis the attachment strategy
resizeStrategiesis the resize strategies
Note
resizeStrategy only affects resizing along direction. Resizing in the other direction is always delegated to the child volumes, which might in turn be CylinderVolumeStack
The first element of resizeStrategies is used for the low end and the second element is used for the high end of the stack
Parameters
loggeris the logger
Precondition
The volumes need to have a common coordinate system relative to direction. I.e. they need to be aligned in z and cannot have a rotation in x or y.
The volumes all need to have CylinerVolumeBounds and cannot have a \(\phi\) sector or bevels.
Note
Preconditions are checked on construction

Member Function Documentation

◆ update()

void Acts::CylinderVolumeStack::update ( const GeometryContext & gctx,
std::shared_ptr< VolumeBounds > volbounds,
std::optional< Transform3 > transform = std::nullopt,
const Logger & logger = getDummyLogger() )
overridevirtual

Update the volume bounds and transform.

This will update the bounds of all volumes in the stack to accommodate the new bounds and optionally create gap volumes according to the resize strategy set during construction.

Parameters
gctxThe current geometry context object, e.g. alignment
volboundsis the new bounds
transformis the new transform
loggeris the logger
Precondition
The volume bounds need to be of type CylinderVolumeBounds.

Reimplemented from Acts::Volume.