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

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

+ Inheritance diagram for Acts::TrapezoidBounds:
+ Collaboration diagram for Acts::TrapezoidBounds:

Public Types

enum  BoundValues { eHalfLengthXnegY = 0, eHalfLengthXposY = 1, eHalfLengthY = 2, eSize = 3 }
 

Public Member Functions

 TrapezoidBounds ()=delete
 
 TrapezoidBounds (double halfXnegY, double halfXposY, double halfY) noexcept(false)
 
 m_boundingBox (std::max(halfXnegY, halfXposY), halfY)
 
 TrapezoidBounds (const std::array< double, eSize > &values) noexcept(false)
 
 ~TrapezoidBounds () override
 
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
 

Private Member Functions

void checkConsistency () noexcept(false)
 

Private Attributes

std::array< double, eSizem_values
 
RectangleBounds m_boundingBox
 

Detailed Description

Bounds for a trapezoidal, planar Surface.

TrapezoidBounds.gif

Definition at line 27 of file TrapezoidBounds.hpp.

View newest version in sPHENIX GitHub at line 27 of file TrapezoidBounds.hpp

Member Enumeration Documentation

Enumerator:
eHalfLengthXnegY 
eHalfLengthXposY 
eHalfLengthY 
eSize 

Definition at line 29 of file TrapezoidBounds.hpp.

View newest version in sPHENIX GitHub at line 29 of file TrapezoidBounds.hpp

Constructor & Destructor Documentation

Acts::TrapezoidBounds::TrapezoidBounds ( )
delete
Acts::TrapezoidBounds::TrapezoidBounds ( double  halfXnegY,
double  halfXposY,
double  halfY 
)
inlinenoexcept

Constructor for symmetric Trapezoid

Parameters
halfXnegYminimal half length X, definition at negative Y
halfXposYmaximal half length X, definition at positive Y
halfYhalf length Y - defined at x=0

Definition at line 43 of file TrapezoidBounds.hpp.

View newest version in sPHENIX GitHub at line 43 of file TrapezoidBounds.hpp

References Acts::Test::halfY.

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

Constructor for symmetric Trapezoid - from fixed size array

Parameters
valuesthe values to be stream in

Definition at line 53 of file TrapezoidBounds.hpp.

View newest version in sPHENIX GitHub at line 53 of file TrapezoidBounds.hpp

References checkConsistency().

+ Here is the call graph for this function:

Acts::TrapezoidBounds::~TrapezoidBounds ( )
overridedefault

Member Function Documentation

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

Bounding box parameters

Returns
rectangle bounds for a bounding box

Implements Acts::PlanarBounds.

Definition at line 39 of file TrapezoidBounds.cpp.

View newest version in sPHENIX GitHub at line 39 of file TrapezoidBounds.cpp

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

+ Here is the caller graph for this function:

void Acts::TrapezoidBounds::checkConsistency ( )
inlineprivatenoexcept

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

Definition at line 157 of file TrapezoidBounds.hpp.

View newest version in sPHENIX GitHub at line 157 of file TrapezoidBounds.hpp

References eHalfLengthXnegY, eHalfLengthXposY, and eHalfLengthY.

Referenced by m_boundingBox(), and TrapezoidBounds().

+ Here is the caller graph for this function:

double Acts::TrapezoidBounds::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 26 of file TrapezoidBounds.cpp.

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

References Acts::BoundaryCheck::distance().

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

Access to the bound values

Parameters
bValuethe class nested enum for the array access

Definition at line 140 of file TrapezoidBounds.hpp.

View newest version in sPHENIX GitHub at line 140 of file TrapezoidBounds.hpp

References m_values.

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

+ Here is the caller graph for this function:

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

The orientation of the Trapezoid is according to the figure above, in words: the shorter of the two parallel sides of the trapezoid intersects with the negative $ y $ - axis of the local frame.

Parameters
lposis the local position to be checked (Cartesian local frame)
bcheckis the boundary check directive


The cases are:
(0) $ y $ or $ x $ bounds are 0 || 0
(1) the local position is outside $ y $ bounds
(2) the local position is inside $ y $ bounds, but outside maximum $ x $ bounds
(3) the local position is inside $ y $ bounds AND inside minimum $ x $ bounds
(4) the local position is inside $ y $ bounds AND inside maximum $ x $ bounds, so that it depends on the $ eta $ coordinate (5) the local position fails test of (4)

The inside check is done using single equations of straight lines and one has to take care if a point lies on the positive $ x $ half area(I) or the negative one(II). Denoting $ |x_{min}| $ and $ | x_{max} | $ as minHalfX respectively maxHalfX, such as $ | y_{H} | $ as halfY, the equations for the straing lines in (I) and (II) can be written as:

  • (I): $ y = \kappa_{I} x + \delta_{I} $
  • (II): $ y = \kappa_{II} x + \delta_{II} $ ,

    where $ \kappa_{I} = - \kappa_{II} = 2 \frac{y_{H}}{x_{max} - x_{min}} $
    and $ \delta_{I} = \delta_{II} = - \frac{1}{2}\kappa_{I}(x_{max} + x_{min}) $
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 21 of file TrapezoidBounds.cpp.

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

References Acts::BoundaryCheck::isInside().

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::TrapezoidBounds::m_boundingBox ( std::  maxhalfXnegY, halfXposY,
halfY   
)
inline

Definition at line 46 of file TrapezoidBounds.hpp.

View newest version in sPHENIX GitHub at line 46 of file TrapezoidBounds.hpp

References checkConsistency().

+ Here is the call graph for this function:

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

Output Method for std::ostream

Parameters
slis the ostream to be dumped into

Implements Acts::SurfaceBounds.

Definition at line 43 of file TrapezoidBounds.cpp.

View newest version in sPHENIX GitHub at line 43 of file TrapezoidBounds.cpp

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

+ Here is the caller graph for this function:

Acts::SurfaceBounds::BoundsType Acts::TrapezoidBounds::type ( ) const
finalvirtual

Return the bounds type - for persistency optimization

Returns
is a BoundsType enum

Implements Acts::SurfaceBounds.

Definition at line 17 of file TrapezoidBounds.cpp.

View newest version in sPHENIX GitHub at line 17 of file TrapezoidBounds.cpp

References Acts::SurfaceBounds::eTrapezoid.

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

+ Here is the caller graph for this function:

std::vector< double > Acts::TrapezoidBounds::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 151 of file TrapezoidBounds.hpp.

View newest version in sPHENIX GitHub at line 151 of file TrapezoidBounds.hpp

References m_values.

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

+ Here is the caller graph for this function:

std::vector< Acts::Vector2D > Acts::TrapezoidBounds::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 31 of file TrapezoidBounds.cpp.

View newest version in sPHENIX GitHub at line 31 of file TrapezoidBounds.cpp

References eHalfLengthXnegY, eHalfLengthXposY, eHalfLengthY, and Acts::Test::hy.

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

+ Here is the caller graph for this function:

Member Data Documentation

RectangleBounds Acts::TrapezoidBounds::m_boundingBox
private

Definition at line 144 of file TrapezoidBounds.hpp.

View newest version in sPHENIX GitHub at line 144 of file TrapezoidBounds.hpp

std::array<double, eSize> Acts::TrapezoidBounds::m_values
private

Definition at line 143 of file TrapezoidBounds.hpp.

View newest version in sPHENIX GitHub at line 143 of file TrapezoidBounds.hpp

Referenced by get(), and values().


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