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

Class to describe the bounds for a planar DiscSurface. More...

#include <Acts/Surfaces/RadialBounds.hpp>

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

Public Types

enum  BoundValues {
  eMinR = 0 , eMaxR = 1 , eHalfPhiSector = 2 , eAveragePhi = 3 ,
  eSize = 4
}
 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

 RadialBounds (const std::array< double, eSize > &values) noexcept(false)
 Constructor from array values.
 RadialBounds (double minR, double maxR, double halfPhi=std::numbers::pi, double avgPhi=0.) noexcept(false)
 Constructor for full disc of symmetric disc around phi=0.
double binningValuePhi () const final
 Return a reference phi value for binning.
double binningValueR () const final
 Return a reference radius for binning.
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.
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 final
 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 insideRadialBounds (double R, double tolerance=0.) const final
 Checks if this is inside the radial coverage given the a tolerance.
bool isCartesian () const final
 Check if the bound coordinates are cartesian.
double rMax () const final
 Return method for outer Radius.
double rMin () const final
 Return method for inner Radius.
std::ostream & toStream (std::ostream &sl) const final
 Outstream operator.
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

Class to describe the bounds for a planar DiscSurface.

By providing an argument for hphisec, the bounds can be restricted to a phi-range around the center position.

Member Enumeration Documentation

◆ BoundValues

Enumeration for the bound values.

Enumerator
eMinR 
eMaxR 
eHalfPhiSector 
eAveragePhi 
eSize 

Constructor & Destructor Documentation

◆ RadialBounds() [1/2]

Acts::RadialBounds::RadialBounds ( double minR,
double maxR,
double halfPhi = std::numbers::pi,
double avgPhi = 0. )
explicit

Constructor for full disc of symmetric disc around phi=0.

Parameters
minRThe inner radius (0 for full disc)
maxRThe outer radius
halfPhiThe half opening angle (Pi for full angular coverage)
avgPhiThe average phi for the disc/ring sector

◆ RadialBounds() [2/2]

Acts::RadialBounds::RadialBounds ( const std::array< double, eSize > & values)
explicit

Constructor from array values.

Parameters
valuesThe bound values

Member Function Documentation

◆ binningValuePhi()

double Acts::RadialBounds::binningValuePhi ( ) const
finalvirtual

Return a reference phi value for binning.

Returns
Average phi value used as binning reference

Implements Acts::DiscBounds.

◆ binningValueR()

double Acts::RadialBounds::binningValueR ( ) const
finalvirtual

Return a reference radius for binning.

Returns
Average radius value used as binning reference

Implements Acts::DiscBounds.

◆ boundToCartesianJacobian()

SquareMatrix2 Acts::RadialBounds::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::RadialBounds::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::RadialBounds::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 RadialBounds: returns ((rMin + rMax)/2, averagePhi) in polar coordinates

Implements Acts::SurfaceBounds.

◆ closestPoint()

Vector2 Acts::RadialBounds::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::RadialBounds::coversFullAzimuth ( ) const
finalvirtual

Returns true for full phi coverage.

Returns
True if bounds cover full azimuthal range (2π), false otherwise

Implements Acts::DiscBounds.

◆ get()

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

Access to the bound values.

Parameters
bValuethe class nested enum for the array access
Returns
The boundary value corresponding to the requested parameter

◆ inside() [1/2]

bool Acts::RadialBounds::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.

◆ insideRadialBounds()

bool Acts::RadialBounds::insideRadialBounds ( double R,
double tolerance = 0. ) const
finalvirtual

Checks if this is inside the radial coverage given the a tolerance.

Parameters
RRadius value to check
toleranceTolerance for the boundary check
Returns
True if radius is within radial bounds considering tolerance

Implements Acts::DiscBounds.

◆ isCartesian()

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

Check if the bound coordinates are cartesian.

Returns
true if the bound coordinates are cartesian

Implements Acts::SurfaceBounds.

◆ rMax()

double Acts::RadialBounds::rMax ( ) const
finalvirtual

Return method for outer Radius.

Returns
Maximum radius value of the bounds

Implements Acts::DiscBounds.

◆ rMin()

double Acts::RadialBounds::rMin ( ) const
finalvirtual

Return method for inner Radius.

Returns
Minimum radius value of the bounds

Implements Acts::DiscBounds.

◆ toStream()

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

Outstream operator.

Parameters
slis the ostream to be dumped into
Returns
Reference to the output stream for chaining

Implements Acts::SurfaceBounds.

◆ type()

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

Return the bounds type - for persistency optimization.

Returns
the bounds type

Implements Acts::SurfaceBounds.

◆ values()

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

Return the bound values as dynamically sized vector.

Returns
this returns a copy of the internal values

Implements Acts::SurfaceBounds.