ECCE @ EIC Software
Reference for
ECCE @ EIC
simulation and reconstruction software on GitHub
|
#include <acts/blob/master/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 ActsSymMatrixD< 2 > &localCovariance, double sigmaMax=1) | |
operator bool () const | |
bool | operator! () const |
template<typename Vector2DContainer > | |
bool | isInside (const Vector2D &point, const Vector2DContainer &vertices) const |
bool | isInside (const Vector2D &point, const Vector2D &lowerLeft, const Vector2D &upperRight) const |
template<typename Vector2DContainer > | |
double | distance (const Vector2D &point, const Vector2DContainer &vertices) const |
double | distance (const Vector2D &point, const Vector2D &lowerLeft, const Vector2D &upperRight) const |
Type | type () const |
Broadcast the type. | |
const Vector2D & | tolerance () const |
ActsSymMatrixD< 2 > | covariance () const |
Private Member Functions | |
BoundaryCheck | transformed (const ActsMatrixD< 2, 2 > &jacobian) const |
bool | isTolerated (const Vector2D &delta) const |
Check if the distance vector is within the absolute or relative limits. | |
double | squaredNorm (const Vector2D &x) const |
Compute vector norm based on the covariance. | |
template<typename Vector2DContainer > | |
Vector2D | computeClosestPointOnPolygon (const Vector2D &point, const Vector2DContainer &vertices) const |
Calculate the closest point on the polygon. | |
Vector2D | computeEuclideanClosestPointOnRectangle (const Vector2D &point, const Vector2D &lowerLeft, const Vector2D &upperRight) const |
Calculate the closest point on the box. | |
Private Attributes | |
ActsSymMatrixD< 2 > | m_weight |
metric weight matrix: identity for absolute mode or inverse covariance | |
Vector2D | m_tolerance |
dual use: absolute tolerances or relative chi2/ sigma cut. | |
Type | m_type |
Friends | |
class | CylinderBounds |
class | RectangleBounds |
class | DiscTrapezoidBounds |
class | EllipseBounds |
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:
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 the covariance.
Definition at line 36 of file BoundaryCheck.hpp.
View newest version in sPHENIX GitHub at line 36 of file BoundaryCheck.hpp
Definition at line 114 of file BoundaryCheck.hpp.
View newest version in sPHENIX GitHub at line 114 of file BoundaryCheck.hpp
|
inline |
Construct either hard cut in both dimensions or no cut at all.
Definition at line 183 of file BoundaryCheck.hpp.
View newest version in sPHENIX GitHub at line 183 of file BoundaryCheck.hpp
|
inline |
Construct a tolerance based check.
checkLocal0 | Boolean directive to check coordinate 0 |
checkLocal1 | Boolean directive to check coordinate 1 |
tolerance0 | Tolerance along coordinate 0 |
tolerance1 | Tolerance along coordinate 1 |
Definition at line 188 of file BoundaryCheck.hpp.
View newest version in sPHENIX GitHub at line 188 of file BoundaryCheck.hpp
|
inline |
Construct a chi2-based check.
localCovariance | Coverance matrix in local coordinates |
sigmaMax | Significance for the compatibility test |
Definition at line 195 of file BoundaryCheck.hpp.
View newest version in sPHENIX GitHub at line 195 of file BoundaryCheck.hpp
|
inlineprivate |
Calculate the closest point on the polygon.
Definition at line 318 of file BoundaryCheck.hpp.
View newest version in sPHENIX GitHub at line 318 of file BoundaryCheck.hpp
References field_utils::clamp(), f, n, and Acts::UnitConstants::u.
|
inlineprivate |
Calculate the closest point on the box.
Definition at line 359 of file BoundaryCheck.hpp.
View newest version in sPHENIX GitHub at line 359 of file BoundaryCheck.hpp
References kdfinder::abs(), and test().
|
inline |
Definition at line 179 of file BoundaryCheck.hpp.
View newest version in sPHENIX GitHub at line 179 of file BoundaryCheck.hpp
Referenced by Acts::AnnulusBounds::inside().
|
inline |
Calculate the signed, weighted, closest distance to a polygonal boundary.
point | Test point |
vertices | Forward 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::Vector2D . |
If a covariance is defined, the distance is the corresponding Mahalanobis distance. Otherwise, it is the Eucleadian distance.
Definition at line 271 of file BoundaryCheck.hpp.
View newest version in sPHENIX GitHub at line 271 of file BoundaryCheck.hpp
References d, and Acts::detail::VerticesHelper::isInsidePolygon().
Referenced by Acts::Test::BOOST_AUTO_TEST_CASE(), Acts::RadialBounds::distanceToBoundary(), Acts::RectangleBounds::distanceToBoundary(), Acts::DiscTrapezoidBounds::distanceToBoundary(), Acts::DiamondBounds::distanceToBoundary(), Acts::ConeBounds::distanceToBoundary(), Acts::CylinderBounds::distanceToBoundary(), Acts::ConvexPolygonBounds< N >::distanceToBoundary(), and Acts::TrapezoidBounds::distanceToBoundary().
|
inline |
Calculate the signed, weighted, closest distance to an aligned box.
point | Test point |
loc0Min | Minimal value along the first local axis |
loc0Max | Maximal value along the first local axis |
loc1Min | Minimal value along the first local axis |
loc1Max | Maximal value along the first local axis |
If a covariance is defined, the distance is the corresponding Mahalanobis distance. Otherwise, it is the Eucleadian distance.
Definition at line 279 of file BoundaryCheck.hpp.
View newest version in sPHENIX GitHub at line 279 of file BoundaryCheck.hpp
References d, Acts::detail::VerticesHelper::isInsideRectangle(), and norm.
|
inline |
Check if the point is inside a polygon.
point | Test point |
vertices | Forward 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::Vector2D . |
The check takes into account whether tolerances or covariances are defined for the boundary check.
Definition at line 216 of file BoundaryCheck.hpp.
View newest version in sPHENIX GitHub at line 216 of file BoundaryCheck.hpp
References Acts::detail::VerticesHelper::isInsidePolygon().
Referenced by Acts::Test::BOOST_AUTO_TEST_CASE(), Acts::LineBounds::inside(), Acts::RadialBounds::inside(), Acts::RectangleBounds::inside(), Acts::DiscTrapezoidBounds::inside(), Acts::DiamondBounds::inside(), Acts::CylinderBounds::inside(), Acts::ConeBounds::inside(), Acts::ConvexPolygonBounds< N >::inside(), Acts::TrapezoidBounds::inside(), and Acts::CylinderBounds::inside3D().
|
inline |
Check if the point is inside a box aligned with the local axes.
point | Test point |
loc0Min | Lower bound along first axis |
loc0Max | Upper bound along first axis |
loc1Min | Lower bound along second axis |
loc1Max | Upper bound along second axis |
The check takes into account whether tolerances or covariances are defined for the boundary check.
Definition at line 244 of file BoundaryCheck.hpp.
View newest version in sPHENIX GitHub at line 244 of file BoundaryCheck.hpp
References Acts::detail::VerticesHelper::isInsideRectangle().
|
inlineprivate |
Check if the distance vector is within the absolute or relative limits.
Definition at line 301 of file BoundaryCheck.hpp.
View newest version in sPHENIX GitHub at line 301 of file BoundaryCheck.hpp
References kdfinder::abs().
|
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.
|
inline |
Definition at line 57 of file BoundaryCheck.hpp.
View newest version in sPHENIX GitHub at line 57 of file BoundaryCheck.hpp
|
inlineprivate |
Compute vector norm based on the covariance.
Definition at line 313 of file BoundaryCheck.hpp.
View newest version in sPHENIX GitHub at line 313 of file BoundaryCheck.hpp
References x.
|
inline |
Definition at line 175 of file BoundaryCheck.hpp.
View newest version in sPHENIX GitHub at line 175 of file BoundaryCheck.hpp
Referenced by Acts::AnnulusBounds::inside(), and Acts::CylinderSurface::intersect().
|
inlineprivate |
Return a new BoundaryCheck with updated covariance.
jacobian | Tranform Jacobian for the covariance |
Definition at line 201 of file BoundaryCheck.hpp.
View newest version in sPHENIX GitHub at line 201 of file BoundaryCheck.hpp
References m_tolerance, and m_weight.
Referenced by Acts::DiscTrapezoidBounds::inside(), Acts::CylinderBounds::inside(), and Acts::CylinderBounds::inside3D().
|
inline |
Broadcast the type.
Definition at line 171 of file BoundaryCheck.hpp.
View newest version in sPHENIX GitHub at line 171 of file BoundaryCheck.hpp
References m_type.
Referenced by Acts::AnnulusBounds::inside(), and Acts::CylinderSurface::intersect().
|
friend |
Definition at line 160 of file BoundaryCheck.hpp.
View newest version in sPHENIX GitHub at line 160 of file BoundaryCheck.hpp
|
friend |
Definition at line 164 of file BoundaryCheck.hpp.
View newest version in sPHENIX GitHub at line 164 of file BoundaryCheck.hpp
|
friend |
Definition at line 166 of file BoundaryCheck.hpp.
View newest version in sPHENIX GitHub at line 166 of file BoundaryCheck.hpp
|
friend |
Definition at line 161 of file BoundaryCheck.hpp.
View newest version in sPHENIX GitHub at line 161 of file BoundaryCheck.hpp
|
private |
dual use: absolute tolerances or relative chi2/ sigma cut.
Definition at line 156 of file BoundaryCheck.hpp.
View newest version in sPHENIX GitHub at line 156 of file BoundaryCheck.hpp
Referenced by Acts::EllipseBounds::inside(), Acts::CylinderBounds::inside3D(), and transformed().
|
private |
Definition at line 157 of file BoundaryCheck.hpp.
View newest version in sPHENIX GitHub at line 157 of file BoundaryCheck.hpp
Referenced by Acts::CylinderBounds::inside3D(), operator bool(), and type().
|
private |
metric weight matrix: identity for absolute mode or inverse covariance
Definition at line 153 of file BoundaryCheck.hpp.
View newest version in sPHENIX GitHub at line 153 of file BoundaryCheck.hpp
Referenced by transformed().