Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:10:58

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