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

#include <Acts/Surfaces/CylinderBounds.hpp>

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

Public Types

enum  BoundValues : int {
  eR = 0 , eHalfLengthZ = 1 , eHalfPhiSector = 2 , eAveragePhi = 3 ,
  eBevelMinZ = 4 , eBevelMaxZ = 5 , eSize = 6
}
 Enumeration for the bound values. More...
Public Types inherited from Acts::SurfaceBounds
enum  BoundsType : int {
  eCone = 0 , eCylinder = 1 , eDiamond = 2 , eDisc = 3 ,
  eEllipse = 4 , eLine = 5 , eRectangle = 6 , eTrapezoid = 7 ,
  eTriangle = 8 , eDiscTrapezoid = 9 , eConvexPolygon = 10 , eAnnulus = 11 ,
  eBoundless = 12 , eOther = 13
}
 This is nested to the SurfaceBounds, as also VolumeBounds will have Bounds Type. More...

Public Member Functions

 CylinderBounds (const std::array< double, eSize > &values) noexcept(false)
 Constructor from array.
 CylinderBounds (double r, double halfZ, double halfPhi=std::numbers::pi, double avgPhi=0., double bevelMinZ=0., double bevelMaxZ=0.) noexcept(false)
 Constructor - full cylinder.
SquareMatrix2 boundToCartesianJacobian (const Vector2 &lposition) const final
 Computes the bound to cartesian jacobian at a given local position.
SquareMatrix2 boundToCartesianMetric (const Vector2 &lposition) const final
 Computes the bound to cartesian metric at a given local position.
Vector2 center () const final
 Calculate the center of the surface bounds in local coordinates.
std::vector< Vector3circleVertices (const Transform3 transform, unsigned int quarterSegments) const
 Create the bow/circle vertices on either side of the cylinder.
Vector2 closestPoint (const Vector2 &lposition, const SquareMatrix2 &metric) const final
 Calculates the closest point on the bounds to a given local position.
bool coversFullAzimuth () const
 Returns true for full phi coverage.
double get (BoundValues bValue) const
 Access to the bound values.
bool inside (const Vector2 &lposition) const final
 Inside check for the bounds object.
virtual bool inside (const Vector2 &lposition, const BoundaryTolerance &boundaryTolerance) const
 Inside check for the bounds object given a boundary tolerance.
bool isCartesian () const final
 Check if the bound coordinates are cartesian.
std::ostream & toStream (std::ostream &sl) const final
 Output Method for std::ostream.
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::SurfaceBounds
virtual ~SurfaceBounds ()=default
virtual double distance (const Vector2 &lposition) const
 Calculates the distance to the bounds from a given local position.

Detailed Description

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 positive angle is defined as "extruding" from the defined Zlength, while a negative angle is "intruding" on the Zlength.

  • - - +
    \ | / \ | / \ | / \ | / |/______________|/ 2 * ZhalfLength

Member Enumeration Documentation

◆ BoundValues

Enumeration for the bound values.

Enumerator
eR 
eHalfLengthZ 
eHalfPhiSector 
eAveragePhi 
eBevelMinZ 
eBevelMaxZ 
eSize 

Constructor & Destructor Documentation

◆ CylinderBounds() [1/2]

Acts::CylinderBounds::CylinderBounds ( double r,
double halfZ,
double halfPhi = std::numbers::pi,
double avgPhi = 0.,
double bevelMinZ = 0.,
double bevelMaxZ = 0. )

Constructor - full cylinder.

Parameters
rThe radius of the cylinder
halfZThe half length in z
halfPhiThe 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

◆ CylinderBounds() [2/2]

Acts::CylinderBounds::CylinderBounds ( const std::array< double, eSize > & values)
explicitnoexcept

Constructor from array.

Parameters
valuesThe bound values stored in an array

Member Function Documentation

◆ boundToCartesianJacobian()

SquareMatrix2 Acts::CylinderBounds::boundToCartesianJacobian ( const Vector2 & lposition) const
finalvirtual

Computes the bound to cartesian jacobian at a given local position.

Parameters
lpositionis the local position at which the jacobian is computed
Returns
the bound to cartesian jacobian

Implements Acts::SurfaceBounds.

◆ boundToCartesianMetric()

