Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-04-17 07:46:19

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/GeometryContext.hpp"
0012 #include "Acts/Geometry/TrackingGeometryVisitor.hpp"
0013 #include "Acts/Geometry/TrackingVolume.hpp"
0014 #include "Acts/Utilities/Logger.hpp"
0015 
0016 namespace Acts::detail {
0017 /// TrackingGeometry visitor that connects the portal surfaces of the
0018 /// alignable volume with the volume's alignment system (cf.
0019 /// VolumePlacementBase) The portal surfaces of the alignable volumes are
0020 /// collected based on the geometry identifier and then parsed to the
0021 /// VolumePlacementBase which takes over and creates the backend caches
0022 /// for their aligned transform
0023 class AlignablePortalVisitor final : public TrackingGeometryMutableVisitor {
0024  public:
0025   /// Standard constructor taking the geometry context with the current
0026   /// alignment
0027   /// @param gctx : Geometry context containing the current alignment configuration
0028   /// @param logger: Reference to the logger of the object calling the visitor
0029   AlignablePortalVisitor(const GeometryContext& gctx, const Logger& logger);
0030   ///  Enables the visitor's inspection mode. The transforms of the portals
0031   ///  before and after the alignment procedure are required to be
0032   ///  equivalent Warnings are printed if the tracking volume contains
0033   ///  un-aligneable subvolumes
0034   void enableInspection();
0035   /// Visit and potentially modify a tracking volume
0036   /// @param volume The tracking volume being visited
0037   /// @note Called for each volume in the geometry hierarchy during traversal
0038   void visitVolume(TrackingVolume& volume) override;
0039 
0040  private:
0041   ///  The construction geometry context connected to the experiment's alignment
0042   const GeometryContext m_gctx;
0043   ///  Pointer to the held logger object
0044   const Logger& m_logger;
0045   ///  Inspect the portal transforms
0046   bool m_doInspect{false};
0047   ///  Return the reference to the logger object
0048   const Logger& logger() const;
0049 };
0050 
0051 }  // namespace Acts::detail