Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Acts::RangeXD< Dims, Type, Vector > Class Template Reference

An orthogonal range in an arbitrary number of dimensions. More...

#include <acts/blob/sPHENIX/Core/include/Acts/Utilities/RangeXD.hpp>

+ Collaboration diagram for Acts::RangeXD< Dims, Type, Vector >:

Public Types

using coordinate_t = Vector< Type, Dims >
 The type used to describe coordinates in our range.
 

Public Member Functions

bool degenerate (void) const
 Determine whether this range is degenerate.
 
bool contains (const coordinate_t &v) const
 Determine whether the range contains a certain point.
 
Range1D< Type > & operator[] (const std::size_t &i)
 Access one of the dimensional ranges of the volume.
 
const Range1D< Type > & operator[] (const std::size_t &i) const
 Access one of the dimensional ranges of the volume.
 
bool operator== (const RangeXD< Dims, Type, Vector > &o) const
 Determine whether two ranges are equal.
 
bool operator<= (const RangeXD< Dims, Type, Vector > &o) const
 Determine whether one range is a subset of another range.
 
bool operator>= (const RangeXD< Dims, Type, Vector > &o) const
 Determine whether one range is a superset of another range.
 
RangeXD< Dims, Type, Vector > operator& (const RangeXD< Dims, Type, Vector > &o) const
 Compute the intersection of this range with another range.
 
RangeXD< Dims, Type, Vector > & operator&= (const RangeXD< Dims, Type, Vector > &o)
 Update the range to the intersection with another range.
 
bool operator&& (const RangeXD< Dims, Type, Vector > &r) const
 Determine whether this range intersects another.
 
std::string toString (void) const
 Represent the range as a string.
 

Private Attributes

std::array< Range1D< Type >, Dims > m_dims
 

Detailed Description

template<std::size_t Dims, typename Type, template< typename, std::size_t > typename Vector = std::array>
class Acts::RangeXD< Dims, Type, Vector >

An orthogonal range in an arbitrary number of dimensions.

By combining a number one-dimensional ranges we can (under the assumption that our axes are orthogonal) construct an orthogonal range of values. In other words, a hyperrectangular volume in space.

Template Parameters
DimsThe number of dimensions in our range
TypeThe scalar type of our ranges
VectorThe vector type used to define coordinates

Definition at line 31 of file RangeXD.hpp.

View newest version in sPHENIX GitHub at line 31 of file RangeXD.hpp

Member Typedef Documentation

template<std::size_t Dims, typename Type, template< typename, std::size_t > typename Vector = std::array>
using Acts::RangeXD< Dims, Type, Vector >::coordinate_t = Vector<Type, Dims>

The type used to describe coordinates in our range.

Definition at line 34 of file RangeXD.hpp.

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

Member Function Documentation

template<std::size_t Dims, typename Type, template< typename, std::size_t > typename Vector = std::array>
bool Acts::RangeXD< Dims, Type, Vector >::contains ( const coordinate_t v) const
inline

Determine whether the range contains a certain point.

This is true if and only if the range contains the point in all of its dimensions.

Parameters
vThe coordinate to check for membership in the range
Returns
true The coordinate is inside the range
false The coordinate is outside the range

Definition at line 61 of file RangeXD.hpp.

View newest version in sPHENIX GitHub at line 61 of file RangeXD.hpp

Referenced by Acts::RangeXD< binValues, ActsScalar >::contains(), and Acts::KDTree< Dims, Type, Scalar, Vector, LeafSize >::KDTreeNode::rangeSearchMapDiscard().

+ Here is the caller graph for this function:

template<std::size_t Dims, typename Type, template< typename, std::size_t > typename Vector = std::array>
bool Acts::RangeXD< Dims, Type, Vector >::degenerate ( void  ) const
inline

Determine whether this range is degenerate.

A degenerate multi-dimensional range has no volume and cannot contain any values. This is the case if any of its dimensions are degenerate.

Returns
true The range is degenerate
false The range is not degenerate

Definition at line 43 of file RangeXD.hpp.

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

Referenced by Acts::Test::BOOST_AUTO_TEST_CASE(), and Acts::RangeXD< binValues, ActsScalar >::degenerate().

+ Here is the caller graph for this function:

template<std::size_t Dims, typename Type, template< typename, std::size_t > typename Vector = std::array>
RangeXD<Dims, Type, Vector> Acts::RangeXD< Dims, Type, Vector >::operator& ( const RangeXD< Dims, Type, Vector > &  o) const
inline

Compute the intersection of this range with another range.

The intersection of one orthogonal range with another orthogonal range is in itself an orthogonal range. This operation is commutative. This intersection between two n-dimensional ranges is defined simply as the intersection in each dimension of the two ranges.

Parameters
oThe orthogonal range to compute the intersection with
Returns
The intersection between the ranges

Definition at line 159 of file RangeXD.hpp.

View newest version in sPHENIX GitHub at line 159 of file RangeXD.hpp

