Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-07-13 07:50:16

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/Definitions/Direction.hpp"
0013 #include "Acts/Propagator/NavigationTarget.hpp"
0014 #include "Acts/Propagator/NavigatorOptions.hpp"
0015 #include "Acts/Propagator/NavigatorStatistics.hpp"
0016 #include "Acts/Utilities/Result.hpp"
0017 
0018 namespace Acts {
0019 
0020 class TrackingVolume;
0021 class IVolumeMaterial;
0022 class Surface;
0023 
0024 /// @brief A navigator that does nothing
0025 ///
0026 /// It does not provide any navigation action
0027 ///
0028 class VoidNavigator {
0029  public:
0030   /// @brief Nested Config struct
0031   struct Config {};
0032 
0033   /// @brief Nested Options struct
0034   struct Options : public NavigatorPlainOptions {
0035     explicit Options(const GeometryContext& gctx)
0036         : NavigatorPlainOptions(gctx) {}
0037 
0038     void setPlainOptions(const NavigatorPlainOptions& options) {
0039       static_cast<NavigatorPlainOptions&>(*this) = options;
0040     }
0041   };
0042 
0043   /// @brief Nested State struct
0044   struct State {
0045     explicit State(const Options& options_) : options(options_) {}
0046 
0047     Options options;
0048 
0049     /// Navigation statistics
0050     NavigatorStatistics statistics;
0051   };
0052 
0053   State makeState(const Options& options) const {
0054     State state(options);
0055     return state;
0056   }
0057 
0058   const Surface* currentSurface(const State& /*state*/) const {
0059     return nullptr;
0060   }
0061 
0062   const TrackingVolume* currentVolume(const State& /*state*/) const {
0063     return nullptr;
0064   }
0065 
0066   const IVolumeMaterial* currentVolumeMaterial(const State& /*state*/) const {
0067     return nullptr;
0068   }
0069 
0070   const Surface* startSurface(const State& /*state*/) const { return nullptr; }
0071 
0072   const Surface* targetSurface(const State& /*state*/) const { return nullptr; }
0073 
0074   bool navigationBreak(const State& /*state*/) const { return true; }
0075 
0076   [[nodiscard]] Result<void> initialize(
0077       State& /*state*/, const Vector3& /*position*/,
0078       const Vector3& /*direction*/, Direction /*propagationDirection*/) const {
0079     return Result<void>::success();
0080   }
0081 
0082   NavigationTarget nextTarget(State& /*state*/, const Vector3& /*position*/,
0083                               const Vector3& /*direction*/) const {
0084     return NavigationTarget::None();
0085   }
0086 
0087   bool checkTargetValid(const State& /*state*/, const Vector3& /*position*/,
0088                         const Vector3& /*direction*/) const {
0089     return true;
0090   }
0091 
0092   void handleSurfaceReached(State& /*state*/, const Vector3& /*position*/,
0093                             const Vector3& /*direction*/,
0094                             const Surface& /*surface*/) const {
0095     return;
0096   }
0097 };
0098 
0099 }  // namespace Acts