File CutoutCylinderVolumeBounds.hpp

namespace Acts

Note

This file is foreseen for the Geometry module to replace Extent

class CutoutCylinderVolumeBounds : public Acts::VolumeBounds
#include <Acts/Geometry/CutoutCylinderVolumeBounds.hpp>

Class which implements a cutout cylinder.

This shape is bascially a cylinder, with another, smaller cylinder subtracted from the center. ——————&#8212; rmax | | | |——&#8212;| | rmed | | | | —&#8212; —&#8212; rmin &#8212; hlZc &#8212; ——&#8212; hlZ —-&#8212;

Public Types

enum BoundValues

for streaming and access

Values:

enumerator eMinR
enumerator eMedR
enumerator eMaxR
enumerator eHalfLengthZ
enumerator eHalfLengthZcutout
enumerator eSize

Public Functions

CutoutCylinderVolumeBounds() = delete
inline CutoutCylinderVolumeBounds(double rmin, double rmed, double rmax, double hlZ, double hlZc) noexcept(false)

Constructor from defining parameters.

Parameters
  • rmin – Minimum radius at the “choke points”

  • rmed – The medium radius (outer radius of the cutout)

  • rmax – The outer radius of the overall shape

  • hlZ – The longer halflength of the shape

  • hlZc – The cutout halflength of the shape

inline CutoutCylinderVolumeBounds(const std::array<double, eSize> &values) noexcept(false)

Constructor - from a fixed size array.

Parameters

values – The bound values

~CutoutCylinderVolumeBounds() 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

virtual bool inside(const Vector3 &gpos, double tol = 0) const override

Inside method to test whether a point is inside the shape.

Parameters
  • gpos – The point to test

  • tol – The tolerance to test with

Returns

Whether the point is inside or not.

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

Write information about this instance to an outstream.

Parameters

sl – The outstream

Returns

The outstream

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 bound objects.

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 CylinderBounds> m_cutoutCylinderBounds = {nullptr}
std::shared_ptr<const CylinderBounds> m_innerCylinderBounds = {nullptr}
std::shared_ptr<const DiscBounds> m_innerDiscBounds = {nullptr}
std::shared_ptr<const CylinderBounds> m_outerCylinderBounds = {nullptr}
std::shared_ptr<const DiscBounds> m_outerDiscBounds = {nullptr}
std::array<double, eSize> m_values