Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-03-28 07:45:41

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 #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 }  // namespace Acts