Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-06 08:10:04

0001 // This file is part of the Acts project.
0002 //
0003 // Copyright (C) 2021 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 http://mozilla.org/MPL/2.0/.
0008 
0009 #pragma once
0010 
0011 #include "Acts/Geometry/GeometryContext.hpp"
0012 #include "Acts/Navigation/NavigationState.hpp"
0013 #include "Acts/Utilities/Delegate.hpp"
0014 
0015 namespace Acts {
0016 
0017 class Surface;
0018 
0019 namespace Experimental {
0020 
0021 /// Base class for navigation delegates
0022 /// This allows to define a common Owning delegate
0023 /// schema, which in turn allows for accessing the holder
0024 /// of the delegate implementation for e.g. I/O or display
0025 class INavigationDelegate {
0026  public:
0027   virtual ~INavigationDelegate() = default;
0028 };
0029 
0030 /// Declare an updator for the local navigation, i.e. the
0031 /// navigation inside a detector volume. This can be called
0032 /// either directly after a volume switch or in order to update
0033 /// within a volume after some progression
0034 ///
0035 /// This delegate dispatches the local navigation action
0036 /// to a dedicated struct or function that is optimised for
0037 /// the given environment.
0038 ///
0039 /// @param gctx is the current geometry context
0040 /// @param nState [in,out] is the navigation state to be updated
0041 ///
0042 /// @note it relies on the detector volume to be set to the state
0043 /// Memory  managed navigation state updator
0044 using SurfaceCandidatesUpdater =
0045     OwningDelegate<void(const GeometryContext& gctx, NavigationState& nState),
0046                    INavigationDelegate>;
0047 
0048 /// Declare a Detctor Volume finding or switching delegate
0049 ///
0050 /// @param gctx is the current geometry context
0051 /// @param nState [in, out] is the navigation state to be updated
0052 ///
0053 /// @return the new DetectorVolume into which one changes at this switch
0054 using DetectorVolumeUpdater =
0055     OwningDelegate<void(const GeometryContext& gctx, NavigationState& nState),
0056                    INavigationDelegate>;
0057 
0058 }  // namespace Experimental
0059 }  // namespace Acts