ECCE @ EIC Software
Reference for
ECCE @ EIC
simulation and reconstruction software on GitHub
|
#include <acts/blob/master/Core/include/Acts/Geometry/HierarchicalGeometryContainer.hpp>
Public Types | |
using | Iterator = typename std::vector< value_t >::const_iterator |
using | Size = typename std::vector< value_t >::size_type |
using | Value = value_t |
Public Member Functions | |
template<typename id_getter_t = detail::DefaultGeometryIdGetter> | |
HierarchicalGeometryContainer (std::vector< Value > &&elements, id_getter_t getId=id_getter_t()) | |
HierarchicalGeometryContainer ()=default | |
HierarchicalGeometryContainer (const HierarchicalGeometryContainer &)=default | |
HierarchicalGeometryContainer (HierarchicalGeometryContainer &&)=default | |
~HierarchicalGeometryContainer ()=default | |
HierarchicalGeometryContainer & | operator= (const HierarchicalGeometryContainer &)=default |
HierarchicalGeometryContainer & | operator= (HierarchicalGeometryContainer &&)=default |
Iterator | begin () const |
Return an iterator pointing to the beginning of the stored elements. | |
Iterator | end () const |
Return an iterator pointing to the end of the stored elements. | |
bool | empty () const |
Check if any elements are stored. | |
Size | size () const |
Return the number of stored elements. | |
Iterator | find (GeometryID id) const |
Private Types | |
using | Identifier = GeometryID::Value |
Private Member Functions | |
template<typename id_getter_t > | |
void | fillLookup (id_getter_t getId) |
Static Private Member Functions | |
static constexpr Identifier | makeLeadingLevelsMask (GeometryID id) |
Construct a mask where all leading non-zero levels are set. | |
static constexpr Identifier | makeHighestLevelMask () |
Construct a mask where only the highest level is set. | |
static constexpr bool | equalWithinMask (Identifier lhs, Identifier rhs, Identifier mask) |
Compare the two identifiers only within the masked bits. | |
Private Attributes | |
std::vector< Value > | m_elements |
std::vector< Identifier > | m_ids |
std::vector< Identifier > | m_masks |
Store homogeneous elements anchored in the geometry hierarchy.
value_t | stored element type |
Trailing zero components of stored geometry identifiers are used as broadcast values to refer to higher-level objects within the geometry, e.g. a geometry identifier with vanishing approach and sensitive index refers to a the full layer. All stored geometry identifiers must set at least the highest hierarchy level.
The container supports range-based iteration over all stored elements
for (const auto& element : container) { ... }
and finding an equivalent element for a given identifier
auto it = container.find(GeometryID(...)); if (it != container.end()) { ... }
Adding elements is potentially expensive as the internal ordering must be reestablished every time an element is added. In addition, modifying an element in-place can potentially change its identifier which would also break the interal ordering. Thus, the container can not be modified after construction to prevent misuse.
Definition at line 52 of file HierarchicalGeometryContainer.hpp.
View newest version in sPHENIX GitHub at line 52 of file HierarchicalGeometryContainer.hpp
|
private |
Definition at line 99 of file HierarchicalGeometryContainer.hpp.
View newest version in sPHENIX GitHub at line 99 of file HierarchicalGeometryContainer.hpp
using Acts::HierarchicalGeometryContainer< value_t >::Iterator = typename std::vector<value_t>::const_iterator |
Definition at line 54 of file HierarchicalGeometryContainer.hpp.
View newest version in sPHENIX GitHub at line 54 of file HierarchicalGeometryContainer.hpp
using Acts::HierarchicalGeometryContainer< value_t >::Size = typename std::vector<value_t>::size_type |
Definition at line 55 of file HierarchicalGeometryContainer.hpp.
View newest version in sPHENIX GitHub at line 55 of file HierarchicalGeometryContainer.hpp
using Acts::HierarchicalGeometryContainer< value_t >::Value = value_t |
Definition at line 56 of file HierarchicalGeometryContainer.hpp.
View newest version in sPHENIX GitHub at line 56 of file HierarchicalGeometryContainer.hpp
|
inline |
Construct the container from the given elements.
elements | input elements (must be unique with respect to identifier) |
getId | functor to retrieve the id of an element |
id_getter_t | Functor type to retrieve the id of an element |
Definition at line 165 of file HierarchicalGeometryContainer.hpp.
View newest version in sPHENIX GitHub at line 165 of file HierarchicalGeometryContainer.hpp
References Acts::HierarchicalGeometryContainer< value_t >::fillLookup(), and Acts::HierarchicalGeometryContainer< value_t >::m_elements.
|
default |
|
default |
|
default |
|
default |
|
inline |
Return an iterator pointing to the beginning of the stored elements.
Definition at line 79 of file HierarchicalGeometryContainer.hpp.
View newest version in sPHENIX GitHub at line 79 of file HierarchicalGeometryContainer.hpp
References Acts::HierarchicalGeometryContainer< value_t >::m_elements.
|
inline |
Check if any elements are stored.
Definition at line 83 of file HierarchicalGeometryContainer.hpp.
View newest version in sPHENIX GitHub at line 83 of file HierarchicalGeometryContainer.hpp
References Acts::HierarchicalGeometryContainer< value_t >::m_elements.
|
inline |
Return an iterator pointing to the end of the stored elements.
Definition at line 81 of file HierarchicalGeometryContainer.hpp.
View newest version in sPHENIX GitHub at line 81 of file HierarchicalGeometryContainer.hpp
References Acts::HierarchicalGeometryContainer< value_t >::m_elements.
Referenced by luupda(), pydump(), pylhef(), pyslha(), pyupda(), upevnt(), and upinit().
|
inlinestaticprivate |
Compare the two identifiers only within the masked bits.
Definition at line 140 of file HierarchicalGeometryContainer.hpp.
View newest version in sPHENIX GitHub at line 140 of file HierarchicalGeometryContainer.hpp
References mask.
|
inlineprivate |
Fill the lookup containers from the current values.
id_getter_t | Functor type to retrieve the id of an element |
Definition at line 149 of file HierarchicalGeometryContainer.hpp.
View newest version in sPHENIX GitHub at line 149 of file HierarchicalGeometryContainer.hpp
References Acts::HierarchicalGeometryContainer< value_t >::m_elements, Acts::HierarchicalGeometryContainer< value_t >::m_ids, Acts::HierarchicalGeometryContainer< value_t >::m_masks, and Acts::HierarchicalGeometryContainer< value_t >::makeLeadingLevelsMask().
Referenced by Acts::HierarchicalGeometryContainer< value_t >::HierarchicalGeometryContainer().
|
inline |
Find the most specific element for a given geometry identifier.
This can be either the element matching exactly to the given geometry id, if it exists, or the element from the next available higher level within the geometry hierachy.
id | geometry identifier for which information is requested |
iterator | to an existing element |
<tt>.end()</tt> | iterator if no matching element exists |
Definition at line 186 of file HierarchicalGeometryContainer.hpp.
View newest version in sPHENIX GitHub at line 186 of file HierarchicalGeometryContainer.hpp
References it.
|
inlinestaticprivate |
Construct a mask where only the highest level is set.
Definition at line 136 of file HierarchicalGeometryContainer.hpp.
View newest version in sPHENIX GitHub at line 136 of file HierarchicalGeometryContainer.hpp
References Acts::HierarchicalGeometryContainer< value_t >::makeLeadingLevelsMask(), and Acts::UnitConstants::u.
|
inlinestaticprivate |
Construct a mask where all leading non-zero levels are set.
Definition at line 109 of file HierarchicalGeometryContainer.hpp.
View newest version in sPHENIX GitHub at line 109 of file HierarchicalGeometryContainer.hpp
References G4TTL::layer, mask, and Acts::UnitConstants::u.
Referenced by Acts::HierarchicalGeometryContainer< value_t >::fillLookup(), and Acts::HierarchicalGeometryContainer< value_t >::makeHighestLevelMask().
|
default |
|
default |
|
inline |
Return the number of stored elements.
Definition at line 85 of file HierarchicalGeometryContainer.hpp.
View newest version in sPHENIX GitHub at line 85 of file HierarchicalGeometryContainer.hpp
References Acts::HierarchicalGeometryContainer< value_t >::m_elements.
|
private |
Definition at line 101 of file HierarchicalGeometryContainer.hpp.
View newest version in sPHENIX GitHub at line 101 of file HierarchicalGeometryContainer.hpp
Referenced by Acts::HierarchicalGeometryContainer< value_t >::begin(), Acts::HierarchicalGeometryContainer< value_t >::empty(), Acts::HierarchicalGeometryContainer< value_t >::end(), Acts::HierarchicalGeometryContainer< value_t >::fillLookup(), Acts::HierarchicalGeometryContainer< value_t >::HierarchicalGeometryContainer(), and Acts::HierarchicalGeometryContainer< value_t >::size().
|
private |
Definition at line 104 of file HierarchicalGeometryContainer.hpp.
View newest version in sPHENIX GitHub at line 104 of file HierarchicalGeometryContainer.hpp
Referenced by Acts::HierarchicalGeometryContainer< value_t >::fillLookup().
|
private |
Definition at line 106 of file HierarchicalGeometryContainer.hpp.
View newest version in sPHENIX GitHub at line 106 of file HierarchicalGeometryContainer.hpp
Referenced by Acts::HierarchicalGeometryContainer< value_t >::fillLookup().