template<std::size_t Dims, typename Type, template< typename, std::size_t > typename Vector = std::array>
bool Acts::RangeXD< Dims, Type, Vector >::operator&& ( const RangeXD< Dims, Type, Vector > &  r) const
inline

Determine whether this range intersects another.

Two n-dimensional ranges intersect if and only if they intersect in every one of their n dimensions. Otherwise, they are disjoint.

Parameters
rThe other range to check
Returns
true The ranges intersect
false The ranges do not intersect

Definition at line 197 of file RangeXD.hpp.

View newest version in sPHENIX GitHub at line 197 of file RangeXD.hpp

template<std::size_t Dims, typename Type, template< typename, std::size_t > typename Vector = std::array>
RangeXD<Dims, Type, Vector>& Acts::RangeXD< Dims, Type, Vector >::operator&= ( const RangeXD< Dims, Type, Vector > &  o)
inline

Update the range to the intersection with another range.

This is the assignment version of the operator& method, meaning that it updates the object on which it is called rather than producing a new range.

Parameters
oThe range to compute the intersection with
Returns
This object

Definition at line 179 of file RangeXD.hpp.

View newest version in sPHENIX GitHub at line 179 of file RangeXD.hpp

template<std::size_t Dims, typename Type, template< typename, std::size_t > typename Vector = std::array>
bool Acts::RangeXD< Dims, Type, Vector >::operator<= ( const RangeXD< Dims, Type, Vector > &  o) const
inline

Determine whether one range is a subset of another range.

One range is a subset of another range if and only if all points contained within the first set are also contained within the second set. Alternatively, this is equivalent to each of the first range's one-dimensional ranges being a subset of the second range's equivalent one-dimensional range.

Parameters
oThe other range to compare to
Returns
true The first range is a subset of the second range
false The first range is not a subset of the second range

Definition at line 116 of file RangeXD.hpp.

View newest version in sPHENIX GitHub at line 116 of file RangeXD.hpp

template<std::size_t Dims, typename Type, template< typename, std::size_t > typename Vector = std::array>
bool Acts::RangeXD< Dims, Type, Vector >::operator== ( const RangeXD< Dims, Type, Vector > &  o) const
inline

Determine whether two ranges are equal.

Two n-dimensional ranges are equal if and only if they are equal in each of their n dimensions.

Parameters
oThe other range to check for equality
Returns
true The ranges are equal
false The ranges are not equal

Definition at line 94 of file RangeXD.hpp.

View newest version in sPHENIX GitHub at line 94 of file RangeXD.hpp

template<std::size_t Dims, typename Type, template< typename, std::size_t > typename Vector = std::array>
bool Acts::RangeXD< Dims, Type, Vector >::operator>= ( const RangeXD< Dims, Type, Vector > &  o) const
inline

Determine whether one range is a superset of another range.

One range is a superset of another range if and only if all points contained within the second range are also contained within the first range. Alternatively, this is equivalent to each of the one-dimensional ranges in the first range being a superset of the corresponding one-dimensional range in the second range.

Parameters
oThe other range to compare to
Returns
true The left-hand range is a superset of the right-hand range
false The left-hand range is not a superset of the right-hand range

Definition at line 139 of file RangeXD.hpp.

View newest version in sPHENIX GitHub at line 139 of file RangeXD.hpp

template<std::size_t Dims, typename Type, template< typename, std::size_t > typename Vector = std::array>
Range1D<Type>& Acts::RangeXD< Dims, Type, Vector >::operator[] ( const std::size_t &  i)
inline

Access one of the dimensional ranges of the volume.

Parameters
iThe index of the dimension to access
Returns
A reference to the dimension contained in this range

Definition at line 75 of file RangeXD.hpp.

View newest version in sPHENIX GitHub at line 75 of file RangeXD.hpp

template<std::size_t Dims, typename Type, template< typename, std::size_t > typename Vector = std::array>
const Range1D<Type>& Acts::RangeXD< Dims, Type, Vector >::operator[] ( const std::size_t &  i) const
inline

Access one of the dimensional ranges of the volume.

Parameters
iThe index of the dimension to access
Returns
A reference to the dimension contained in this range

Definition at line 81 of file RangeXD.hpp.

View newest version in sPHENIX GitHub at line 81 of file RangeXD.hpp

template<std::size_t Dims, typename Type, template< typename, std::size_t > typename Vector = std::array>
std::string Acts::RangeXD< Dims, Type, Vector >::toString ( void  ) const
inline

Represent the range as a string.

This method produces a helpful string that can be used to debug the range if needed. Not really designed to be used in production code.

Returns
A string representing the range

Definition at line 213 of file RangeXD.hpp.

View newest version in sPHENIX GitHub at line 213 of file RangeXD.hpp

Referenced by Acts::KDTreeTrackingGeometryBuilder::translateLayer().

+ Here is the caller graph for this function:

Member Data Documentation


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