File AnnulusBounds.hpp

namespace Acts

Note

This file is foreseen for the Geometry module to replace Extent

class AnnulusBounds : public Acts::DiscBounds
#include <Acts/Surfaces/AnnulusBounds.hpp>

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.

Public Types

enum BoundValues

Values:

enumerator eMinR
enumerator eMaxR
enumerator eMinPhiRel
enumerator eMaxPhiRel
enumerator eAveragePhi
enumerator eOriginX
enumerator eOriginY
enumerator eSize

Public Functions

AnnulusBounds() = delete
inline AnnulusBounds(double minR, double maxR, double minPhiRel, double maxPhiRel, const Vector2 &moduleOrigin = {0, 0}, double avgPhi = 0) noexcept(false)

Default constructor from parameters.

Note

For morigin you need to actually calculate the cartesian offset

Parameters
  • minR – inner radius, in module system

  • maxR – outer radius, in module system

  • minPhiRel – right angular edge, in strip system, rel to avgPhi

  • maxPhiRel – left angular edge, in strip system, rel to avgPhi

  • moduleOrigin – The origin offset between the two systems.

  • avgPhi – (Optional) internal rotation of this bounds object’s local frame

AnnulusBounds(const std::array<double, eSize> &values) noexcept(false)

Constructor - from parameters array.

Parameters

values – The parameter array

AnnulusBounds(const AnnulusBounds &source) = default
inline virtual double binningValuePhi() const final

Return a reference radius for binning.

inline virtual double binningValueR() const final

Return a reference radius for binning.

std::vector<Vector2> corners() const

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

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

inline virtual bool coversFullAzimuth() const final

Returns true for full phi coverage.

inline double get(BoundValues bValue) const

Access to the bound values.

Parameters

bValue – the class nested enum for the array access

virtual bool inside(const Vector2 &lposition, const BoundaryCheck &bcheck) const final

Inside check for the bounds object driven by the boundary check directive Each Bounds has a method inside, which checks if a LocalPosition is inside the bounds Inside can be called without/with tolerances.

Parameters
  • lposition – Local position (assumed to be in right surface frame)

  • bcheck – boundary check directive

Returns

boolean indicator for the success of this operation

inline virtual bool insideRadialBounds(double R, double tolerance = 0.) const final

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

Vector2 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

inline double phiMax() const

Returns the left angular edge of the module.

Returns

The left side angle

inline double phiMin() const

Returns the right angular edge of the module.

Returns

The right side angle

inline virtual double rMax() const final

This method returns outer radius.

inline virtual double rMin() const final

This method returns inner radius.

virtual std::ostream &toStream(std::ostream &sl) const final

Outstream operator.

Parameters

sl – is the ostream to be dumped into

inline virtual SurfaceBounds::BoundsType type() const final

Return the bounds type - for persistency optimization.

Returns

is a BoundsType enum

inline virtual std::vector<double> values() const final

Return the bound values as dynamically sized vector.

Returns

this returns a copy of the internal values

virtual std::vector<Vector2> vertices(unsigned int lseg) const

This method returns the xy coordinates of the four corners of the bounds in module coorindates (in x/y) Starting from the upper right (max R, pos locX) and proceding clock-wise i.e.

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

Note

that that if lseg > 0, the extrema points are given, which may slightly alter the number of segments returned

Parameters

lseg – the number of segments used to approximate and eventually curved line

Returns

vector for vertices in 2D

Private Functions

inline void checkConsistency() noexcept(false)

Check the input values for consistency, will throw a logic_exception if consistency is not given.

Vector2 closestOnSegment(const Vector2 &a, const Vector2 &b, const Vector2 &p, const SymMatrix2 &weight) const

Private helper method.

virtual bool inside(const Vector2 &lposition, double tolR, double tolPhi) const final

Inside check for the bounds object driven by the boundary check directive Each Bounds has a method inside, which checks if a LocalPosition is inside the bounds Inside can be called without/with tolerances.

Parameters
  • lposition – Local position (assumed to be in right surface frame)

  • tolR – tolerance on the radius

  • tolPhi – tolerance on the polar angle phi

Returns

boolean indicator for the success of this operation

double squaredNorm(const Vector2 &v, const SymMatrix2 &weight) const

Private helper mehtod.

Vector2 stripXYToModulePC(const Vector2 &vStripXY) const

Transform the strip cartesien into the module polar system.

Parameters

vStripXY – the position in the cartesian strip system

Returns

the position in the module polar coordinate system

Private Members

Vector2 m_inLeftModulePC
Vector2 m_inLeftStripPC
Vector2 m_inLeftStripXY
Vector2 m_inRightModulePC
Vector2 m_inRightStripPC
Vector2 m_inRightStripXY
Vector2 m_moduleOrigin
Vector2 m_outLeftModulePC
Vector2 m_outLeftStripPC
Vector2 m_outLeftStripXY
Vector2 m_outRightModulePC
Vector2 m_outRightStripPC
Vector2 m_outRightStripXY
Transform2 m_rotationStripPC
Vector2 m_shiftPC
Vector2 m_shiftXY
Transform2 m_translation
std::array<double, eSize> m_values