|
|
|||
File indexing completed on 2026-10-09 08:27:23
0001 // This file is part of the ACTS project. 0002 // 0003 // Copyright (C) 2016 CERN for the benefit of the ACTS project 0004 // 0005 // This Source Code Form is subject to the terms of the Mozilla Public 0006 // License, v. 2.0. If a copy of the MPL was not distributed with this 0007 // file, You can obtain one at https://mozilla.org/MPL/2.0/. 0008 0009 #pragma once 0010 0011 #include "Acts/Material/TrackingGeometryMaterial.hpp" 0012 0013 #include <optional> 0014 #include <span> 0015 0016 namespace Acts { 0017 class Surface; 0018 } 0019 0020 namespace Acts::detail { 0021 0022 /// Discover a stable assignment key on a designator placeholder. 0023 const std::optional<std::string>& materialKey(const ISurfaceMaterial* material); 0024 0025 /// Validated identities of material surfaces in one completed geometry. 0026 /// Repeated visits to the same surface are deduplicated. Distinct surfaces 0027 /// must have distinct IDs and, where configured, distinct keys. 0028 class MaterialSurfaceRegistry { 0029 public: 0030 /// Construct a registry for the participating material surfaces. 0031 /// @param surfaces Surfaces to validate, which must outlive the registry 0032 explicit MaterialSurfaceRegistry(std::span<const Surface* const> surfaces); 0033 0034 /// Surfaces by geometry identifier 0035 const std::map<GeometryIdentifier, const Surface*>& surfaces() const { 0036 return m_surfaces; 0037 } 0038 0039 /// Convert finalized ID-based mapping output to persistent assignments. 0040 /// @param materials Finalized mapping output 0041 TrackingGeometryMaterial materialMaps(SurfaceMaterialMaps materials) const; 0042 0043 private: 0044 std::map<GeometryIdentifier, const Surface*> m_surfaces; 0045 std::map<GeometryIdentifier, std::optional<std::string>> m_keys; 0046 }; 0047 0048 } // namespace Acts::detail
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|