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

#include <acts/blob/sPHENIX/Core/include/Acts/Geometry/Extent.hpp>

+ Collaboration diagram for Acts::Extent:

Public Member Functions

 Extent (const ExtentEnvelope &envelope=zeroEnvelopes)
 Constructor with (optional)
 
bool operator== (const Extent &e) const
 Define a comparison operator.
 
bool operator!= (const Extent &e) const
 Define a comparison operator.
 
void extend (const Vector3 &vtx, const std::vector< BinningValue > &bValues=s_binningValues, bool applyEnv=true, bool fillHistograms=false)
 
template<typename vector_iterator_t >
void extend (const vector_iterator_t &start, const vector_iterator_t &end, const std::vector< BinningValue > &bValues=s_binningValues, bool applyEnv=true, bool fillHistograms=false)
 
void extend (const Extent &rhs, const std::vector< BinningValue > &bValues=s_binningValues, bool applyEnv=true)
 
void addConstrain (const Extent &rhs, const ExtentEnvelope &envelope=zeroEnvelopes)
 
void set (BinningValue bValue, ActsScalar min, ActsScalar max)
 
void setEnvelope (const ExtentEnvelope &envelope=zeroEnvelopes)
 
Range1D< ActsScalar > & range (BinningValue bValue)
 
const Range1D< ActsScalar > & range (BinningValue bValue) const
 
const RangeXD< binValues,
ActsScalar
range () const
 Return the N-dimension range.
 
template<unsigned int kSUBDIM>
RangeXD< kSUBDIM, ActsScalarrange (const std::array< BinningValue, kSUBDIM > &binValues) const
 
ExtentEnvelopeenvelope ()
 Return the envelope - non-const access.
 
const ExtentEnvelopeenvelope () const
 Return the envelope - const access.
 
const std::array< std::vector
< ActsScalar >, binValues > & 
valueHistograms () const
 
ActsScalar min (BinningValue bValue) const
 
ActsScalar max (BinningValue bValue) const
 
ActsScalar medium (BinningValue bValue) const
 
ActsScalar interval (BinningValue bValue) const
 
bool contains (const Extent &rhs, BinningValue bValue=binValues) const
 
bool intersects (const Extent &rhs, BinningValue bValue=binValues) const
 
bool constrains (BinningValue bValue=binValues) const
 
std::string toString (const std::string &indent="") const
 

Private Attributes

std::bitset< binValuesm_constrains {0}
 A bitset that remembers the constraint values.
 
RangeXD< binValues, ActsScalarm_range
 The actual range store.
 
ExtentEnvelope m_envelope = zeroEnvelopes
 A potential envelope.
 
std::array< std::vector
< ActsScalar >, binValues
m_valueHistograms
 (Optional) Value histograms for bin detection
 

Detailed Description

A class representing the geometric extent of an object in its possible dimensions, these can be all dimensions that are described as BinningValues

The extent object can have an optional envelope in all of those values

Note
that the consistency of the different envelopes is not checked

Definition at line 41 of file Extent.hpp.

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

Constructor & Destructor Documentation

Acts::Extent::Extent ( const ExtentEnvelope envelope = zeroEnvelopes)

Constructor with (optional)

Parameters
envelope

Definition at line 19 of file Extent.cpp.

View newest version in sPHENIX GitHub at line 19 of file Extent.cpp

References Acts::binMag, Acts::binPhi, Acts::binR, Acts::binRPhi, and m_range.

Member Function Documentation

void Acts::Extent::addConstrain ( const Extent rhs,
const ExtentEnvelope envelope = zeroEnvelopes 
)

Constrain an extent by another one, this is

  • values that are already constrained are not touched
  • values not constrained by
    Parameters
    rhsare not touched
  • values that are constrained by the external one, but not by the current one, are touched
Parameters
envelopean envelope applied to the constrained value

Definition at line 82 of file Extent.cpp.

View newest version in sPHENIX GitHub at line 82 of file Extent.cpp

References constrains(), range(), Acts::s_binningValues, Acts::Range1D< Type >::setMin(), and physmon_ckf_tracking::u.

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

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool Acts::Extent::constrains ( BinningValue  bValue = binValues) const

