Warning, file /acts/Examples/Framework/include/ActsExamples/EventData/IndexSourceLink.hpp was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009 #pragma once
0010
0011 #include "Acts/EventData/SourceLink.hpp"
0012 #include "ActsExamples/EventData/GeometryContainers.hpp"
0013 #include "ActsExamples/EventData/Index.hpp"
0014
0015 #include <utility>
0016
0017 namespace Acts {
0018 class Surface;
0019 class TrackingGeometry;
0020 }
0021
0022 namespace ActsExamples {
0023
0024 struct IndexSourceLinkSurfaceAccessor;
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035 class IndexSourceLink final {
0036 public:
0037 using SurfaceAccessor = IndexSourceLinkSurfaceAccessor;
0038
0039
0040 constexpr IndexSourceLink(Acts::GeometryIdentifier gid, Index idx)
0041 : m_geometryId(gid), m_index(idx) {}
0042
0043
0044
0045 IndexSourceLink() = default;
0046 IndexSourceLink(const IndexSourceLink&) = default;
0047 IndexSourceLink(IndexSourceLink&&) = default;
0048 IndexSourceLink& operator=(const IndexSourceLink&) = default;
0049 IndexSourceLink& operator=(IndexSourceLink&&) = default;
0050
0051
0052 constexpr Index index() const { return m_index; }
0053
0054 Acts::GeometryIdentifier geometryId() const { return m_geometryId; }
0055
0056 private:
0057 Acts::GeometryIdentifier m_geometryId;
0058 Index m_index = 0;
0059
0060 friend bool operator==(const IndexSourceLink& lhs,
0061 const IndexSourceLink& rhs) {
0062 return (lhs.geometryId() == rhs.geometryId()) &&
0063 (lhs.m_index == rhs.m_index);
0064 }
0065 };
0066
0067 struct IndexSourceLinkSurfaceAccessor {
0068 const Acts::TrackingGeometry& geometry;
0069
0070
0071
0072 const Acts::Surface* operator()(const Acts::SourceLink& sourceLink) const;
0073 };
0074
0075
0076
0077
0078
0079 struct IndexSourceLinkAccessor : GeometryIdMultisetAccessor<IndexSourceLink> {
0080 using BaseIterator = GeometryIdMultisetAccessor<IndexSourceLink>::Iterator;
0081
0082 using Iterator = Acts::SourceLinkAdapterIterator<BaseIterator>;
0083
0084
0085 std::pair<Iterator, Iterator> range(const Acts::Surface& surface) const;
0086 };
0087
0088 }