Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-07-12 07:51:35

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/Surfaces/BoundaryTolerance.hpp"
0012 
0013 namespace Acts {
0014 
0015 class Surface;
0016 
0017 /// @brief The navigation target
0018 ///
0019 /// This struct represents a navigation target which is communicated from the
0020 /// navigator to the stepper through the propagator.
0021 ///
0022 /// @note This incorporates `std::optional` semantics as the next target might
0023 ///       not exist.
0024 struct NavigationTarget {
0025   const Surface* surface = nullptr;
0026   std::uint8_t surfaceIntersectionIndex = 0;
0027   BoundaryTolerance boundaryTolerance = BoundaryTolerance::None();
0028 
0029   static NavigationTarget None() { return NavigationTarget(); }
0030 
0031   NavigationTarget(const Surface& surface_,
0032                    std::uint8_t surfaceIntersectionIndex_,
0033                    BoundaryTolerance boundaryTolerance_)
0034       : surface(&surface_),
0035         surfaceIntersectionIndex(surfaceIntersectionIndex_),
0036         boundaryTolerance(boundaryTolerance_) {}
0037 
0038   bool isNone() const { return surface == nullptr; }
0039 
0040  private:
0041   NavigationTarget() = default;
0042 };
0043 
0044 }  // namespace Acts