ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Acts::RectangleBounds Class Reference

#include <acts/blob/master/Core/include/Acts/Surfaces/RectangleBounds.hpp>

+ Inheritance diagram for Acts::RectangleBounds:
+ Collaboration diagram for Acts::RectangleBounds:

Public Types

enum  BoundValues : int {
  eMinX = 0, eMinY = 1, eMaxX = 2, eMaxY = 3,
  eSize = 4
}
 

Public Member Functions

 RectangleBounds ()=delete
 
 RectangleBounds (double halfX, double halfY) noexcept(false)
 
 m_max ({halfX, halfY})
 
 RectangleBounds (const std::array< double, eSize > &values) noexcept(false)
 
 m_max ({values[eMaxX], values[eMaxY]})
 
 RectangleBounds (const Vector2D &min, const Vector2D &max) noexcept(false)
 
 ~RectangleBounds () override=default
 
BoundsType type () const final
 
std::vector< double > values () const final
 
bool inside (const Vector2D &lposition, const BoundaryCheck &bcheck) const final
 
double distanceToBoundary (const Vector2D &lposition) const final
 
std::vector< Vector2Dvertices (unsigned int lseg=1) const final
 
const RectangleBoundsboundingBox () const final
 
std::ostream & toStream (std::ostream &sl) const final
 
double get (BoundValues bValue) const
 
double halfLengthX () const
 Access to the half length in X.
 
double halfLengthY () const
 Access to the half length in Y.
 
const Vector2Dmin () const
 
const Vector2Dmax () const
 

Private Member Functions

void checkConsistency () noexcept(false)
 

Private Attributes

Vector2D m_min
 
Vector2D m_max
 

Detailed Description

Bounds for a rectangular, planar surface - it can be used to for rectangles that are symetrically centered around (0./0.) and for generic shifted rectangles

Definition at line 24 of file RectangleBounds.hpp.

View newest version in sPHENIX GitHub at line 24 of file RectangleBounds.hpp

Member Enumeration Documentation

Enumerator:
eMinX 
eMinY 
eMaxX 
eMaxY 
eSize 

Definition at line 26 of file RectangleBounds.hpp.

View newest version in sPHENIX GitHub at line 26 of file RectangleBounds.hpp

Constructor & Destructor Documentation

Acts::RectangleBounds::RectangleBounds ( )
delete
Acts::RectangleBounds::RectangleBounds ( double  halfX,
double  halfY 
)
inlinenoexcept

Constructor with halflength in x and y - symmetric

Parameters
halfXhalflength in X
halfYhalflength in Y

Definition at line 40 of file RectangleBounds.hpp.

View newest version in sPHENIX GitHub at line 40 of file RectangleBounds.hpp

Acts::RectangleBounds::RectangleBounds ( const std::array< double, eSize > &  values)
inlinenoexcept

Constructor - from fixed size array - generic

Parameters
valuesThe parameter values

Definition at line 48 of file RectangleBounds.hpp.

View newest version in sPHENIX GitHub at line 48 of file RectangleBounds.hpp

References eMinX, eMinY, and values().

+ Here is the call graph for this function:

Acts::RectangleBounds::RectangleBounds ( const Vector2D min,
const Vector2D max 
)
inlinenoexcept

Constructor - from min/max - generic

Parameters
minThe left bottom corner
maxThe right top corning

Definition at line 58 of file RectangleBounds.hpp.

View newest version in sPHENIX GitHub at line 58 of file RectangleBounds.hpp

References checkConsistency().

+ Here is the call graph for this function:

Acts::RectangleBounds::~RectangleBounds ( )
overridedefault

Member Function Documentation

const Acts::RectangleBounds & Acts::RectangleBounds::boundingBox ( ) const
finalvirtual

Bounding box parameters

Returns
rectangle bounds for a bounding box

Implements Acts::PlanarBounds.

Definition at line 32 of file RectangleBounds.cpp.

View newest version in sPHENIX GitHub at line 32 of file RectangleBounds.cpp

void Acts::RectangleBounds::checkConsistency ( )
inlineprivatenoexcept

Check the input values for consistency, will throw a logic_exception if consistency is not given

Definition at line 166 of file RectangleBounds.hpp.

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

References eMaxX, eMaxY, eMinX, and eMinY.

Referenced by RectangleBounds().

+ Here is the caller graph for this function:

double Acts::RectangleBounds::distanceToBoundary ( const Vector2D lposition) const
finalvirtual

Minimal distance to boundary ( > 0 if outside and <=0 if inside)

Parameters
lpositionis the local position to check for the distance
Returns
is a signed distance parameter

Implements Acts::SurfaceBounds.

Definition at line 21 of file RectangleBounds.cpp.

View newest version in sPHENIX GitHub at line 21 of file RectangleBounds.cpp

References Acts::BoundaryCheck::distance(), max, and min.

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::RectangleBounds::get ( BoundValues  bValue) const
inline

Access to the bound values

Parameters
bValuethe class nested enum for the array access

Definition at line 154 of file RectangleBounds.hpp.

View newest version in sPHENIX GitHub at line 154 of file RectangleBounds.hpp

References eMaxX, eMinX, eMinY, m_max, and m_min.

double Acts::RectangleBounds::halfLengthX ( ) const
inline

