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)
 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 Attributes

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

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/2]

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

Explicit constructor with shared arguments.

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

◆ Volume() [2/2]

Acts::Volume::Volume ( const Volume & vol,
const Transform3 & shift = Transform3::Identity() )

Copy Constructor - with optional shift.

Parameters
volis the source volume for the copy
shiftis the optional shift applied as : shift * vol.transform()

◆ ~Volume()

Acts::Volume::~Volume ( )
overridedefaultnoexcept

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() [1/2]

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

Get the center position of the volume.

Deprecated
: Function deprecated in favour of center(const GeometryContext& gctx)
Returns
Const reference to the center position vector

◆ center() [2/2]

const 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.

Parameters
gctxThe current geometry context object, e.g. alignment

◆ inside() [1/2]

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

◆ inside() [2/2]

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

Inside() method for checks.

Parameters
gposis the position to be checked
tolis the tolerance parameter
Deprecated
: Function deprecated in favour of inside(const GeometryContext& gctx, const Vector3& gpos, double tol = 0.)
Returns
boolean indicator if the position is inside

◆ itransform()

const Transform3 & Acts::Volume::itransform ( ) const

Get the inverse transform matrix of the volume.

Deprecated
: Function deprecated in favour of globalToLocalTransform
Returns
Const reference to the inverse transform matrix

◆ 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

◆ operator=()

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

Assignment operator.

Parameters
volis the source volume to be copied
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

◆ transform()

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

Get the transform matrix that positions the volume in 3D space.

Deprecated
: Function deprecated in favour of localToGlobalTransform
Returns
Const reference to the transform matrix

◆ 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

Member Data Documentation

◆ m_center

Vector3 Acts::Volume::m_center
protected

Center position of the volume in global coordinates.

◆ m_itransform

Transform3 Acts::Volume::m_itransform
protected

Inverse of the transform matrix for efficient calculations.

◆ m_transform

Transform3 Acts::Volume::m_transform
protected

Transform matrix that positions the volume in 3D space.