Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Acts::BoundaryCheck Class Reference

#include <acts/blob/sPHENIX/Core/include/Acts/Surfaces/BoundaryCheck.hpp>

Public Types

enum  Type
 

Public Member Functions

 BoundaryCheck (bool check)
 Construct either hard cut in both dimensions or no cut at all.
 
 BoundaryCheck (bool checkLocal0, bool checkLocal1, double tolerance0=0, double tolerance1=0)
 
 BoundaryCheck (const SquareMatrix2 &localCovariance, double sigmaMax=1)
 
 operator bool () const
 
bool operator! () const
 
template<typename Vector2Container >
bool isInside (const Vector2 &point, const Vector2Container &vertices) const
 
bool isInside (const Vector2 &point, const Vector2 &lowerLeft, const Vector2 &upperRight) const
 
template<typename Vector2Container >
double distance (const Vector2 &point, const Vector2Container &vertices) const
 
double distance (const Vector2 &point, const Vector2 &lowerLeft, const Vector2 &upperRight) const
 
Type type () const
 Broadcast the type.
 
const Vector2tolerance () const
 
SquareMatrix2 covariance () const
 

Private Member Functions

BoundaryCheck transformed (const ActsMatrix< 2, 2 > &jacobian) const
 
bool isTolerated (const Vector2 &delta) const
 Check if the distance vector is within the absolute or relative limits.
 
double squaredNorm (const Vector2 &x) const
 Compute vector norm based on the covariance.
 
template<typename Vector2Container >
Vector2 computeClosestPointOnPolygon (const Vector2 &point, const Vector2Container &vertices) const
 Calculate the closest point on the polygon.
 
Vector2 computeEuclideanClosestPointOnRectangle (const Vector2 &point, const Vector2 &lowerLeft, const Vector2 &upperRight) const
 Calculate the closest point on the box.
 

Private Attributes

SquareMatrix2 m_weight
 metric weight matrix: identity for absolute mode or inverse covariance
 
Vector2 m_tolerance
 dual use: absolute tolerances or relative chi2/ sigma cut.
 
Type m_type
 

Friends

class CylinderBounds
 
class RectangleBounds
 
class DiscTrapezoidBounds
 
class EllipseBounds
 

Detailed Description

The BoundaryCheck class provides boundary checks and distance calculations for aligned box-like and polygonal boundaries on local surfaces. Different types of boundary checks are supported and are transparently selected when calling the isInside(...) and distance(...) methods:

  • Hard checks w/o any tolerances
  • Tolerance-based checks in one or in both local coordinates
  • Chi2-based checks based on a covariance matrix. Non-vanishing correlations are correctly taken into account.

With a defined covariance matrix, the closest point and the distance are not defined along the usual Euclidean metric, but by the Mahalanobis distance induced by the covariance.

Definition at line 36 of file BoundaryCheck.hpp.

View newest version in sPHENIX GitHub at line 36 of file BoundaryCheck.hpp

Member Enumeration Documentation

Definition at line 109 of file BoundaryCheck.hpp.

View newest version in sPHENIX GitHub at line 109 of file BoundaryCheck.hpp

Constructor & Destructor Documentation

Acts::BoundaryCheck::BoundaryCheck ( bool  check)
inline

Construct either hard cut in both dimensions or no cut at all.

Definition at line 178 of file BoundaryCheck.hpp.

View newest version in sPHENIX GitHub at line 178 of file BoundaryCheck.hpp

Acts::BoundaryCheck::BoundaryCheck ( bool  checkLocal0,
bool  checkLocal1,
double  tolerance0 = 0,
double  tolerance1 = 0 
)
inline

Construct a tolerance based check.

Parameters
checkLocal0Boolean directive to check coordinate 0
checkLocal1Boolean directive to check coordinate 1
tolerance0Tolerance along coordinate 0
tolerance1Tolerance along coordinate 1

Definition at line 183 of file BoundaryCheck.hpp.

View newest version in sPHENIX GitHub at line 183 of file BoundaryCheck.hpp

Acts::BoundaryCheck::BoundaryCheck ( const SquareMatrix2 localCovariance,
double  sigmaMax = 1 
)
inline

Construct a chi2-based check.

Parameters
localCovarianceCoverance matrix in local coordinates
sigmaMaxSignificance for the compatibility test

Definition at line 190 of file BoundaryCheck.hpp.

View newest version in sPHENIX GitHub at line 190 of file BoundaryCheck.hpp

Member Function Documentation

template<typename Vector2Container >
Acts::Vector2 Acts::BoundaryCheck::computeClosestPointOnPolygon ( const Vector2 point,
const Vector2Container &  vertices 
) const
inlineprivate

