Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-07-13 08:04:57

0001 // This file is part of the Acts project.
0002 //
0003 // Copyright (C) 2018-2023 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/Propagator/NavigatorOptions.hpp"
0012 namespace Acts {
0013 
0014 class Surface;
0015 
0016 /// @brief The void navigator struct as a default navigator
0017 ///
0018 /// It does not provide any navigation action, the compiler
0019 /// should eventually optimise that the function call is not done
0020 ///
0021 struct VoidNavigator {
0022   struct Config {};
0023 
0024   struct Options : public NavigatorPlainOptions {
0025     void setPlainOptions(const NavigatorPlainOptions& options) {
0026       static_cast<NavigatorPlainOptions&>(*this) = options;
0027     }
0028   };
0029 
0030   /// @brief Nested State struct, minimal requirement
0031   struct State {
0032     Options options;
0033   };
0034 
0035   State makeState(const Options& options) const {
0036     State state;
0037     state.options = options;
0038     return state;
0039   }
0040 
0041   const Surface* currentSurface(const State& /*state*/) const {
0042     return nullptr;
0043   }
0044 
0045   const Surface* startSurface(const State& /*state*/) const { return nullptr; }
0046 
0047   const Surface* targetSurface(const State& /*state*/) const { return nullptr; }
0048 
0049   bool targetReached(const State& /*state*/) const { return false; }
0050 
0051   bool navigationBreak(const State& /*state*/) const { return false; }
0052 
0053   void currentSurface(State& /*state*/, const Surface* /*surface*/) const {}
0054 
0055   void targetReached(State& /*state*/, bool /*targetReached*/) const {}
0056 
0057   void navigationBreak(State& /*state*/, bool /*navigationBreak*/) const {}
0058 
0059   /// Navigation call - void
0060   ///
0061   /// @tparam propagator_state_t is the type of Propagatgor state
0062   /// @tparam stepper_t Type of the Stepper
0063   ///
0064   /// Empty call, compiler should optimise that
0065   template <typename propagator_state_t, typename stepper_t>
0066   void initialize(propagator_state_t& /*state*/,
0067                   const stepper_t& /*stepper*/) const {}
0068 
0069   /// Navigation call - void
0070   ///
0071   /// @tparam propagator_state_t is the type of Propagatgor state
0072   /// @tparam stepper_t Type of the Stepper
0073   ///
0074   /// Empty call, compiler should optimise that
0075   template <typename propagator_state_t, typename stepper_t>
0076   void preStep(propagator_state_t& /*state*/,
0077                const stepper_t& /*stepper*/) const {}
0078 
0079   /// Navigation call - void
0080   ///
0081   /// @tparam propagator_state_t is the type of Propagatgor state
0082   /// @tparam stepper_t Type of the Stepper
0083   ///
0084   /// Empty call, compiler should optimise that
0085   template <typename propagator_state_t, typename stepper_t>
0086   void postStep(propagator_state_t& /*state*/,
0087                 const stepper_t& /*stepper*/) const {}
0088 };
0089 
0090 }  // namespace Acts