Access to the half length in X.

Definition at line 142 of file RectangleBounds.hpp.

View newest version in sPHENIX GitHub at line 142 of file RectangleBounds.hpp

References m_max, and m_min.

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

+ Here is the caller graph for this function:

double Acts::RectangleBounds::halfLengthY ( ) const
inline

Access to the half length in Y.

Definition at line 146 of file RectangleBounds.hpp.

View newest version in sPHENIX GitHub at line 146 of file RectangleBounds.hpp

References m_max, and m_min.

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

+ Here is the caller graph for this function:

bool Acts::RectangleBounds::inside ( const Vector2D lposition,
const BoundaryCheck bcheck 
) const
finalvirtual

Inside check for the bounds object driven by the boundary check directive Each Bounds has a method inside, which checks if a LocalPosition is inside the bounds Inside can be called without/with tolerances.

Parameters
lpositionLocal position (assumed to be in right surface frame)
bcheckboundary check directive
Returns
boolean indicator for the success of this operation

Implements Acts::SurfaceBounds.

Definition at line 16 of file RectangleBounds.cpp.

View newest version in sPHENIX GitHub at line 16 of file RectangleBounds.cpp

References Acts::BoundaryCheck::isInside(), m_max, and m_min.

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

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Acts::RectangleBounds::m_max ( {halfX, halfY}  )
inline

Definition at line 41 of file RectangleBounds.hpp.

View newest version in sPHENIX GitHub at line 41 of file RectangleBounds.hpp

References Acts::Test::halfX, and Acts::Test::halfY.

Acts::RectangleBounds::m_max ( {values[eMaxX], values[eMaxY]}  )
inline

Definition at line 50 of file RectangleBounds.hpp.

View newest version in sPHENIX GitHub at line 50 of file RectangleBounds.hpp

References eMaxX, eMaxY, and values().

+ Here is the call graph for this function:

const Vector2D & Acts::RectangleBounds::max ( ) const
inline

Get the max vertex defining the bounds

Returns
The max vertex

Definition at line 138 of file RectangleBounds.hpp.

View newest version in sPHENIX GitHub at line 138 of file RectangleBounds.hpp

References m_max.

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

+ Here is the caller graph for this function:

const Vector2D & Acts::RectangleBounds::min ( ) const
inline

Get the min vertex defining the bounds

Returns
The min vertex

Definition at line 134 of file RectangleBounds.hpp.

View newest version in sPHENIX GitHub at line 134 of file RectangleBounds.hpp

References m_min.

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

+ Here is the caller graph for this function:

std::ostream & Acts::RectangleBounds::toStream ( std::ostream &  sl) const
finalvirtual

Output Method for std::ostream

Parameters
slis the ostream for the dump

Implements Acts::SurfaceBounds.

Definition at line 37 of file RectangleBounds.cpp.

View newest version in sPHENIX GitHub at line 37 of file RectangleBounds.cpp

References max, and min.

SurfaceBounds::BoundsType Acts::RectangleBounds::type ( ) const
inlinefinalvirtual

Return the bounds type - for persistency optimization

Returns
is a BoundsType enum

Implements Acts::SurfaceBounds.

Definition at line 130 of file RectangleBounds.hpp.

View newest version in sPHENIX GitHub at line 130 of file RectangleBounds.hpp

References Acts::SurfaceBounds::eRectangle.

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

+ Here is the caller graph for this function:

std::vector< double > Acts::RectangleBounds::values ( ) const
inlinefinalvirtual

Access method for bound values, this is a dynamically sized vector containing the parameters needed to describe these bounds

Returns
of the stored values for this SurfaceBounds object

Implements Acts::SurfaceBounds.

Definition at line 150 of file RectangleBounds.hpp.

View newest version in sPHENIX GitHub at line 150 of file RectangleBounds.hpp

References m_max, and m_min.

Referenced by Acts::Test::BOOST_AUTO_TEST_CASE(), m_max(), and RectangleBounds().

+ Here is the caller graph for this function:

std::vector< Acts::Vector2D > Acts::RectangleBounds::vertices ( unsigned int  lseg = 1) const
finalvirtual

Return the vertices

Parameters
lsegthe number of segments used to approximate and eventually curved line
Note
the number of segements is ignored in this representation
Returns
vector for vertices in 2D

Implements Acts::PlanarBounds.

Definition at line 26 of file RectangleBounds.cpp.

View newest version in sPHENIX GitHub at line 26 of file RectangleBounds.cpp

Referenced by Acts::Test::BOOST_AUTO_TEST_CASE(), and Acts::Test::dumpVertices().

+ Here is the caller graph for this function:

Member Data Documentation

Vector2D Acts::RectangleBounds::m_max
private

Definition at line 123 of file RectangleBounds.hpp.

View newest version in sPHENIX GitHub at line 123 of file RectangleBounds.hpp

Referenced by get(), halfLengthX(), halfLengthY(), inside(), max(), and values().

Vector2D Acts::RectangleBounds::m_min
private

Definition at line 122 of file RectangleBounds.hpp.

View newest version in sPHENIX GitHub at line 122 of file RectangleBounds.hpp

Referenced by get(), halfLengthX(), halfLengthY(), inside(), min(), and values().


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