File CylinderBounds.hpp

namespace Acts


This file is foreseen for the Geometry module to replace Extent

class CylinderBounds : public Acts::SurfaceBounds
#include <Acts/Surfaces/CylinderBounds.hpp>

Bounds for a cylindrical Surface.

These bounds may be used for a CylinderSurface In case of bounds for a StraightLineSurface the radius determines the radius within a localPosition is regarded as inside bounds.

CylinderBounds also enhance the possibility of a cylinder segment with an opening angle \( 2\cdot\phi_{half}\) around an average \( \phi \) angle \( \phi_{ave} \).

CylinderBounds also supports beveled sides defined by an angle. Different angles can be defined on both sides of the cylinder. A postive angle is defined as “extruding” from the defined Zlength, while a negative angle is “intruding” on the Zlength.

  • - - +

    \ | / \ | / \ | / \ | / |/______________|/ 2 * ZhalfLength

Public Types

enum BoundValues


enumerator eR
enumerator eHalfLengthZ
enumerator eHalfPhiSector
enumerator eAveragePhi
enumerator eBevelMinZ
enumerator eBevelMaxZ
enumerator eSize

Public Functions

CylinderBounds() = delete
inline CylinderBounds(double r, double halfZ, double halfPhi = M_PI, double avgPhi = 0., double bevelMinZ = 0., double bevelMaxZ = 0.) noexcept(false)

Constructor - full cylinder.

  • r – The radius of the cylinder

  • halfZ – The half length in z

  • halfPhi – The half opening angle

  • avgPhi – (optional) The phi value from which the opening angle spans

  • bevelMinZ – (optional) The bevel on the negative z side

  • bevelMaxZ – (optional) The bevel on the positive z sid The bevel on the positive z side

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

Constructor - from fixed size array.


values – The parameter values

~CylinderBounds() override = default
inline bool coversFullAzimuth() const

Returns true for full phi coverage.

std::vector<Vector3> createCircles(const Transform3 trans, size_t lseg) const

Create the bows/circles on either side of the cylinder.

  • trans – is the global transform

  • lseg – are the numbero if phi segments

inline double get(BoundValues bValue) const

Access to the bound values.


bValue – the class nested enum for the array access

virtual bool inside(const Vector2 &lposition, const BoundaryCheck &bcheck) const final

Inside check for the bounds object driven by the boundary check directive Each Bounds has a method inside, which checks if a LocalPosition is inside the bounds Inside can be called without/with tolerances.

  • lposition – Local position (assumed to be in right surface frame)

  • bcheck – boundary check directive


boolean indicator for the success of this operation

bool inside3D(const Vector3 &position, const BoundaryCheck &bcheck = true) const

Specialized method for CylinderBounds that checks if a global position is within the cylinder cover.

  • position – is the position in the cylinder frame

  • bcheck – is the boundary check directive


boolean indicator for operation success

virtual std::ostream &toStream(std::ostream &sl) const final

Output Method for std::ostream.

virtual BoundsType type() const final

Return the bounds type - for persistency optimization.


is a BoundsType enum

inline virtual std::vector<double> values() const final

Return the bound values as dynamically sized vector.


this returns a copy of the internal values

Private Functions

inline void checkConsistency() noexcept(false)

Check the input values for consistency, will throw a logic_exception if consistency is not given.

ActsMatrix<2, 2> jacobian() const

Return the jacobian into the polar coordinate.

Vector2 shifted(const Vector2 &lposition) const

Helper method to shift into the phi-frame.


lposition – the polar coordinates in the global frame

Private Members

bool m_closed = {false}

Indicator if the bounds are closed.

std::array<double, eSize> m_values

The bound radius, half Z, half phi and average phi.