|
|
|||
Warning, file /acts/Core/include/Acts/Propagator/VoidNavigator.hpp was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
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 /// Nested Config struct 0031 struct Config {}; 0032 0033 /// Nested Options struct 0034 struct Options : public NavigatorPlainOptions { 0035 /// Constructor for void navigator options 0036 /// @param gctx Geometry context (required but unused by void navigator) 0037 explicit Options(const GeometryContext& gctx) 0038 : NavigatorPlainOptions(gctx) {} 0039 0040 /// Sets the plain navigator options 0041 /// @param options The plain navigator options to copy (unused by void navigator) 0042 void setPlainOptions(const NavigatorPlainOptions& options) { 0043 static_cast<NavigatorPlainOptions&>(*this) = options; 0044 } 0045 }; 0046 0047 /// Nested State struct 0048 struct State { 0049 /// Constructor for void navigator state 0050 /// @param options_ The navigator options to store in state 0051 explicit State(const Options& options_) : options(options_) {} 0052 0053 /// Configuration options for the navigator 0054 Options options; 0055 0056 /// Navigation statistics 0057 NavigatorStatistics statistics; 0058 }; 0059 0060 /// Creates a new navigator state for void navigation 0061 /// @param options The navigator options 0062 /// @return Initialized void navigator state 0063 State makeState(const Options& options) const { 0064 State state(options); 0065 return state; 0066 } 0067 0068 /// Returns the current surface (always nullptr for void navigator) 0069 /// @return Always nullptr since void navigator has no surfaces 0070 const Surface* currentSurface(const State& /*state*/) const { 0071 return nullptr; 0072 } 0073 0074 /// Returns the current tracking volume (always nullptr for void navigator) 0075 /// @return Always nullptr since void navigator has no volumes 0076 const TrackingVolume* currentVolume(const State& /*state*/) const { 0077 return nullptr; 0078 } 0079 0080 /// Returns the current volume material (always nullptr for void navigator) 0081 /// @return Always nullptr since void navigator has no material 0082 const IVolumeMaterial* currentVolumeMaterial(const State& /*state*/) const { 0083 return nullptr; 0084 } 0085 0086 /// Returns the start surface (always nullptr for void navigator) 0087 /// @return Always nullptr since void navigator has no surfaces 0088 const Surface* startSurface(const State& /*state*/) const { return nullptr; } 0089 0090 /// Returns the target surface (always nullptr for void navigator) 0091 /// @return Always nullptr since void navigator has no surfaces 0092 const Surface* targetSurface(const State& /*state*/) const { return nullptr; } 0093 0094 /// Checks if the end of the world has been reached (always false for void 0095 /// navigator) 0096 /// @return Always false since void navigator has no world boundaries 0097 bool endOfWorldReached(const State& /*state*/) const { return false; } 0098 0099 /// Checks if navigation should break (always true for void navigator) 0100 /// @return Always true to immediately stop navigation 0101 bool navigationBreak(const State& /*state*/) const { return true; } 0102 0103 /// Initializes the void navigator (always succeeds and does nothing) 0104 /// @return Always successful result since no initialization is needed 0105 [[nodiscard]] Result<void> initialize( 0106 State& /*state*/, const Vector3& /*position*/, 0107 const Vector3& /*direction*/, Direction /*propagationDirection*/) const { 0108 return Result<void>::success(); 0109 } 0110 0111 /// Returns the next navigation target (always None for void navigator) 0112 /// @return NavigationTarget::None() since there are no targets in void space 0113 NavigationTarget nextTarget(State& /*state*/, const Vector3& /*position*/, 0114 const Vector3& /*direction*/) const { 0115 return NavigationTarget::None(); 0116 } 0117 0118 /// Checks if the current target is valid (always true for void navigator) 0119 /// @return Always true since there are no targets to invalidate 0120 bool checkTargetValid(const State& /*state*/, const Vector3& /*position*/, 0121 const Vector3& /*direction*/) const { 0122 return true; 0123 } 0124 0125 /// Handles reaching a surface (does nothing for void navigator) 0126 void handleSurfaceReached(State& /*state*/, const Vector3& /*position*/, 0127 const Vector3& /*direction*/, 0128 const Surface& /*surface*/) const { 0129 return; 0130 } 0131 }; 0132 0133 } // namespace Acts
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|