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

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

#include <Acts/Surfaces/DiscTrapezoidBounds.hpp>

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

Public Types

enum  BoundValues : int {
  eHalfLengthXminR = 0 , eHalfLengthXmaxR = 1 , eMinR = 2 , eMaxR = 3 ,
  eAveragePhi = 4 , eStereo = 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

 DiscTrapezoidBounds (const std::array< double, eSize > &values) noexcept(false)
 Constructor - from fixed size array.
 DiscTrapezoidBounds (double halfXminR, double halfXmaxR, double minR, double maxR, double avgPhi=std::numbers::pi/2., double stereo=0.) noexcept(false)
 Constructor for a symmetric Trapezoid giving min X length, max X length, Rmin and R max.
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.
bool coversFullAzimuth () const final
 Returns true for full phi coverage - obviously false here.
double get (BoundValues bValue) const
 Access to the bound values.
double halfLengthY () const
 This method returns the half length in Y (this is Rmax -Rmin).
double halfPhiSector () const
 This method returns the halfPhiSector which is covered by the disc.
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 rCenter () const
 This method returns the center radius.
double rMax () const final
 This method returns outer radius.
double rMin () const final
 This method returns inner radius.
double stereo () const
 This method returns the stereo angle.
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.
std::vector< Vector2vertices (unsigned int ignoredSegments=0u) const final
 This method returns the xy coordinates of the four corners of the bounds in module coorindates (in xy).
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
eHalfLengthXminR 
eHalfLengthXmaxR 
eMinR 
eMaxR 
eAveragePhi 
eStereo 
eSize 

Constructor & Destructor Documentation

◆ DiscTrapezoidBounds() [1/2]

Acts::DiscTrapezoidBounds::DiscTrapezoidBounds ( double halfXminR,
double halfXmaxR,
double minR,
double maxR,
double avgPhi = std::numbers::pi/2.,
double stereo = 0. )
explicit

Constructor for a symmetric Trapezoid giving min X length, max X length, Rmin and R max.

Parameters
halfXminRhalf length in X at min radius
halfXmaxRhalf length in X at maximum radius
minRinner radius
maxRouter radius
avgPhiaverage phi value
stereooptional stero angle applied

◆ DiscTrapezoidBounds() [2/2]

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

Constructor - from fixed size array.

Parameters
valuesThe parameter values

Member Function Documentation

◆ binningValuePhi()

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

Return a reference phi for binning.

Returns
Average phi angle for binning purposes

Implements Acts::DiscBounds.

◆ binningValueR()

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

Return a reference radius for binning.

Returns
Average radius for binning purposes

Implements Acts::DiscBounds.

◆ boundToCartesianJacobian()

SquareMatrix2 Acts::DiscTrapezoidBounds::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::DiscTrapezoidBounds::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::DiscTrapezoidBounds::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

Implements Acts::SurfaceBounds.

◆ closestPoint()

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

Returns true for full phi coverage - obviously false here.

Returns
Always false since disc trapezoids have limited phi coverage

Implements Acts::DiscBounds.

◆ get()

double Acts::DiscTrapezoidBounds::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

◆ halfLengthY()

double Acts::DiscTrapezoidBounds::halfLengthY ( ) const

This method returns the half length in Y (this is Rmax -Rmin).

Returns
Half length in Y direction calculated from radial bounds

◆ halfPhiSector()

double Acts::DiscTrapezoidBounds::halfPhiSector ( ) const

This method returns the halfPhiSector which is covered by the disc.

Returns
Half phi sector angle covered by the disc trapezoid

◆ inside() [1/2]

bool Acts::DiscTrapezoidBounds::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::DiscTrapezoidBounds::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 radius is within bounds (plus tolerance), false otherwise

Implements Acts::DiscBounds.

◆ isCartesian()

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

Check if the bound coordinates are cartesian.

Returns
true if the bound coordinates are cartesian

Implements Acts::SurfaceBounds.

◆ rCenter()

double Acts::DiscTrapezoidBounds::rCenter ( ) const

This method returns the center radius.

Returns
Center radius calculated from inner and outer bounds

◆ rMax()

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

This method returns outer radius.

Returns
Maximum radius of the disc trapezoid

Implements Acts::DiscBounds.

◆ rMin()

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

This method returns inner radius.

Returns
Minimum radius of the disc trapezoid

Implements Acts::DiscBounds.

◆ stereo()

double Acts::DiscTrapezoidBounds::stereo ( ) const

This method returns the stereo angle.

Returns
Stereo angle of the disc trapezoid

◆ toStream()

std::ostream & Acts::DiscTrapezoidBounds::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::DiscTrapezoidBounds::type ( ) const
finalvirtual

Return the bounds type - for persistency optimization.

Returns
the bounds type

Implements Acts::SurfaceBounds.

◆ values()

std::vector< double > Acts::DiscTrapezoidBounds::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::DiscTrapezoidBounds::vertices ( unsigned int ignoredSegments = 0u) const
finalvirtual

This method returns the xy coordinates of the four corners of the bounds in module coorindates (in xy).

Parameters
ignoredSegmentsis an ignored parameter only used for curved bound segments
Returns
vector for vertices in 2D

Implements Acts::DiscBounds.