Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-14 09:20:33

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/Geometry/TrackingGeometryVisitor.hpp"
0012 #include "Acts/Utilities/BoundFactory.hpp"
0013 
0014 namespace Acts::detail {
0015 /// @brief Tracking geometry visitor that deduplicates the bounds of Surfaces &
0016 ///        TrackingVolumes. E.g., if two PlaneSurfaces have each a
0017 ///        RectangularBounds object with (10.cm, 5.cm), the visitor ensures that
0018 ///        there is only one instance of with these parameters and that both
0019 ///        surfaces hold this pointer. The same logic applies to the sharing
0020 ///        of the TrackingVolumeBounds
0021 class BoundDeduplicator : public TrackingGeometryMutableVisitor {
0022  public:
0023   /// @brief Visit and potentially modify a tracking volume
0024   /// @param volume The tracking volume being visited
0025   /// @note Called for each volume in the geometry hierarchy during traversal
0026   void visitVolume(TrackingVolume& volume) final;
0027 
0028   /// @brief Visit and potentially modify a portal
0029   /// @param portal The portal being visited
0030   /// @note Called for each portal encountered during geometry traversal
0031   void visitPortal(Portal& portal) final;
0032 
0033   /// @brief Visit and potentially modify a surface
0034   /// @param surface The surface being visited
0035   /// @note Called for each surface encountered during geometry traversal
0036   void visitSurface(Surface& surface) final;
0037   /// @brief Visit and potentially modify a boundary surface
0038   /// @param boundary The boundary surface being visited
0039   /// @note Called for each boundary surface encountered during geometry traversal
0040   void visitBoundarySurface(BoundarySurfaceT<TrackingVolume>& boundary) final;
0041 
0042  private:
0043   SurfaceBoundFactory m_surfFactory;
0044   VolumeBoundFactory m_volFactory;
0045 };
0046 }  // namespace Acts::detail