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

It inherits from GeometryObject for geometry identification. More...

#include <Acts/Geometry/Volume.hpp>

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

Public Types

using BoundingBox = AxisAlignedBoundingBox<Volume, double, 3>
 Type alias for the axis-aligned bounding box of the volume.

Public Member Functions

 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 Vector3 &envelope={0, 0, 0}) const
 Construct bounding box for this shape.
Vector3 center (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 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 Transform3localToGlobalTransform (const GeometryContext &gctx) const
 Get the transformation matrix from the local volume frame to the global experiment's frame.
Volumeoperator= (const Volume &vol) noexcept=default
 Assignment operator.
Volumeoperator= (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.
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.
VolumePlacementBasevolumePlacement ()
 VolumePlacement object that dynamically aligns the volume.
const VolumePlacementBasevolumePlacement () 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.

Additional Inherited Members

Protected Attributes inherited from Acts::GeometryObject
GeometryIdentifier m_geometryId
 Unique geometry identifier for this object.

Detailed Description

It inherits from GeometryObject for geometry identification.

Base class for all volumes inside the tracking realm, it defines the interface for inherited Volume classes regarding the geometrical information.

Member Typedef Documentation

◆ BoundingBox

Type alias for the axis-aligned bounding box of the volume.

Used to define the spatial extent of the volume in 3D space

Constructor & Destructor Documentation

◆ Volume() [1/3]

Acts::Volume::Volume ( const Transform3 & transform,
std::shared_ptr< VolumeBounds > volbounds )
noexcept

Explicit constructor with shared arguments.

Parameters
transformis the transform to position the volume in 3D space
volboundsis the volume boundary definitions

◆ Volume() [2/3]

Acts::Volume::Volume ( VolumePlacementBase & positioner,
std::shared_ptr< VolumeBounds > volbounds )
noexcept

Constructor that connects the volume to an external alignment I.e.

the volume may move with the alignment of the surfaces The placement of the volume is delegated to the positioner

Parameters
positionerReference to the object aligning the volume
volboundsis the volume boundary definitions

◆ Volume() [3/3]

Acts::Volume::Volume ( const Volume & vol)
defaultnoexcept

Copy Constructor.

Parameters
volis the source volume for the copy

Member Function Documentation

◆ assignVolumeBounds()

void Acts::Volume::assignVolumeBounds ( std::shared_ptr< VolumeBounds > volbounds)

Set volume bounds and update volume bounding boxes implicitly.

Parameters
volboundsThe volume bounds to be assigned

◆ boundingBox()

BoundingBox Acts::Volume::boundingBox ( const Vector3 & envelope = {0, 0, 0}) const

Construct bounding box for this shape.

Parameters
envelopeOptional envelope to add / subtract from min/max
Returns
Constructed bounding box pointing to this volume

◆ center()

Vector3 Acts::Volume::center ( const GeometryContext & gctx) const

Get the center position of the volume.

Parameters
gctxThe current geometry context object, e.g. alignment
Returns
Const reference to the center position vector

◆ globalToLocalTransform()

const Transform3 & Acts::Volume::globalToLocalTransform ( const GeometryContext & gctx) const

Get the transformation matrix from the global experiment's frame to the local volume frame.

Parameters
gctxThe current geometry context object, e.g. alignment
Returns
The global to local transformation matrix

◆ inside()

bool Acts::Volume::inside ( const GeometryContext & gctx,
const Vector3 & gpos,
double tol = 0. ) const

Inside() method for checks.

Parameters
gctxThe current geometry context object, e.g. alignment
gposis the position to be checked
tolis the tolerance parameter
Returns
boolean indicator if the position is inside

◆ isAlignable()

bool Acts::Volume::isAlignable ( ) const

Is the volume connected to the experiment's alignment system (I.e.

it's constructed with a volumePlacement)

Returns
Whether the volume can be externally aligned

◆ localToGlobalTransform()

const Transform3 & Acts::Volume::localToGlobalTransform ( const GeometryContext & gctx) const

Get the transformation matrix from the local volume frame to the global experiment's frame.

Parameters
gctxThe current geometry context object, e.g. alignment
Returns
The local to global transformation matrix

◆ operator=() [1/2]

Volume & Acts::Volume::operator= ( const Volume & vol)
defaultnoexcept

Assignment operator.

Parameters
volis the source volume to be copied
Returns
Reference to this volume for assignment chaining

◆ operator=() [2/2]

Volume & Acts::Volume::operator= ( Volume && other)
defaultnoexcept

Move assignment operator.

Parameters
otheris the other volume to be moved
Returns
Reference to this volume for assignment chaining

◆ operator==()

bool Acts::Volume::operator== ( const Volume & other) const

Compare this volume with another for equality.

Parameters
otherThe other volume to compare with
Returns
True if the volumes are equal

◆ orientedBoundingBox()

BoundingBox Acts::Volume::orientedBoundingBox ( ) const

Construct oriented bounding box for this shape.

Note
This will build an oriented bounding box with an envelope value of (0.05, 0.05, 0.05)mm
Returns
Constructed oriented bounding box pointing to this volume

◆ referencePosition()

Vector3 Acts::Volume::referencePosition ( const GeometryContext & gctx,
AxisDirection aDir ) const
overridevirtual

The binning position method.

  • as default the center is given, but may be overloaded
Parameters
gctxThe current geometry context object, e.g. alignment
aDiris the axis direction for the reference position
Returns
vector 3D that can be used for the binning

Implements Acts::GeometryObject.

◆ setTransform()

void Acts::Volume::setTransform ( const Transform3 & transform)

Set the transform matrix for the volume and update internal state.

Parameters
transformThe new transform matrix to be applied

◆ shifted()

Volume Acts::Volume::shifted ( const GeometryContext & gctx,
const Transform3 & shift ) const

Shift the volume by a transform.

Parameters
shiftis the transform to shift the volume by
gctxThe current geometry context object, e.g. alignment
Returns
The shifted volume

◆ update()

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

Set the volume bounds and optionally also update the volume transform.

Parameters
gctxThe current geometry context object, e.g. alignment
volboundsThe volume bounds to be assigned
transformThe transform to be assigned, can be optional
loggerA logger object to log messages

Reimplemented in Acts::CuboidVolumeStack, and Acts::CylinderVolumeStack.

◆ visualize()

void Acts::Volume::visualize ( IVisualization3D & helper,
const GeometryContext & gctx,
const ViewConfig & viewConfig ) const

Produces a 3D visualization of this volume.

Parameters
helperThe visualization helper describing the output format
gctxThe geometry context
viewConfigThe view configuration

◆ volumeBounds() [1/2]

VolumeBounds & Acts::Volume::volumeBounds ( )

Get mutable access to the volume bounds.

Returns
Reference to the volume bounds object

◆ volumeBounds() [2/2]

const VolumeBounds & Acts::Volume::volumeBounds ( ) const

Get the volume bounds that define the shape of the volume.

Returns
Const reference to the volume bounds object

◆ volumeBoundsPtr() [1/2]

std::shared_ptr< VolumeBounds > Acts::Volume::volumeBoundsPtr ( )

Get shared pointer to the mutable volume bounds.

Returns
Shared pointer to the volume bounds object

◆ volumeBoundsPtr() [2/2]

std::shared_ptr< const VolumeBounds > Acts::Volume::volumeBoundsPtr ( ) const

Get shared pointer to the const volume bounds.

Returns
Const shared pointer to the volume bounds object

◆ volumePlacement() [1/2]

VolumePlacementBase * Acts::Volume::volumePlacement ( )

VolumePlacement object that dynamically aligns the volume.

Returns
Pointer to the VolumePlacement (Might be nullptr)

◆ volumePlacement() [2/2]

const VolumePlacementBase * Acts::Volume::volumePlacement ( ) const

VolumePlacement object that dynamically aligns the volume.

Returns
Pointer to the VolumePlacement (Might be nullptr)