File indexing completed on 2025-01-19 09:23:17
0001
0002
0003
0004
0005
0006
0007
0008
0009 #pragma once
0010
0011 #include "Acts/Detector/DetectorVolume.hpp"
0012 #include "Acts/Geometry/TrackingVolume.hpp"
0013 #include "Acts/Utilities/TypeTraits.hpp"
0014
0015 namespace Acts::Concepts {
0016
0017
0018 template <typename propagator_state_t, typename navigator_t>
0019 using ReturnTypeCurrentVolume =
0020 decltype(std::declval<navigator_t>().currentVolume(
0021 std::declval<propagator_state_t>().navigation));
0022
0023
0024
0025
0026
0027 template <typename propagator_state_t, typename navigator_t>
0028 struct NavigationCompatibilityConceptImpl {
0029
0030
0031 constexpr static bool isCurrentVolumePtr =
0032 (Acts::Concepts::identical_to<const TrackingVolume*,
0033 ReturnTypeCurrentVolume, propagator_state_t,
0034 navigator_t> ||
0035 Acts::Concepts::identical_to<const Acts::Experimental::DetectorVolume*,
0036 ReturnTypeCurrentVolume, propagator_state_t,
0037 navigator_t>);
0038
0039 static_assert(isCurrentVolumePtr,
0040 "Return type is not a known volume pointer type");
0041
0042 constexpr static bool value = Acts::Concepts::require<isCurrentVolumePtr>;
0043 };
0044
0045 template <typename propagator_state_t, typename navigator_t>
0046 constexpr bool NavigationCompatibilityConcept =
0047 NavigationCompatibilityConceptImpl<propagator_state_t, navigator_t>::value;
0048
0049 }