Constraints check

Parameters
bValueis the binning value, if all the check on all is done

Definition at line 151 of file Extent.cpp.

View newest version in sPHENIX GitHub at line 151 of file Extent.cpp

References Acts::binValues.

Referenced by addConstrain(), Acts::Experimental::detail::SupportHelper::addSupport(), Acts::Test::BOOST_AUTO_TEST_CASE(), extend(), intersects(), Acts::isEqual(), and Acts::to_json().

+ Here is the caller graph for this function:

bool Acts::Extent::contains ( const Extent rhs,
BinningValue  bValue = binValues 
) const

Contains check

Parameters
rhsthe extent that is check if it is contained
bValueis the binning value, if set to binValues the check on all is done
Returns
true if the rhs is contained

Definition at line 107 of file Extent.cpp.

View newest version in sPHENIX GitHub at line 107 of file Extent.cpp

References Acts::binValues, and range().

+ Here is the call graph for this function:

ExtentEnvelope & Acts::Extent::envelope ( )
inline

Return the envelope - non-const access.

Definition at line 236 of file Extent.hpp.

View newest version in sPHENIX GitHub at line 236 of file Extent.hpp

References m_envelope.

Referenced by extend(), Acts::to_json(), and Acts::KDTreeTrackingGeometryBuilder::translateLayer().

+ Here is the caller graph for this function:

const ExtentEnvelope & Acts::Extent::envelope ( ) const
inline

Return the envelope - const access.

Definition at line 240 of file Extent.hpp.

View newest version in sPHENIX GitHub at line 240 of file Extent.hpp

References m_envelope.

void Acts::Extent::extend ( const Vector3 vtx,
const std::vector< BinningValue > &  bValues = s_binningValues,
bool  applyEnv = true,
bool  fillHistograms = false 
)

Extend with a position vertex

Parameters
vtxthe vertex to be used for extending
bValuesthe binning values
applyEnvboolean to steer if envelope should be applied
fillHistogramsis a boolean flag to steer whether the values to fill this extent should be stored

Definition at line 31 of file Extent.cpp.

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

References Acts::binR, and Acts::VectorHelpers::cast().

Referenced by Acts::BinnedSPGroup< external_spacepoint_t >::BinnedSPGroup(), Acts::Test::BOOST_AUTO_TEST_CASE(), Acts::Experimental::LayerStructureBuilder::construct(), Acts::Svg::IndexedSurfacesConverter::convertImpl(), Acts::SeedFinderOrthogonal< external_spacepoint_t >::createSeeds(), Acts::GeometryView3D::drawSurfaceArray(), extend(), Acts::ProtoVolume::extendUp(), Acts::Polyhedron::extent(), Acts::Experimental::DetectorVolume::extent(), PHActsSiliconSeeding::getSiliconSpacePoints(), and Acts::ProtoLayer::measure().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<typename vector_iterator_t >
void Acts::Extent::extend ( const vector_iterator_t &  start,
const vector_iterator_t &  end,
const std::vector< BinningValue > &  bValues = s_binningValues,
bool  applyEnv = true,
bool  fillHistograms = false 
)
inline

Extend with a set of vectors by iterators

Parameters
startthe start iterator of the loop
endthe end iterator of the loop
bValuesthe binning values
applyEnvboolean to steer if envelope should be applied
fillHistogramsis a boolean flag to steer whether the values to fill this extent should be stored

Definition at line 72 of file Extent.hpp.

View newest version in sPHENIX GitHub at line 72 of file Extent.hpp

References end, and extend().

+ Here is the call graph for this function:

void Acts::Extent::extend ( const Extent rhs,
const std::vector< BinningValue > &  bValues = s_binningValues,
bool  applyEnv = true 
)

Extend with another geometric extent, usually pushes the current range to the boundaries of the rhs extent, unless the current extent is already bigger.

Note
the extent can also simply set an envelope which then is applied to the current one
Parameters
rhsis the other source Extent
bValuesthe binning values
applyEnvboolean to steer if envelope should be applied on the constraint values, if only an envelope is given but the value not constraint, then it is always applied
Note
that the histogram values can not be filled in this call

Definition at line 57 of file Extent.cpp.

