ECCE @ EIC Software
Reference for
ECCE @ EIC
simulation and reconstruction software on GitHub
|
#include <acts/blob/master/Core/include/Acts/Surfaces/ConvexPolygonBounds.hpp>
Public Types | |
using | vertex_array = std::array< Vector2D, num_vertices > |
using | value_array = std::array< double, eSize > |
Public Member Functions | |
ConvexPolygonBounds ()=delete | |
ConvexPolygonBounds (const std::vector< Vector2D > &vertices) noexcept(false) | |
ConvexPolygonBounds (const vertex_array &vertices) noexcept(false) | |
ConvexPolygonBounds (const value_array &values) noexcept(false) | |
~ConvexPolygonBounds () override=default | |
BoundsType | type () const final |
bool | inside (const Vector2D &lposition, const BoundaryCheck &bcheck) const final |
double | distanceToBoundary (const Vector2D &lposition) const final |
std::vector< Vector2D > | vertices (unsigned int lseg=1) const final |
const RectangleBounds & | boundingBox () const final |
Public Member Functions inherited from Acts::ConvexPolygonBoundsBase | |
std::ostream & | toStream (std::ostream &sl) const final |
std::vector< double > | values () const final |
Static Public Attributes | |
static constexpr size_t | num_vertices = N |
static constexpr size_t | eSize = 2 * N |
Private Member Functions | |
void | checkConsistency () const noexcept(false) |
Private Attributes | |
vertex_array | m_vertices |
RectangleBounds | m_boundingBox |
Additional Inherited Members | |
Static Protected Member Functions inherited from Acts::ConvexPolygonBoundsBase | |
template<typename coll_t > | |
static RectangleBounds | makeBoundingBox (const coll_t &vertices) |
template<typename coll_t > | |
static void | convex_impl (const coll_t &vertices) noexcept(false) |
This is the actual implementation of the bounds. It is templated on the number of vertices, but there is a specialization for dynamic number of vertices, where the underlying storage is then a vector.
N | Number of vertices |
Definition at line 59 of file ConvexPolygonBounds.hpp.
View newest version in sPHENIX GitHub at line 59 of file ConvexPolygonBounds.hpp
using Acts::ConvexPolygonBounds< N >::value_array = std::array<double, eSize> |
Type that's used to store the vertices, in this case a fixed size array.
Definition at line 72 of file ConvexPolygonBounds.hpp.
View newest version in sPHENIX GitHub at line 72 of file ConvexPolygonBounds.hpp
using Acts::ConvexPolygonBounds< N >::vertex_array = std::array<Vector2D, num_vertices> |
Type that's used to store the vertices, in this case a fixed size array.
Definition at line 66 of file ConvexPolygonBounds.hpp.
View newest version in sPHENIX GitHub at line 66 of file ConvexPolygonBounds.hpp
|
delete |
|
noexcept |
Constructor from a vector of vertices, to facilitate construction. This will throw if the vector size does not match num_vertices
. This will throw if the vertices do not form a convex polygon.
vertices | The list of vertices. |
Definition at line 90 of file ConvexPolygonBounds.ipp.
View newest version in sPHENIX GitHub at line 90 of file ConvexPolygonBounds.ipp
References N, and throw_assert.
|
noexcept |
Constructor from a fixed size array of vertices. This will throw if the vertices do not form a convex polygon.
vertices | The vertices |
Definition at line 102 of file ConvexPolygonBounds.ipp.
View newest version in sPHENIX GitHub at line 102 of file ConvexPolygonBounds.ipp
|
noexcept |
Constructor from a fixed size array of parameters This will throw if the vertices do not form a convex polygon.
values | The values to build up the vertices |
Definition at line 109 of file ConvexPolygonBounds.ipp.
View newest version in sPHENIX GitHub at line 109 of file ConvexPolygonBounds.ipp
References N, and Acts::Test::values.
|
overridedefault |
|
finalvirtual |
Return a rectangle bounds object that encloses this polygon.
Implements Acts::PlanarBounds.
Definition at line 143 of file ConvexPolygonBounds.ipp.
View newest version in sPHENIX GitHub at line 143 of file ConvexPolygonBounds.ipp
Referenced by Acts::Test::BOOST_AUTO_TEST_CASE().
|
privatenoexcept |
Return whether this bounds class is in fact convex throws a log error if not
Definition at line 148 of file ConvexPolygonBounds.ipp.
View newest version in sPHENIX GitHub at line 148 of file ConvexPolygonBounds.ipp
|
finalvirtual |
Return the smallest distance to any point on the boundary of this bounds object.
lposition | The local position to get the distance to |
Implements Acts::SurfaceBounds.
Definition at line 131 of file ConvexPolygonBounds.ipp.
View newest version in sPHENIX GitHub at line 131 of file ConvexPolygonBounds.ipp
References Acts::BoundaryCheck::distance().
|
finalvirtual |
Return whether a local 2D point lies inside of the bounds defined by this object.
lposition | The local position to check |
bcheck | The BoundaryCheck object handling tolerances. |
Implements Acts::SurfaceBounds.
Definition at line 125 of file ConvexPolygonBounds.ipp.
View newest version in sPHENIX GitHub at line 125 of file ConvexPolygonBounds.ipp
References Acts::BoundaryCheck::isInside().
Referenced by Acts::Test::BOOST_AUTO_TEST_CASE().
|
finalvirtual |
Return the bounds type - for persistency optimization
Implements Acts::SurfaceBounds.
Definition at line 120 of file ConvexPolygonBounds.ipp.
View newest version in sPHENIX GitHub at line 120 of file ConvexPolygonBounds.ipp
References Acts::SurfaceBounds::eConvexPolygon.
|
finalvirtual |
Return the vertices
lseg | the number of segments used to approximate and eventually curved line |
Implements Acts::PlanarBounds.
Definition at line 137 of file ConvexPolygonBounds.ipp.
View newest version in sPHENIX GitHub at line 137 of file ConvexPolygonBounds.ipp
|
static |
Expose number of parameters as a template parameter
Definition at line 69 of file ConvexPolygonBounds.hpp.
View newest version in sPHENIX GitHub at line 69 of file ConvexPolygonBounds.hpp
|
private |
Definition at line 128 of file ConvexPolygonBounds.hpp.
View newest version in sPHENIX GitHub at line 128 of file ConvexPolygonBounds.hpp
|
private |
Definition at line 127 of file ConvexPolygonBounds.hpp.
View newest version in sPHENIX GitHub at line 127 of file ConvexPolygonBounds.hpp
|
static |
Expose number of vertices given as template parameter.
Definition at line 63 of file ConvexPolygonBounds.hpp.
View newest version in sPHENIX GitHub at line 63 of file ConvexPolygonBounds.hpp