File indexing completed on 2026-03-28 07:45:41
0001
0002
0003
0004
0005
0006
0007
0008
0009 #include "Acts/Propagator/NavigationTarget.hpp"
0010
0011 #include "Acts/Geometry/BoundarySurfaceT.hpp"
0012 #include "Acts/Geometry/Layer.hpp"
0013 #include "Acts/Geometry/Portal.hpp"
0014 #include "Acts/Surfaces/Surface.hpp"
0015
0016 namespace Acts {
0017 void NavigationTarget::print(std::ostream& ostr) const {
0018 std::visit(
0019 [&](const auto& target) {
0020 using Target_t = std::decay_t<decltype(target)>;
0021 if constexpr (std::is_same_v<Target_t, const Surface*>) {
0022 ostr << target->type() << " surface " << target->geometryId();
0023 } else if constexpr (std::is_same_v<Target_t, const Layer*>) {
0024 ostr << target->layerType() << " layer " << target->geometryId();
0025 } else if constexpr (std::is_same_v<Target_t, const BoundarySurface*>) {
0026 const auto& surf{target->surfaceRepresentation()};
0027 ostr << "Boundary " << surf.type() << " surface "
0028 << surf.geometryId();
0029 } else if constexpr (std::is_same_v<Target_t, const Portal*>) {
0030 const auto& surf{target->surface()};
0031 ostr << surf.type() << " portal " << surf.geometryId();
0032 }
0033 },
0034 m_target);
0035 ostr << ", path length: " << pathLength();
0036 }
0037 }