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

Bounds for a cubical Volume, the orientedSurfaces(...) method creates a vector of 6 surfaces: More...

#include <Acts/Geometry/CuboidVolumeBounds.hpp>

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

Public Types

enum  BoundValues : unsigned int { eHalfLengthX = 0 , eHalfLengthY = 1 , eHalfLengthZ = 2 , eSize }
 for streaming and access More...
enum class  Face : unsigned int {
  NegativeZFace = BoundarySurfaceFace::negativeFaceXY , PositiveZFace = BoundarySurfaceFace::positiveFaceXY , NegativeXFace = BoundarySurfaceFace::negativeFaceYZ , PositiveXFace = BoundarySurfaceFace::positiveFaceYZ ,
  NegativeYFace = BoundarySurfaceFace::negativeFaceZX , PositiveYFace = BoundarySurfaceFace::positiveFaceZX
}
 Enum describing the possible faces of a cuboid volume. More...
Public Types inherited from Acts::VolumeBounds
enum class  BoundsType {
  eCone , eCuboid , eCutoutCylinder , eCylinder ,
  eGenericCuboid , eTrapezoid , eDiamond , eOther
}
 This is nested to the VolumeBounds, as also SurfaceBounds will have Bounds Type. More...

Public Member Functions

 CuboidVolumeBounds ()=delete
 CuboidVolumeBounds (const CuboidVolumeBounds &bobo)=default
 Copy Constructor.
 CuboidVolumeBounds (const std::array< double, eSize > &values)
 Constructor - from a fixed size array.
 CuboidVolumeBounds (double halex, double haley, double halez) noexcept(false)
 Constructor - the box boundaries.
 CuboidVolumeBounds (std::initializer_list< std::pair< BoundValues, double > > keyValues)
 Constructor with initializer list of key-value pairs.
 ~CuboidVolumeBounds () override=default
Volume::BoundingBox boundingBox (const Transform3 *trf=nullptr, const Vector3 &envelope={0, 0, 0}, const Volume *entity=nullptr) const final
 Construct bounding box for this shape.
std::vector< AxisDirectioncanonicalAxes () const override
 Get the canonical binning direction, i.e.
double get (BoundValues bValue) const
 Access to the bound values.
bool inside (const Vector3 &pos, double tol=0.) const override
 This method checks if position in the 3D volume frame is inside the cylinder.
CuboidVolumeBoundsoperator= (const CuboidVolumeBounds &bobo)=default
 Assignment operator.
std::vector< OrientedSurfaceorientedSurfaces (const Transform3 &transform=Transform3::Identity()) const override
 Oriented surfaces, i.e.
double referenceBorder (AxisDirection aDir) const final
 Binning borders in double.
void set (BoundValues bValue, double value)
 Set a bound value.
void set (std::initializer_list< std::pair< BoundValues, double > > keyValues)
 Set a range of bound values.
std::ostream & toStream (std::ostream &os) const override
 Output Method for std::ostream.
VolumeBounds::BoundsType type () const final
 Return the bounds type - for persistency optimization.
std::vector< double > values () const final
 Return the bound values as dynamically sized vector.
Public Member Functions inherited from Acts::VolumeBounds
 VolumeBounds ()=default
virtual ~VolumeBounds ()=default
virtual Vector3 referenceOffset (AxisDirection aDir) const
 Binning offset - overloaded for some R-binning types.

Static Public Member Functions

static BoundValues boundsFromAxisDirection (AxisDirection direction)
 Convert axis direction to a corresponding bound value in local coordinate convention.
static std::tuple< Face, Face, std::array< Face, 4 > > facesFromAxisDirection (AxisDirection direction)
 Convert axis direction to a set of corresponding cuboid faces in local coordinate convention.

Additional Inherited Members

Static Public Attributes inherited from Acts::VolumeBounds
static const std::vector< std::string > s_boundsTypeNames
 Static member to get the name of the BoundsType.

Detailed Description

Bounds for a cubical Volume, the orientedSurfaces(...) method creates a vector of 6 surfaces:

BoundarySurfaceFace [index]:

  • negativeFaceXY [0] : Rectangular Acts::PlaneSurface, parallel to \( xy \) plane at negative \( z \)
  • positiveFaceXY [1] : Rectangular Acts::PlaneSurface, parallel to \( xy \) plane at positive \( z \)
  • negativeFaceXY [2] : Rectangular Acts::PlaneSurface, attached to \( yz \) plane at negative \( x \)
  • positiveFaceXY [3] : Rectangular Acts::PlaneSurface, attached to \( yz \) plane at negative \( x \)
  • negativeFaceXY [4] : Rectangular Acts::PlaneSurface, parallel to \( zx \) plane at negative \( y \)
  • positiveFaceXY [5] : Rectangular Acts::PlaneSurface, parallel to \( zx \) plane at positive \( y \)

Member Enumeration Documentation

◆ BoundValues

for streaming and access

Enumerator
eHalfLengthX 
eHalfLengthY 
eHalfLengthZ 
eSize 

◆ Face

enum class Acts::CuboidVolumeBounds::Face : unsigned int
strong

Enum describing the possible faces of a cuboid volume.

Note
These values are synchronized with the BoundarySurfaceFace enum. Once Gen1 is removed, this can be changed.
Enumerator
NegativeZFace 
PositiveZFace 
NegativeXFace 
PositiveXFace 
NegativeYFace 
PositiveYFace 

Constructor & Destructor Documentation

◆ CuboidVolumeBounds() [1/5]

Acts::CuboidVolumeBounds::CuboidVolumeBounds ( )
delete

◆ CuboidVolumeBounds() [2/5]

