Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Acts::TrapezoidBounds Class Reference

#include <acts/blob/sPHENIX/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< doublevalues () const final
 
bool inside (const Vector2 &lposition, const BoundaryCheck &bcheck) const final
 
std::vector< Vector2vertices (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 34 of file TrapezoidBounds.hpp.

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

Member Enumeration Documentation

Enumerator:
eHalfLengthXnegY 
eHalfLengthXposY 
eHalfLengthY 
eSize 

Definition at line 36 of file TrapezoidBounds.hpp.

View newest version in sPHENIX GitHub at line 36 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 50 of file TrapezoidBounds.hpp.

View newest version in sPHENIX GitHub at line 50 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 60 of file TrapezoidBounds.hpp.

View newest version in sPHENIX GitHub at line 60 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 66 of file TrapezoidBounds.cpp.

View newest version in sPHENIX GitHub at line 66 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 155 of file TrapezoidBounds.hpp.

View newest version in sPHENIX GitHub at line 155 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::get ( BoundValues  bValue) const
inline

Access to the bound values

Parameters
bValuethe class nested enum for the array access

Definition at line 138 of file TrapezoidBounds.hpp.

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

References m_values.

Referenced by Acts::adjustBinUtility(), Acts::MappingMaterialDecorator::binnedSurfaceMaterial(), and Acts::Test::BOOST_AUTO_TEST_CASE().

+ Here is the caller graph for this function:

bool Acts::TrapezoidBounds::inside ( const Vector2 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.


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 22 of file TrapezoidBounds.cpp.

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

References Acts::eBoundLoc0, Acts::eBoundLoc1, eHalfLengthXnegY, eHalfLengthXposY, eHalfLengthY, Acts::BoundaryCheck::isInside(), Acts::UnitConstants::min, Acts::BoundaryCheck::tolerance(), Acts::BoundaryCheck::type(), testSigmaEff::v, ambiguity_solver_full_chain::x, and y.

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 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:

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 70 of file TrapezoidBounds.cpp.

View newest version in sPHENIX GitHub at line 70 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 18 of file TrapezoidBounds.cpp.

View newest version in sPHENIX GitHub at line 18 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 149 of file TrapezoidBounds.hpp.

View newest version in sPHENIX GitHub at line 149 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::Vector2 > 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 segments is ignored in this representation
Returns
vector for vertices in 2D

Implements Acts::PlanarBounds.

Definition at line 58 of file TrapezoidBounds.cpp.

View newest version in sPHENIX GitHub at line 58 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 142 of file TrapezoidBounds.hpp.

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

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

Definition at line 141 of file TrapezoidBounds.hpp.

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

Referenced by get(), and values().


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