Calculate the closest point on the polygon.

Definition at line 313 of file BoundaryCheck.hpp.

View newest version in sPHENIX GitHub at line 313 of file BoundaryCheck.hpp

References parse_cmake_options::begin, closest(), end, f, testSigmaEff::l1, n, and physmon_ckf_tracking::u.

+ Here is the call graph for this function:

Acts::Vector2 Acts::BoundaryCheck::computeEuclideanClosestPointOnRectangle ( const Vector2 point,
const Vector2 lowerLeft,
const Vector2 upperRight 
) const
inlineprivate

Calculate the closest point on the box.

Definition at line 354 of file BoundaryCheck.hpp.

View newest version in sPHENIX GitHub at line 354 of file BoundaryCheck.hpp

References dist(), testSigmaEff::l1, and train_ambiguity_solver::test.

+ Here is the call graph for this function:

Acts::SquareMatrix2 Acts::BoundaryCheck::covariance ( ) const
inline

Definition at line 174 of file BoundaryCheck.hpp.

View newest version in sPHENIX GitHub at line 174 of file BoundaryCheck.hpp

Referenced by Acts::AnnulusBounds::inside().

+ Here is the caller graph for this function:

template<typename Vector2Container >
double Acts::BoundaryCheck::distance ( const Vector2 point,
const Vector2Container &  vertices 
) const
inline

Calculate the signed, weighted, closest distance to a polygonal boundary.

Parameters
pointTest point
verticesForward iterable container of convex polygon vertices. Calling std::begin/ std::end on the container must return an iterator where *it must be convertible to an Acts::Vector2.
Returns
Negative value if inside, positive if outside

If a covariance is defined, the distance is the corresponding Mahalanobis distance. Otherwise, it is the Eucleadian distance.

Definition at line 266 of file BoundaryCheck.hpp.

View newest version in sPHENIX GitHub at line 266 of file BoundaryCheck.hpp

References Acts::detail::VerticesHelper::isInsidePolygon().

Referenced by Acts::Test::BOOST_AUTO_TEST_CASE().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double Acts::BoundaryCheck::distance ( const Vector2 point,
const Vector2 lowerLeft,
const Vector2 upperRight 
) const
inline

Calculate the signed, weighted, closest distance to an aligned box.

Parameters
pointTest point
lowerLeftMinimal vertex of the box
upperRightMaximal vertex of the box
Returns
Negative value if inside, positive if outside

If a covariance is defined, the distance is the corresponding Mahalanobis distance. Otherwise, it is the Eucleadian distance.

Definition at line 274 of file BoundaryCheck.hpp.

View newest version in sPHENIX GitHub at line 274 of file BoundaryCheck.hpp

References distance(), Acts::detail::VerticesHelper::isInsideRectangle(), norm, and ActsExamples::HepMC3Event::vertices().

+ Here is the call graph for this function:

template<typename Vector2Container >
bool Acts::BoundaryCheck::isInside ( const Vector2 point,
const Vector2Container &  vertices 
) const
inline

Check if the point is inside a polygon.

Parameters
pointTest point
verticesForward iterable container of convex polygon vertices. Calling std::begin/ std::end on the container must return an iterator where *it must be convertible to an Acts::Vector2.

The check takes into account whether tolerances or covariances are defined for the boundary check.

Definition at line 211 of file BoundaryCheck.hpp.

View newest version in sPHENIX GitHub at line 211 of file BoundaryCheck.hpp

References Acts::detail::VerticesHelper::isInsidePolygon().

Referenced by Acts::Test::BOOST_AUTO_TEST_CASE(), Acts::LineBounds::inside(), Acts::RadialBounds::inside(), Acts::DiscTrapezoidBounds::inside(), Acts::RectangleBounds::inside(), Acts::DiamondBounds::inside(), Acts::ConeBounds::inside(), Acts::CylinderBounds::inside(), Acts::ConvexPolygonBounds< N >::inside(), Acts::TrapezoidBounds::inside(), and Acts::CylinderBounds::inside3D().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool Acts::BoundaryCheck::isInside ( const Vector2 point,
const Vector2 lowerLeft,
const Vector2 upperRight 
) const
inline

Check if the point is inside a box aligned with the local axes.

Parameters
pointTest point
lowerLeftMinimal vertex of the box
upperRightMaximal vertex of the box

The check takes into account whether tolerances or covariances are defined for the boundary check.

Definition at line 239 of file BoundaryCheck.hpp.

View newest version in sPHENIX GitHub at line 239 of file BoundaryCheck.hpp

