Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-16 08:19:49

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/Direction.hpp"
0012 #include "Acts/Propagator/SympyStepper.hpp"
0013 #include "Acts/Utilities/Result.hpp"
0014 
0015 namespace Acts {
0016 
0017 class IVolumeMaterial;
0018 
0019 namespace detail {
0020 
0021 /// Which path a step takes
0022 enum class SympyStepMode {
0023   Vacuum,
0024   Dense,
0025 };
0026 
0027 /// @brief A whole Runge-Kutta step
0028 ///
0029 /// One body for every combination, instantiated once per combination in a
0030 /// translation unit of its own; sharing one costs more than the branches it
0031 /// saves.
0032 ///
0033 /// @tparam Mode which path the step takes
0034 /// @tparam WithJac whether the jacobian is transported; specialising on it
0035 ///         keeps the kernel from testing an empty jacobian span on every trial
0036 ///
0037 /// @param [in] stepper the stepper, for field access and accessors
0038 /// @param [in,out] state the stepper state
0039 /// @param [in] propDir the propagation direction
0040 /// @param [in] material the volume material, @c Dense only, and null there
0041 ///        when just the accumulator still has material to flush
0042 ///
0043 /// @return the step length taken, or an error
0044 template <SympyStepMode Mode, bool WithJac>
0045 Result<double> sympyStep(const SympyStepper& stepper,
0046                          SympyStepper::State& state, Direction propDir,
0047                          const IVolumeMaterial* material);
0048 
0049 extern template Result<double> sympyStep<SympyStepMode::Vacuum, false>(
0050     const SympyStepper&, SympyStepper::State&, Direction,
0051     const IVolumeMaterial*);
0052 extern template Result<double> sympyStep<SympyStepMode::Vacuum, true>(
0053     const SympyStepper&, SympyStepper::State&, Direction,
0054     const IVolumeMaterial*);
0055 extern template Result<double> sympyStep<SympyStepMode::Dense, false>(
0056     const SympyStepper&, SympyStepper::State&, Direction,
0057     const IVolumeMaterial*);
0058 extern template Result<double> sympyStep<SympyStepMode::Dense, true>(
0059     const SympyStepper&, SympyStepper::State&, Direction,
0060     const IVolumeMaterial*);
0061 
0062 }  // namespace detail
0063 }  // namespace Acts