Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-27 07:23:30

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/Geometry/TrackingVolume.hpp"
0012 #include "Acts/Surfaces/Surface.hpp"
0013 
0014 #include <concepts>
0015 
0016 namespace Acts {
0017 
0018 class IVolumeMaterial;
0019 
0020 /// @brief Concept that is satisfied by navigators.
0021 template <typename Navigator, typename Options = typename Navigator::Options,
0022           typename State = typename Navigator::State>
0023 concept NavigatorConcept = requires {
0024   typename Navigator::Config;
0025   typename Navigator::Options;
0026   typename Navigator::State;
0027 
0028   requires requires(const Navigator& n, const Options& o, State& s,
0029                     const Surface& sf, const Vector3& position,
0030                     const Vector3& direction, Direction propagationDirection) {
0031     { n.makeState(o) } -> std::same_as<State>;
0032     { n.currentSurface(s) } -> std::same_as<const Surface*>;
0033     { n.currentVolume(s) } -> std::same_as<const TrackingVolume*>;
0034     { n.currentVolumeMaterial(s) } -> std::same_as<const IVolumeMaterial*>;
0035     { n.startSurface(s) } -> std::same_as<const Surface*>;
0036     { n.targetSurface(s) } -> std::same_as<const Surface*>;
0037     { n.endOfWorldReached(s) } -> std::same_as<bool>;
0038     { n.navigationBreak(s) } -> std::same_as<bool>;
0039     {
0040       n.initialize(s, position, direction, propagationDirection)
0041     } -> std::same_as<Result<void>>;
0042     { n.nextTarget(s, position, direction) } -> std::same_as<NavigationTarget>;
0043     { n.checkTargetValid(s, position, direction) } -> std::same_as<bool>;
0044     {
0045       n.handleSurfaceReached(s, position, direction, sf)
0046     } -> std::same_as<void>;
0047   };
0048 };
0049 
0050 }  // namespace Acts