Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-08-06 08:13:32

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/Definitions/Algebra.hpp"
0012 #include "Acts/Geometry/GeometryContext.hpp"
0013 #include "Acts/Geometry/GeometryIdentifier.hpp"
0014 #include "Acts/Geometry/TrackingGeometry.hpp"
0015 #include "ActsExamples/EventData/GeometryContainers.hpp"
0016 
0017 #include <memory>
0018 #include <unordered_map>
0019 #include <vector>
0020 
0021 namespace Acts {
0022 class Surface;
0023 }
0024 
0025 namespace ActsExamples {
0026 
0027 /// StructureSelector is a utility class to select a specific structure
0028 class StructureSelector {
0029  public:
0030   /// Constructor
0031   /// @param trackingGeometry The tracking geometry to select from
0032   explicit StructureSelector(
0033       std::shared_ptr<const Acts::TrackingGeometry> trackingGeometry);
0034 
0035   /// Select a structure by its identifier
0036   /// @param geoId The identifier of the structure to select
0037   /// @return A vector of pointers to the selected surfaces
0038   std::vector<std::shared_ptr<const Acts::Surface>> selectSurfaces(
0039       const Acts::GeometryIdentifier& geoId) const;
0040 
0041   /// Select a structure by its identified transforms
0042   /// @param gctx The geometry context
0043   /// @param geoId The geometry identifier of the structure to select
0044   /// @return an unordered map of geometry identifiers to transforms
0045   std::unordered_map<Acts::GeometryIdentifier, Acts::Transform3>
0046   selectedTransforms(const Acts::GeometryContext& gctx,
0047                      const Acts::GeometryIdentifier& geoId) const;
0048 
0049  private:
0050   std::shared_ptr<const Acts::TrackingGeometry> m_trackingGeometry;
0051   GeometryIdMultiset<std::shared_ptr<const Acts::Surface>> m_surfaceMultiSet;
0052 };
0053 }  // namespace ActsExamples