References Acts::detail::VerticesHelper::isInsideRectangle(), and ActsExamples::HepMC3Event::vertices().

+ Here is the call graph for this function:

bool Acts::BoundaryCheck::isTolerated ( const Vector2 delta) const
inlineprivate

Check if the distance vector is within the absolute or relative limits.

Definition at line 296 of file BoundaryCheck.hpp.

View newest version in sPHENIX GitHub at line 296 of file BoundaryCheck.hpp

Acts::BoundaryCheck::operator bool ( ) const
inline

Definition at line 56 of file BoundaryCheck.hpp.

View newest version in sPHENIX GitHub at line 56 of file BoundaryCheck.hpp

References m_type.

bool Acts::BoundaryCheck::operator! ( ) const
inline

Definition at line 57 of file BoundaryCheck.hpp.

View newest version in sPHENIX GitHub at line 57 of file BoundaryCheck.hpp

double Acts::BoundaryCheck::squaredNorm ( const Vector2 x) const
inlineprivate

Compute vector norm based on the covariance.

Definition at line 308 of file BoundaryCheck.hpp.

View newest version in sPHENIX GitHub at line 308 of file BoundaryCheck.hpp

References value, and ambiguity_solver_full_chain::x.

const Acts::Vector2 & Acts::BoundaryCheck::tolerance ( ) const
inline

Definition at line 170 of file BoundaryCheck.hpp.

View newest version in sPHENIX GitHub at line 170 of file BoundaryCheck.hpp

Referenced by Acts::AnnulusBounds::inside(), Acts::TrapezoidBounds::inside(), and Acts::CylinderSurface::intersect().

+ Here is the caller graph for this function:

Acts::BoundaryCheck Acts::BoundaryCheck::transformed ( const ActsMatrix< 2, 2 > &  jacobian) const
inlineprivate

Return a new BoundaryCheck with updated covariance.

Parameters
jacobianTransform Jacobian for the covariance
Warning
This currently only transforms the covariance and does not work for the tolerance based check.

Definition at line 196 of file BoundaryCheck.hpp.

View newest version in sPHENIX GitHub at line 196 of file BoundaryCheck.hpp

References m_tolerance, and m_weight.

Referenced by Acts::DiscTrapezoidBounds::inside(), Acts::CylinderBounds::inside(), and Acts::CylinderBounds::inside3D().

+ Here is the caller graph for this function:

Acts::BoundaryCheck::Type Acts::BoundaryCheck::type ( ) const
inline

Broadcast the type.

Definition at line 166 of file BoundaryCheck.hpp.

View newest version in sPHENIX GitHub at line 166 of file BoundaryCheck.hpp

References m_type.

Referenced by Acts::AnnulusBounds::inside(), Acts::TrapezoidBounds::inside(), and Acts::CylinderSurface::intersect().

+ Here is the caller graph for this function:

Friends And Related Function Documentation

Definition at line 155 of file BoundaryCheck.hpp.

View newest version in sPHENIX GitHub at line 155 of file BoundaryCheck.hpp

friend class DiscTrapezoidBounds
friend

Definition at line 159 of file BoundaryCheck.hpp.

View newest version in sPHENIX GitHub at line 159 of file BoundaryCheck.hpp

friend class EllipseBounds
friend

Definition at line 161 of file BoundaryCheck.hpp.

View newest version in sPHENIX GitHub at line 161 of file BoundaryCheck.hpp

friend class RectangleBounds
friend

Definition at line 156 of file BoundaryCheck.hpp.

View newest version in sPHENIX GitHub at line 156 of file BoundaryCheck.hpp

Member Data Documentation

Vector2 Acts::BoundaryCheck::m_tolerance
private

dual use: absolute tolerances or relative chi2/ sigma cut.

Definition at line 151 of file BoundaryCheck.hpp.

View newest version in sPHENIX GitHub at line 151 of file BoundaryCheck.hpp

Referenced by Acts::EllipseBounds::inside(), Acts::CylinderBounds::inside3D(), and transformed().

Type Acts::BoundaryCheck::m_type
private

Definition at line 152 of file BoundaryCheck.hpp.

View newest version in sPHENIX GitHub at line 152 of file BoundaryCheck.hpp

Referenced by Acts::CylinderBounds::inside3D(), operator bool(), and type().

SquareMatrix2 Acts::BoundaryCheck::m_weight
private

metric weight matrix: identity for absolute mode or inverse covariance

Definition at line 148 of file BoundaryCheck.hpp.

View newest version in sPHENIX GitHub at line 148 of file BoundaryCheck.hpp

Referenced by transformed().


The documentation for this class was generated from the following file: