ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
Acts::SurfaceBounds Class Referenceabstract

Interface for surface bounds. More...

#include <Acts/Surfaces/SurfaceBounds.hpp>

Inheritance diagram for Acts::SurfaceBounds:
[legend]

Public Types

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

virtual ~SurfaceBounds ()=default
virtual SquareMatrix2 boundToCartesianJacobian (const Vector2 &lposition) const =0
 Computes the bound to cartesian jacobian at a given local position.
virtual SquareMatrix2 boundToCartesianMetric (const Vector2 &lposition) const =0
 Computes the bound to cartesian metric at a given local position.
virtual Vector2 center () const =0
 Calculate the center of the surface bounds in local coordinates.
virtual Vector2 closestPoint (const Vector2 &lposition, const SquareMatrix2 &metric) const =0
 Calculates the closest point on the bounds to a given local position.
virtual double distance (const Vector2 &lposition) const
 Calculates the distance to the bounds from a given local position.
virtual bool inside (const Vector2 &lposition) const =0
 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.
virtual bool isCartesian () const =0
 Check if the bound coordinates are cartesian.
virtual std::ostream & toStream (std::ostream &os) const =0
 Output Method for std::ostream, to be overloaded by child classes.
virtual BoundsType type () const =0
 Return the bounds type - for persistency optimization.
virtual std::vector< double > values () const =0
 Access method for bound values, this is a dynamically sized vector containing the parameters needed to describe these bounds.

Detailed Description

Interface for surface bounds.

Surface bounds provide:

  • inside() checks
  • distance to boundary calculations
  • the BoundsType and a set of parameters to simplify persistency

Member Enumeration Documentation

◆ BoundsType

This is nested to the SurfaceBounds, as also VolumeBounds will have Bounds Type.

Enumerator
eCone 
eCylinder 
eDiamond 
eDisc 
eEllipse 
eLine 
eRectangle 
eTrapezoid 
eTriangle 
eDiscTrapezoid 
eConvexPolygon 
eAnnulus 
eBoundless 
eOther 

Constructor & Destructor Documentation

◆ ~SurfaceBounds()

virtual Acts::SurfaceBounds::~SurfaceBounds ( )
virtualdefault

Member Function Documentation

◆ boundToCartesianJacobian()

virtual SquareMatrix2 Acts::SurfaceBounds::boundToCartesianJacobian ( const Vector2 & lposition) const
pure virtual

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

Implemented in Acts::AnnulusBounds, Acts::ConeBounds, Acts::CylinderBounds, Acts::DiscTrapezoidBounds, Acts::InfiniteBounds, Acts::LineBounds, Acts::PlanarBounds, and Acts::RadialBounds.

◆ boundToCartesianMetric()

virtual SquareMatrix2 Acts::SurfaceBounds::boundToCartesianMetric ( const Vector2 & lposition) const
pure virtual

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

Implemented in Acts::AnnulusBounds, Acts::ConeBounds, Acts::CylinderBounds, Acts::DiscTrapezoidBounds, Acts::InfiniteBounds, Acts::LineBounds, Acts::PlanarBounds, and Acts::RadialBounds.

◆ center()

virtual Vector2 Acts::SurfaceBounds::center ( ) const
pure virtual

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

Implemented in Acts::AnnulusBounds, Acts::ConeBounds, Acts::ConvexPolygonBoundsBase, Acts::CylinderBounds, Acts::DiamondBounds, Acts::DiscTrapezoidBounds, Acts::EllipseBounds, Acts::InfiniteBounds, Acts::LineBounds, Acts::RadialBounds, Acts::RectangleBounds, and Acts::TrapezoidBounds.

◆ closestPoint()

virtual Vector2 Acts::SurfaceBounds::closestPoint ( const Vector2 & lposition,
const SquareMatrix2 & metric ) const
pure virtual

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

Implemented in Acts::AnnulusBounds, Acts::ConeBounds, Acts::ConvexPolygonBounds< N >, Acts::ConvexPolygonBounds< PolygonDynamic >, Acts::CylinderBounds, Acts::DiamondBounds, Acts::DiscTrapezoidBounds, Acts::EllipseBounds, Acts::InfiniteBounds, Acts::LineBounds, Acts::RadialBounds, Acts::RectangleBounds, and Acts::TrapezoidBounds.

◆ distance()

virtual double Acts::SurfaceBounds::distance ( const Vector2 & lposition) const
virtual

Calculates the distance to the bounds from a given local position.

Parameters
lpositionis the local position
Returns
the distance to the bounds

◆ inside() [1/2]

virtual bool Acts::SurfaceBounds::inside ( const Vector2 & lposition) const
pure virtual

◆ 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 in Acts::AnnulusBounds, Acts::ConeBounds, Acts::ConvexPolygonBounds< N >, Acts::ConvexPolygonBounds< PolygonDynamic >, Acts::CylinderBounds, Acts::DiamondBounds, Acts::DiscTrapezoidBounds, Acts::EllipseBounds, Acts::InfiniteBounds, Acts::LineBounds, Acts::RadialBounds, Acts::RectangleBounds, and Acts::TrapezoidBounds.

◆ isCartesian()

virtual bool Acts::SurfaceBounds::isCartesian ( ) const
pure virtual

Check if the bound coordinates are cartesian.

Returns
true if the bound coordinates are cartesian

Implemented in Acts::AnnulusBounds, Acts::ConeBounds, Acts::CylinderBounds, Acts::DiscTrapezoidBounds, Acts::InfiniteBounds, Acts::LineBounds, Acts::PlanarBounds, and Acts::RadialBounds.

◆ toStream()

virtual std::ostream & Acts::SurfaceBounds::toStream ( std::ostream & os) const
pure virtual

Output Method for std::ostream, to be overloaded by child classes.

Parameters
osis the outstream in which the string dump is done
Returns
Modified ostream for chaining

Implemented in Acts::AnnulusBounds, Acts::ConeBounds, Acts::ConvexPolygonBoundsBase, Acts::CylinderBounds, Acts::DiamondBounds, Acts::DiscTrapezoidBounds, Acts::EllipseBounds, Acts::InfiniteBounds, Acts::LineBounds, Acts::RadialBounds, Acts::RectangleBounds, and Acts::TrapezoidBounds.

◆ type()

virtual BoundsType Acts::SurfaceBounds::type ( ) const
pure virtual

◆ values()

virtual std::vector< double > Acts::SurfaceBounds::values ( ) const
pure virtual

Access method for bound values, this is a dynamically sized vector containing the parameters needed to describe these bounds.

Returns
of the stored values for this SurfaceBounds object

Implemented in Acts::AnnulusBounds, Acts::ConeBounds, Acts::ConvexPolygonBoundsBase, Acts::CylinderBounds, Acts::DiamondBounds, Acts::DiscTrapezoidBounds, Acts::EllipseBounds, Acts::InfiniteBounds, Acts::LineBounds, Acts::RadialBounds, Acts::RectangleBounds, and Acts::TrapezoidBounds.