View newest version in sPHENIX GitHub at line 57 of file Extent.cpp

References constrains(), envelope(), Acts::Range1D< Type >::max(), Acts::UnitConstants::min, Acts::Range1D< Type >::min(), range(), and Acts::zeroEnvelope.

+ Here is the call graph for this function:

bool Acts::Extent::intersects ( const Extent rhs,
BinningValue  bValue = binValues 
) const

Intersection checks

Parameters
rhsthe extent that is check for intersection
bValueis the binning value, if set to binValues the check on all is done
Returns
true if the rhs intersects

Definition at line 129 of file Extent.cpp.

View newest version in sPHENIX GitHub at line 129 of file Extent.cpp

References Acts::binValues, constrains(), and range().

+ Here is the call graph for this function:

ActsScalar Acts::Extent::interval ( BinningValue  bValue) const
inline

Access the parameter interval (i.e. the range span)

Parameters
bValuethe binning identification

Definition at line 180 of file Extent.hpp.

View newest version in sPHENIX GitHub at line 180 of file Extent.hpp

References m_range.

ActsScalar Acts::Extent::max ( BinningValue  bValue) const
inline

Access the maximum parameter

Parameters
bValuethe binning identification

Definition at line 168 of file Extent.hpp.

View newest version in sPHENIX GitHub at line 168 of file Extent.hpp

References m_range.

Referenced by Acts::Experimental::detail::SupportHelper::addSupport(), BOOST_AUTO_TEST_CASE(), Acts::Test::BOOST_AUTO_TEST_CASE(), Acts::SeedFinderOrthogonal< external_spacepoint_t >::createSeeds(), Acts::isEqual(), and Acts::ProtoLayer::max().

+ Here is the caller graph for this function:

ActsScalar Acts::Extent::medium ( BinningValue  bValue) const
inline

Access the midpoint

Parameters
bValuethe binning identification

Definition at line 173 of file Extent.hpp.

View newest version in sPHENIX GitHub at line 173 of file Extent.hpp

References m_range.

Referenced by Acts::Svg::IndexedSurfacesConverter::convertImpl(), Acts::GeometryView3D::drawSurfaceArray(), Acts::Polyhedron::extent(), and medinit().

+ Here is the caller graph for this function:

ActsScalar Acts::Extent::min ( BinningValue  bValue) const
inline

Access the minimum parameter

Parameters
bValuethe binning identification

Definition at line 163 of file Extent.hpp.

View newest version in sPHENIX GitHub at line 163 of file Extent.hpp

References m_range.

Referenced by Acts::Experimental::detail::SupportHelper::addSupport(), BOOST_AUTO_TEST_CASE(), Acts::Test::BOOST_AUTO_TEST_CASE(), Acts::SeedFinderOrthogonal< external_spacepoint_t >::createSeeds(), Acts::isEqual(), Acts::ProtoLayer::min(), and Acts::SurfaceBinningMatcher::operator()().

+ Here is the caller graph for this function:

bool Acts::Extent::operator!= ( const Extent e) const
inline

Define a comparison operator.

Definition at line 50 of file Extent.hpp.

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

bool Acts::Extent::operator== ( const Extent e) const

Define a comparison operator.

Definition at line 158 of file Extent.cpp.

View newest version in sPHENIX GitHub at line 158 of file Extent.cpp

References m_constrains, m_envelope, m_range, and m_valueHistograms.

Range1D< ActsScalar > & Acts::Extent::range ( BinningValue  bValue)
inline

Return the individual 1-dimensional range

Parameters
bValueis the binning value to be returned
Returns
a one dimensional arrange

Definition at line 223 of file Extent.hpp.

View newest version in sPHENIX GitHub at line 223 of file Extent.hpp

Referenced by addConstrain(), Acts::Test::BOOST_FIXTURE_TEST_CASE(), Acts::DD4hepLayerBuilder::centralLayers(), contains(), Acts::Svg::IndexedSurfacesConverter::convertImpl(), Acts::DD4hepLayerBuilder::endcapLayers(), extend(), Acts::Polyhedron::extent(), intersects(), Acts::Experimental::KdtSurfaces< kDIM, bSize, reference_generator >::surfaces(), Acts::to_json(), Acts::KDTreeTrackingGeometryBuilder::translateLayer(), and Acts::KDTreeTrackingGeometryBuilder::translateVolume().