SquareMatrix2 Acts::CylinderBounds::boundToCartesianMetric ( const Vector2 & lposition) const
finalvirtual

Computes the bound to cartesian metric at a given local position.

Parameters
lpositionis the local position at which the metric is computed
Returns
the bound to cartesian metric

Implements Acts::SurfaceBounds.

◆ center()

Vector2 Acts::CylinderBounds::center ( ) const
finalvirtual

Calculate the center of the surface bounds in local coordinates.

This method returns a representative center point of the bounds region. The exact definition varies by bounds type and coordinate system:

Cartesian bounds (Rectangle, Diamond, Trapezoid):

  • Returns the geometric center or center of symmetry
  • For symmetric shapes: center of bounding box or origin (0,0)

Polar/Cylindrical bounds (Radial, Cylinder, Cone):

  • Returns (r, phi) where r is average radius, phi is average angle
  • Coordinates are in the bounds' natural coordinate system

Complex bounds (Annulus, ConvexPolygon):

  • Annulus: Pre-calculated from corner vertices (accounts for coordinate transforms)
  • Polygon: Average of all vertices (vertex centroid, not area centroid)

Infinite bounds: Returns conceptual center at (0,0)

Note
The returned point is guaranteed to be a reasonable representative center, but may not be the true geometric centroid for all shapes.
Returns
Vector2 representing the center position in local coordinates
Note
For CylinderBounds: returns (averagePhi, 0) in local (rphi, z) coordinates

Implements Acts::SurfaceBounds.

◆ circleVertices()

std::vector< Vector3 > Acts::CylinderBounds::circleVertices ( const Transform3 transform,
unsigned int quarterSegments ) const

Create the bow/circle vertices on either side of the cylinder.

Parameters
transformis the global transform
quarterSegmentsis the number of segments to approximate a quarter of a circle. In order to symmetrize fully closed and sectoral cylinders, also in the first case the two end points are given (albeit they overlap) in -pi / pi
Returns
a singlevector containing the vertices from one side and then from the other side consecutively

◆ closestPoint()

Vector2 Acts::CylinderBounds::closestPoint ( const Vector2 & lposition,
const SquareMatrix2 & metric ) const
finalvirtual

Calculates the closest point on the bounds to a given local position.

Parameters
lpositionis the local position
metricto be used for the distance calculation
Returns
the closest point on the bounds

Implements Acts::SurfaceBounds.

◆ coversFullAzimuth()

bool Acts::CylinderBounds::coversFullAzimuth ( ) const

Returns true for full phi coverage.

Returns
True if the cylinder covers full azimuthal range

◆ get()

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

Access to the bound values.

Parameters
bValuethe class nested enum for the array access
Returns
Value of the specified bound parameter

◆ inside() [1/2]

bool Acts::CylinderBounds::inside ( const Vector2 & lposition) const
finalvirtual

Inside check for the bounds object.

Parameters
lpositionis the local position
Returns
true if the local position is inside the bounds

Implements Acts::SurfaceBounds.

◆ inside() [2/2]

virtual bool Acts::SurfaceBounds::inside ( const Vector2 & lposition,
const BoundaryTolerance & boundaryTolerance ) const
virtual

Inside check for the bounds object given a boundary tolerance.

Parameters
lpositionis the local position
boundaryToleranceis the boundary tolerance object
Returns
true if the local position is inside the bounds and tolerance

Reimplemented from Acts::SurfaceBounds.

◆ isCartesian()

bool Acts::CylinderBounds::isCartesian ( ) const
finalvirtual

Check if the bound coordinates are cartesian.

Returns
true if the bound coordinates are cartesian

Implements Acts::SurfaceBounds.

◆ toStream()

std::ostream & Acts::CylinderBounds::toStream ( std::ostream & sl) const
finalvirtual

Output Method for std::ostream.

Parameters
slThe output stream to write to
Returns
Reference to the output stream after writing

Implements Acts::SurfaceBounds.

◆ type()

BoundsType Acts::CylinderBounds::type ( ) const
finalvirtual

Return the bounds type - for persistency optimization.

Returns
the bounds type

Implements Acts::SurfaceBounds.

◆ values()

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

Return the bound values as dynamically sized vector.

Returns
this returns a copy of the internal values

Implements Acts::SurfaceBounds.