15#include "Acts/Geometry/GeometryIdentifier.hpp"
16#include "Acts/Utilities/PointerTraits.hpp"
19#include <boost/container/flat_set.hpp>
25template <
typename ObjType>
27 { obj.geometryId() } -> std::same_as<Acts::GeometryIdentifier>;
30template <
typename ObjType>
35template <
typename ObjType>
36concept TimedObj =
requires(
const ObjType& obj) {
40template <
typename ObjType>
47 constexpr Acts::GeometryIdentifier
operator()(Acts::GeometryIdentifier geometryId)
const {
51 constexpr Acts::GeometryIdentifier
operator()(Acts::GeometryIdentifier::Value encoded)
const {
52 return Acts::GeometryIdentifier(encoded);
57 const std::pair<Acts::GeometryIdentifier, T>& mapItem)
const {
61 template <GeometryIdPtrObj T>
62 constexpr Acts::GeometryIdentifier
operator()(
const T& thing)
const {
63 return thing->geometryId();
66 template <GeometryIdObj T>
68 return thing.geometryId();
71 template <GeometryIdObj T>
72 inline auto operator()(std::reference_wrapper<T> thing)
const
73 ->
decltype(thing.get().geometryId(), Acts::GeometryIdentifier()) {
74 return thing.get().geometryId();
83 template <TimedObj Left, TimedObj Right>
84 constexpr bool operator()(
const Left& lhs,
const Right& rhs)
const {
88 return lhs.time() < rhs.time();
92 template <TimedObjPtr Left, TimedObjPtr Right>
93 constexpr bool operator()(
const Left& lhs,
const Right& rhs)
const {
94 return (*
this)(*lhs, *rhs);
97 template <
typename Left,
typename Right>
98 constexpr bool operator()(Left&& lhs, Right&& rhs)
const {
123 return makeRange(container.equal_range(geoId));
129 Acts::GeometryIdentifier::Value volume,
130 Acts::GeometryIdentifier::Value layer,
131 Acts::GeometryIdentifier::Value sensitive) {
134 Acts::GeometryIdentifier().withVolume(volume).withLayer(layer).withSensitive(sensitive));
144 using Key = Acts::GeometryIdentifier;
A wrapper around a pair of iterators to simplify range-based loops.
Definition Range.hpp:27
Concept to define objects that have a geometryId getter method.
Definition GeometryContainers.hpp:26
Concept to define objects to pointer that have a geometryId getter method.
Definition GeometryContainers.hpp:31
Concept to define a pointer to an object which carries time.
Definition GeometryContainers.hpp:41
Concept to define an object which carries time.
Definition GeometryContainers.hpp:36
Definition GeometryContainers.hpp:23
Definition GeometryContainers.hpp:22
Range< typename GeometryIdMultiset< T >::const_iterator > selectModule(const GeometryIdMultiset< T > &container, Acts::GeometryIdentifier geoId)
Select all elements for the given module / sensitive surface.
Definition GeometryContainers.hpp:120
boost::container::flat_multiset< T, detail::CompareGeometryId > GeometryIdMultiset
Store elements that know their detector geometry id, e.g.
Definition GeometryContainers.hpp:116
Range< Iterator > makeRange(const Iterator &begin, const Iterator &end)
Definition Range.hpp:46
The accessor for the GeometryIdMultiset container.
Definition GeometryContainers.hpp:142
typename GeometryIdMultiset< T >::value_type Value
Definition GeometryContainers.hpp:145
Acts::GeometryIdentifier Key
Definition GeometryContainers.hpp:144
typename GeometryIdMultiset< T >::const_iterator Iterator
Definition GeometryContainers.hpp:146
const Container * container
Definition GeometryContainers.hpp:149
GeometryIdMultiset< T > Container
Definition GeometryContainers.hpp:143
Definition GeometryContainers.hpp:78
constexpr bool operator()(const Left &lhs, const Right &rhs) const
Comparator that sorts objects with the same geometry id by time.
Definition GeometryContainers.hpp:84
constexpr bool operator()(Left &&lhs, Right &&rhs) const
Definition GeometryContainers.hpp:98
void is_transparent
Definition GeometryContainers.hpp:80
Definition GeometryContainers.hpp:45
constexpr Acts::GeometryIdentifier operator()(Acts::GeometryIdentifier geometryId) const
Definition GeometryContainers.hpp:47
constexpr Acts::GeometryIdentifier operator()(const std::pair< Acts::GeometryIdentifier, T > &mapItem) const
Definition GeometryContainers.hpp:56
auto operator()(const T &thing) const
Definition GeometryContainers.hpp:67
constexpr Acts::GeometryIdentifier operator()(Acts::GeometryIdentifier::Value encoded) const
Definition GeometryContainers.hpp:51
constexpr Acts::GeometryIdentifier operator()(const T &thing) const
Definition GeometryContainers.hpp:62
auto operator()(std::reference_wrapper< T > thing) const -> decltype(thing.get().geometryId(), Acts::GeometryIdentifier())
Definition GeometryContainers.hpp:72