+ Here is the caller graph for this function:

const Range1D< ActsScalar > & Acts::Extent::range ( BinningValue  bValue) const
inline

Return the individual 1-dimensional range

Parameters
bValueis the binning value to be returned
Returns
a one dimensional arrange

Definition at line 227 of file Extent.hpp.

View newest version in sPHENIX GitHub at line 227 of file Extent.hpp

const RangeXD< binValues, ActsScalar > Acts::Extent::range ( ) const
inline

Return the N-dimension range.

Definition at line 232 of file Extent.hpp.

View newest version in sPHENIX GitHub at line 232 of file Extent.hpp

References m_range.

Referenced by range().

+ Here is the caller graph for this function:

template<unsigned int kSUBDIM>
RangeXD<kSUBDIM, ActsScalar> Acts::Extent::range ( const std::array< BinningValue, kSUBDIM > &  binValues) const
inline

Return an D-dimensional sub range according to the the given

Parameters
binValues

Definition at line 140 of file Extent.hpp.

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

References Acts::enumerate(), i, range(), and testSigmaEff::v.

+ Here is the call graph for this function:

void Acts::Extent::set ( BinningValue  bValue,
ActsScalar  min,
ActsScalar  max 
)

Set a range for a dedicated binning value

Parameters
bValuethe binning identification
minthe minimum parameter
maxthe maximum parameter

Definition at line 94 of file Extent.cpp.

View newest version in sPHENIX GitHub at line 94 of file Extent.cpp

References Acts::binR, Acts::UnitConstants::min, and Acts::Range1D< Type >::set().

Referenced by Acts::Python::addGeometry(), Acts::Test::BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), Acts::from_json(), and Acts::ProtoVolume::harmonize().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Acts::Extent::setEnvelope ( const ExtentEnvelope envelope = zeroEnvelopes)

(re-)Set the envelope

Parameters
envelopenew envelope to be set

Definition at line 103 of file Extent.cpp.

View newest version in sPHENIX GitHub at line 103 of file Extent.cpp

Referenced by Acts::from_json().

+ Here is the caller graph for this function:

std::string Acts::Extent::toString ( const std::string &  indent = "") const

Convert to output stream for screen output

Parameters
indentindentation for the screen display

Definition at line 174 of file Extent.cpp.

View newest version in sPHENIX GitHub at line 174 of file Extent.cpp

References Acts::binningValueNames(), Acts::binValues, and add_histos_bX::ib.

Referenced by Acts::operator<<(), and Acts::ProtoLayer::toStream().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

const std::array< std::vector< ActsScalar >, binValues > & Acts::Extent::valueHistograms ( ) const
inline

Return the histogram store

The histogram store can be used for automated binning detection

Definition at line 245 of file Extent.hpp.

View newest version in sPHENIX GitHub at line 245 of file Extent.hpp

References m_valueHistograms.

Member Data Documentation

std::bitset<binValues> Acts::Extent::m_constrains {0}
private

A bitset that remembers the constraint values.

Definition at line 214 of file Extent.hpp.

View newest version in sPHENIX GitHub at line 214 of file Extent.hpp

Referenced by operator==().

ExtentEnvelope Acts::Extent::m_envelope = zeroEnvelopes
private

A potential envelope.

Definition at line 218 of file Extent.hpp.

View newest version in sPHENIX GitHub at line 218 of file Extent.hpp

Referenced by envelope(), and operator==().

RangeXD<binValues, ActsScalar> Acts::Extent::m_range
private

The actual range store.

Definition at line 216 of file Extent.hpp.

View newest version in sPHENIX GitHub at line 216 of file Extent.hpp

Referenced by Extent(), interval(), max(), medium(), min(), operator==(), and range().

std::array<std::vector<ActsScalar>, binValues> Acts::Extent::m_valueHistograms
private

(Optional) Value histograms for bin detection

Definition at line 220 of file Extent.hpp.

View newest version in sPHENIX GitHub at line 220 of file Extent.hpp

Referenced by operator==(), and valueHistograms().


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