Acts::CuboidVolumeBounds::CuboidVolumeBounds ( double halex,
double haley,
double halez )

Constructor - the box boundaries.

Parameters
halexis the half length of the cube in x
haleyis the half length of the cube in y
halezis the half length of the cube in z

◆ CuboidVolumeBounds() [3/5]

Acts::CuboidVolumeBounds::CuboidVolumeBounds ( const std::array< double, eSize > & values)
explicit

Constructor - from a fixed size array.

Parameters
valuesiw the bound values

◆ CuboidVolumeBounds() [4/5]

Acts::CuboidVolumeBounds::CuboidVolumeBounds ( std::initializer_list< std::pair< BoundValues, double > > keyValues)

Constructor with initializer list of key-value pairs.

Parameters
keyValuesList of bound value identifiers and their corresponding values

◆ CuboidVolumeBounds() [5/5]

Acts::CuboidVolumeBounds::CuboidVolumeBounds ( const CuboidVolumeBounds & bobo)
default

Copy Constructor.

Parameters
bobois the source volume bounds to be copied

◆ ~CuboidVolumeBounds()

Acts::CuboidVolumeBounds::~CuboidVolumeBounds ( )
overridedefault

Member Function Documentation

◆ boundingBox()

Volume::BoundingBox Acts::CuboidVolumeBounds::boundingBox ( const Transform3 * trf = nullptr,
const Vector3 & envelope = {0, 0, 0},
const Volume * entity = nullptr ) const
finalvirtual

Construct bounding box for this shape.

Parameters
trfOptional transform
envelopeOptional envelope to add / subtract from min/max
entityEntity to associate this bounding box with
Returns
Constructed bounding box

Implements Acts::VolumeBounds.

◆ boundsFromAxisDirection()

BoundValues Acts::CuboidVolumeBounds::boundsFromAxisDirection ( AxisDirection direction)
static

Convert axis direction to a corresponding bound value in local coordinate convention.

Parameters
directionthe axis direction to convert
Returns
The bound value corresponding to the axis direction

◆ canonicalAxes()

std::vector< AxisDirection > Acts::CuboidVolumeBounds::canonicalAxes ( ) const
overridevirtual

Get the canonical binning direction, i.e.

the binning directions for that fully describe the shape's extent

Returns
vector of canonical binning values

Reimplemented from Acts::VolumeBounds.

◆ facesFromAxisDirection()

std::tuple< Face, Face, std::array< Face, 4 > > Acts::CuboidVolumeBounds::facesFromAxisDirection ( AxisDirection direction)
static

Convert axis direction to a set of corresponding cuboid faces in local coordinate convention.

Parameters
directionthe axis direction to convert
Returns
A tuple of cuboid faces with the following ordering convention: (1) negative face orthogonal to the axis direction (2) positive face orthogonal to the axis direction (3) list of side faces parallel to the axis direction

◆ get()

double Acts::CuboidVolumeBounds::get ( BoundValues bValue) const

Access to the bound values.

Parameters
bValuethe class nested enum for the array access
Returns
The requested bound value

◆ inside()

bool Acts::CuboidVolumeBounds::inside ( const Vector3 & pos,
double tol = 0. ) const
overridevirtual

This method checks if position in the 3D volume frame is inside the cylinder.

Parameters
posis the position in volume frame to be checked
tolis the absolute tolerance to be applied
Returns
True if the position is inside the cuboid bounds

Implements Acts::VolumeBounds.

◆ operator=()

CuboidVolumeBounds & Acts::CuboidVolumeBounds::operator= ( const CuboidVolumeBounds & bobo)
default

Assignment operator.

Parameters
bobois the source volume bounds to be assigned
Returns
Reference to this object after assignment

◆ orientedSurfaces()

std::vector< OrientedSurface > Acts::CuboidVolumeBounds::orientedSurfaces ( const Transform3 & transform = Transform3::Identity()) const
overridevirtual

Oriented surfaces, i.e.

the decomposed boundary surfaces and the according navigation direction into the volume given the normal vector on the surface

Parameters
transformis the 3D transform to be applied to the boundary surfaces to position them in 3D space

It will throw an exception if the orientation prescription is not adequate

Returns
a vector of surfaces bounding this volume

Implements Acts::VolumeBounds.

◆ referenceBorder()

double Acts::CuboidVolumeBounds::referenceBorder ( AxisDirection aDir) const
finalvirtual

Binning borders in double.

Parameters
aDiris the axis direction for which the reference border is requested
Returns
float offset to be used for the binning

Reimplemented from Acts::VolumeBounds.

◆ set() [1/2]

void Acts::CuboidVolumeBounds::set ( BoundValues bValue,
double value )

Set a bound value.

Parameters
bValuethe bound value identifier
valuethe value to be set

◆ set() [2/2]

void Acts::CuboidVolumeBounds::set ( std::initializer_list< std::pair< BoundValues, double > > keyValues)

Set a range of bound values.

Parameters
keyValuesthe initializer list of key value pairs

◆ toStream()

std::ostream & Acts::CuboidVolumeBounds::toStream ( std::ostream & os) const
overridevirtual

Output Method for std::ostream.

Parameters
osis ostream operator to be dumped into
Returns
Reference to the output stream after writing

Implements Acts::VolumeBounds.

◆ type()

VolumeBounds::BoundsType Acts::CuboidVolumeBounds::type ( ) const
finalvirtual

Return the bounds type - for persistency optimization.

Returns
is a BoundsType enum

Implements Acts::VolumeBounds.

◆ values()

std::vector< double > Acts::CuboidVolumeBounds::values ( ) const
finalvirtual

Return the bound values as dynamically sized vector.

Returns
this returns a copy of the internal values

Implements Acts::VolumeBounds.