Analysis Software
Documentation for sPHENIX simulation software
|
#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 Vector2 & | tolerance () 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 |
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 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 109 of file BoundaryCheck.hpp.
View newest version in sPHENIX GitHub at line 109 of file BoundaryCheck.hpp
|
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
|
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 183 of file BoundaryCheck.hpp.
View newest version in sPHENIX GitHub at line 183 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 190 of file BoundaryCheck.hpp.
View newest version in sPHENIX GitHub at line 190 of file BoundaryCheck.hpp
|
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.
|
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.
|
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().
|
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::Vector2 . |
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().
|
inline |
Calculate the signed, weighted, closest distance to an aligned box.
point | Test point |
lowerLeft | Minimal vertex of the box |
upperRight | Maximal vertex of the box |
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().
|
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::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().
|
inline |
Check if the point is inside a box aligned with the local axes.
point | Test point |
lowerLeft | Minimal vertex of the box |
upperRight | Maximal 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().
|
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
|
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
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.
|
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().
|
inlineprivate |
Return a new BoundaryCheck with updated covariance.
jacobian | Transform Jacobian for the covariance |
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().
|
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().
|
friend |
Definition at line 155 of file BoundaryCheck.hpp.
View newest version in sPHENIX GitHub at line 155 of file BoundaryCheck.hpp
|
friend |
Definition at line 159 of file BoundaryCheck.hpp.
View newest version in sPHENIX GitHub at line 159 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
|
friend |
Definition at line 156 of file BoundaryCheck.hpp.
View newest version in sPHENIX GitHub at line 156 of file BoundaryCheck.hpp
|
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().
|
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().
|
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().