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

Class that implements a (potentially asymmetric) bounds with difference between surface bound center and surface coordinate center. More...

#include <Acts/Surfaces/AnnulusBounds.hpp>

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

Public Types

enum  BoundValues : int {
  eMinR = 0 , eMaxR = 1 , eMinPhiRel = 2 , eMaxPhiRel = 3 ,
  eAveragePhi = 4 , eOriginX = 5 , eOriginY = 6 , eSize = 7
}
 Enumeration for the different 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

 AnnulusBounds (const std::array< double, eSize > &values) noexcept(false)
 Constructor - from fixed size array.
 AnnulusBounds (double minR, double maxR, double minPhiRel, double maxPhiRel, const Vector2 &moduleOrigin={0, 0}, double avgPhi=0) noexcept(false)
 Default constructor from parameters.
double binningValuePhi () const final
 Return a reference phi 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.
std::vector< Vector2corners () const
 This method returns the four corners of the bounds in polar coordinates Starting from the upper right (max R, pos locX) and proceeding clock-wise i.e.
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.
Vector2 moduleOrigin () const
 Returns moduleOrigin, but rotated out, so averagePhi is already considered.
double phiMax () const
 Returns the left angular edge of the module.
double phiMin () const
 Returns the right angular edge of the module.
double rMax () const final
 This method returns outer radius.
double rMin () const final
 This method returns 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.
std::vector< Vector2vertices (unsigned int quarterSegments=2u) const override
 This method returns the xy coordinates of the four corners of the bounds in module coordinates (in x/y), and if quarterSegments is bigger or equal to 0, the curved part of the segment is included and approximated by the corresponding number of segments.
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 that implements a (potentially asymmetric) bounds with difference between surface bound center and surface coordinate center.

These bounds combine two different systems:

  • module system : radial bounds centred on the moduleOrigin
  • strip system : phi bounds centred on the stripOrigin

The measurement will be done in the strip system, with r/phi local coordinates.

Member Enumeration Documentation

◆ BoundValues

Enumeration for the different bound values.

Enumerator
eMinR 
eMaxR 
eMinPhiRel 
eMaxPhiRel 
eAveragePhi 
eOriginX 
eOriginY 
eSize 

Constructor & Destructor Documentation

◆ AnnulusBounds() [1/2]

Acts::AnnulusBounds::AnnulusBounds ( double minR,
double maxR,
double minPhiRel,
double maxPhiRel,
const Vector2 & moduleOrigin = {0, 0},
double avgPhi = 0 )
explicit

Default constructor from parameters.

Parameters
minRThe inner radius of the annulus
maxRThe outer radius of the annulus
minPhiRelThe minimum phi relative to average phi
maxPhiRelThe maximum phi relative to average phi
moduleOriginThe origin of the module in the strip frame
avgPhiThe average phi value
Note
For morigin you need to actually calculate the cartesian offset

◆ AnnulusBounds() [2/2]

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

Constructor - from fixed size array.

Parameters
valuesThe bound values stored in a fixed size array

Member Function Documentation

◆ binningValuePhi()

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

Return a reference phi for binning.

Returns
Average phi angle for binning purposes

Implements Acts::DiscBounds.

◆ binningValueR()

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

Return a reference radius for binning.

Returns
Average radius for binning purposes

Implements Acts::DiscBounds.

◆ boundToCartesianJacobian()

SquareMatrix2 Acts::AnnulusBounds::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::AnnulusBounds::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::AnnulusBounds::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 AnnulusBounds: returns pre-calculated center from corner vertices in strip polar coordinates (r, phi), accounting for average phi rotation

Implements Acts::SurfaceBounds.

◆ closestPoint()

Vector2 Acts::AnnulusBounds::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.

◆ corners()

std::vector< Vector2 > Acts::AnnulusBounds::corners ( ) const

This method returns the four corners of the bounds in polar coordinates Starting from the upper right (max R, pos locX) and proceeding clock-wise i.e.

(max R; pos locX), (min R; pos locX), (min R; neg loc X), (max R: neg locX)

Returns
Vector of corner points in polar coordinates

◆ coversFullAzimuth()

bool Acts::AnnulusBounds::coversFullAzimuth ( ) const
finalvirtual

Returns true for full phi coverage.

Returns
True if the annulus covers the full azimuthal range, false otherwise

Implements Acts::DiscBounds.

◆ get()

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

Access to the bound values.

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

◆ inside() [1/2]

bool Acts::AnnulusBounds::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::AnnulusBounds::insideRadialBounds ( double R,
double tolerance = 0. ) const
finalvirtual

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

Parameters
RThe radius value to check
toleranceThe tolerance for the check
Returns
True if the radius is within bounds (plus tolerance), false otherwise

Implements Acts::DiscBounds.

◆ isCartesian()

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

Check if the bound coordinates are cartesian.

Returns
true if the bound coordinates are cartesian

Implements Acts::SurfaceBounds.

◆ moduleOrigin()

Vector2 Acts::AnnulusBounds::moduleOrigin ( ) const

Returns moduleOrigin, but rotated out, so averagePhi is already considered.

The module origin needs to consider the rotation introduced by averagePhi

Returns
The origin of the local frame

◆ phiMax()

double Acts::AnnulusBounds::phiMax ( ) const

Returns the left angular edge of the module.

Returns
The left side angle

◆ phiMin()

double Acts::AnnulusBounds::phiMin ( ) const

Returns the right angular edge of the module.

Returns
The right side angle

◆ rMax()

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

This method returns outer radius.

Returns
Maximum radius of the annulus

Implements Acts::DiscBounds.

◆ rMin()

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

This method returns inner radius.

Returns
Minimum radius of the annulus

Implements Acts::DiscBounds.

◆ toStream()

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

Outstream operator.

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

Implements Acts::SurfaceBounds.

◆ type()

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

Return the bounds type - for persistency optimization.

Returns
the bounds type

Implements Acts::SurfaceBounds.

◆ values()

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

Return the bound values as dynamically sized vector.

Returns
this returns a copy of the internal values

Implements Acts::SurfaceBounds.

◆ vertices()

std::vector< Vector2 > Acts::AnnulusBounds::vertices ( unsigned int quarterSegments = 2u) const
overridevirtual

This method returns the xy coordinates of the four corners of the bounds in module coordinates (in x/y), and if quarterSegments is bigger or equal to 0, the curved part of the segment is included and approximated by the corresponding number of segments.

Starting from the upper right (max R, pos locX) and proceeding clock-wise i.e. (max R; pos locX), (min R; pos locX), (min R; neg loc X), (max R: neg locX)

Parameters
quarterSegmentsthe number of segments used to approximate a quarter of a circle
Returns
vector for vertices in 2D

Implements Acts::DiscBounds.