File CuboidVolumeBounds.hpp¶
-
namespace Acts
Note
This file is foreseen for the
Geometry
module to replaceExtent
-
class CuboidVolumeBounds : public Acts::VolumeBounds
- #include <Acts/Geometry/CuboidVolumeBounds.hpp>
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 \)
Public Types
-
enum BoundValues
for streaming and access
Values:
-
enumerator eHalfLengthX
-
enumerator eHalfLengthY
-
enumerator eHalfLengthZ
-
enumerator eSize
-
enumerator eHalfLengthX
Public Functions
-
CuboidVolumeBounds() = delete
-
CuboidVolumeBounds(double halex, double haley, double halez) noexcept(false)
Constructor - the box boundaries.
- Parameters
halex – is the half length of the cube in x
haley – is the half length of the cube in y
halez – is the half length of the cube in z
-
inline CuboidVolumeBounds(const std::array<double, eSize> &values) noexcept(false)
Constructor - from a fixed size array.
- Parameters
values – iw the bound values
-
CuboidVolumeBounds(const CuboidVolumeBounds &bobo)
Copy Constructor.
- Parameters
bobo – is the source volume bounds to be copied
-
~CuboidVolumeBounds() override = default
-
virtual 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.
- Parameters
trf – Optional transform
envelope – Optional envelope to add / subtract from min/max
entity – Entity to associate this bounding box with
- Returns
Constructed bounding box
-
inline double get(BoundValues bValue) const
Access to the bound values.
- Parameters
bValue – the class nested enum for the array access
-
inline virtual bool inside(const Vector3 &pos, double tol = 0.) const override
This method checks if position in the 3D volume frame is inside the cylinder.
- Parameters
pos – is the position in volume frame to be checked
tol – is the absolute tolerance to be applied
-
CuboidVolumeBounds &operator=(const CuboidVolumeBounds &bobo)
Assignment operator.
- Parameters
bobo – is the source volume bounds to be assigned
-
virtual OrientedSurfaces orientedSurfaces(const Transform3 &transform = Transform3::Identity()) const override
Oriented surfaces, i.e.
the decomposed boundary surfaces and the according navigation direction into the volume given the normal vector on the surface
It will throw an exception if the orientation prescription is not adequate
- Parameters
transform – is the 3D transform to be applied to the boundary surfaces to position them in 3D space
- Returns
a vector of surfaces bounding this volume
-
virtual std::ostream &toStream(std::ostream &sl) const override
Output Method for std::ostream.
- Parameters
sl – is ostream operator to be dumped into
-
inline virtual VolumeBounds::BoundsType type() const final
Return the bounds type - for persistency optimization.
- Returns
is a BoundsType enum
-
inline virtual std::vector<double> values() const final
Return the bound values as dynamically sized vector.
- Returns
this returns a copy of the internal values
Private Functions
-
void buildSurfaceBounds()¶
Create the surface bounds.
-
inline void checkConsistency() noexcept(false)¶
Check the input values for consistency, will throw a logic_exception if consistency is not given.
Private Members
-
std::shared_ptr<const RectangleBounds> m_xyBounds = {nullptr}¶
-
std::shared_ptr<const RectangleBounds> m_yzBounds = {nullptr}¶
-
std::shared_ptr<const RectangleBounds> m_zxBounds = {nullptr}¶
-
class CuboidVolumeBounds : public Acts::VolumeBounds