Analysis Software
Documentation for sPHENIX simulation software
|
#include <acts/blob/sPHENIX/Core/include/Acts/Surfaces/ConvexPolygonBounds.hpp>
Public Types | |
using | vertex_array = std::array< Vector2, num_vertices > |
using | value_array = std::array< double, eSize > |
Public Member Functions | |
ConvexPolygonBounds ()=delete | |
ConvexPolygonBounds (const std::vector< Vector2 > &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 Vector2 &lposition, const BoundaryCheck &bcheck) const final |
std::vector< Vector2 > | 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 66 of file ConvexPolygonBounds.hpp.
View newest version in sPHENIX GitHub at line 66 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 79 of file ConvexPolygonBounds.hpp.
View newest version in sPHENIX GitHub at line 79 of file ConvexPolygonBounds.hpp
using Acts::ConvexPolygonBounds< N >::vertex_array = std::array<Vector2, num_vertices> |
Type that's used to store the vertices, in this case a fixed size array.
Definition at line 73 of file ConvexPolygonBounds.hpp.
View newest version in sPHENIX GitHub at line 73 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 67 of file ConvexPolygonBounds.ipp.
View newest version in sPHENIX GitHub at line 67 of file ConvexPolygonBounds.ipp
References i, N, throw_assert, and ActsExamples::HepMC3Event::vertices().
|
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 79 of file ConvexPolygonBounds.ipp.
View newest version in sPHENIX GitHub at line 79 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 86 of file ConvexPolygonBounds.ipp.
View newest version in sPHENIX GitHub at line 86 of file ConvexPolygonBounds.ipp
References i, N, and Acts::Test::values.
|
overridedefault |
|
finalvirtual |
Return a rectangle bounds object that encloses this polygon.
Implements Acts::PlanarBounds.
Definition at line 114 of file ConvexPolygonBounds.ipp.
View newest version in sPHENIX GitHub at line 114 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 119 of file ConvexPolygonBounds.ipp.
View newest version in sPHENIX GitHub at line 119 of file ConvexPolygonBounds.ipp
|
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 102 of file ConvexPolygonBounds.ipp.
View newest version in sPHENIX GitHub at line 102 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 97 of file ConvexPolygonBounds.ipp.
View newest version in sPHENIX GitHub at line 97 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 108 of file ConvexPolygonBounds.ipp.
View newest version in sPHENIX GitHub at line 108 of file ConvexPolygonBounds.ipp
|
static |
Expose number of parameters as a template parameter
Definition at line 76 of file ConvexPolygonBounds.hpp.
View newest version in sPHENIX GitHub at line 76 of file ConvexPolygonBounds.hpp
|
private |
Definition at line 129 of file ConvexPolygonBounds.hpp.
View newest version in sPHENIX GitHub at line 129 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
|
static |
Expose number of vertices given as template parameter.
Definition at line 70 of file ConvexPolygonBounds.hpp.
View newest version in sPHENIX GitHub at line 70 of file ConvexPolygonBounds.hpp