File CuboidVolumeBounds.hpp

namespace Acts

Set the Geometry Context PLUGIN.

Set the Calibration Context PLUGIN.

Convenience functions to ease creation of and Acts::InterpolatedMaterialMap and to avoid code duplication.

Set the Mangetic Field Context PLUGIN.

Convenience functions to ease creation of and Acts::InterpolatedBFieldMap and to avoid code duplication.

Currently implemented for the two most common formats: rz and xyz.

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

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.

template<class stream_t>
stream_t &dumpT(stream_t &dt) const

Templated dumpT method.

Template Parameters

stream_t – The type fo the dump stream

Parameters

dt – The dump stream object

Private Members

std::array<double, eSize> m_values

The bound values ordered in a fixed size array.

std::shared_ptr<const RectangleBounds> m_xyBounds = {nullptr}
std::shared_ptr<const RectangleBounds> m_yzBounds = {nullptr}
std::shared_ptr<const RectangleBounds> m_zxBounds = {nullptr}