|
|
|||
File indexing completed on 2025-10-27 07:55:14
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/Navigation/NavigationState.hpp" 0012 #include "Acts/Utilities/Intersection.hpp" 0013 0014 #include <vector> 0015 0016 namespace Acts { 0017 0018 class Surface; 0019 0020 namespace Experimental { 0021 0022 class Portal; 0023 class Detector; 0024 class DetectorVolume; 0025 0026 /// Filler of the current volume 0027 struct DetectorVolumeFiller { 0028 /// Helper struct that allows to fill a volume into the 0029 /// navigation state, it allows to use common navigation 0030 /// structs for volume, portal, surfaces 0031 /// 0032 /// @param nState the navigation state 0033 /// @param volume the volume that is filled 0034 inline static void fill(NavigationState& nState, 0035 const DetectorVolume* volume) { 0036 nState.currentVolume = volume; 0037 } 0038 }; 0039 0040 /// Fillers and attachers for surfaces to act on the navigation state 0041 struct SurfacesFiller { 0042 /// Helper struct that allows to fill surfaces into the candidate vector it 0043 /// allows to use common navigation structs for volume, portal, surfaces 0044 /// 0045 /// @param nState the navigation state 0046 /// @param surfaces the surfaces that are filled in 0047 inline static void fill(NavigationState& nState, 0048 const std::vector<const Surface*>& surfaces) { 0049 std::ranges::for_each(surfaces, [&](const Surface* s) { 0050 nState.surfaceCandidates.emplace_back(Intersection3D::Invalid(), 0, *s, 0051 nState.surfaceBoundaryTolerance); 0052 }); 0053 } 0054 }; 0055 0056 /// Fillers and attachers for portals to act on the navigation state 0057 struct PortalsFiller { 0058 /// Helper struct that allows to fill surfaces into the candidate vector it 0059 /// allows to use common navigation structs for volume, portal, surfaces 0060 /// 0061 /// @param nState the navigation state 0062 /// @param portals the portals that are filled in 0063 inline static void fill(NavigationState& nState, 0064 const std::vector<const Portal*>& portals) { 0065 std::ranges::for_each(portals, [&](const Portal* p) { 0066 nState.surfaceCandidates.emplace_back(Intersection3D::Invalid(), 0, *p, 0067 BoundaryTolerance::None()); 0068 }); 0069 } 0070 }; 0071 0072 } // namespace Experimental 0073 } // namespace Acts
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|