Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
NavigationStateFillers.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file NavigationStateFillers.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2021 CERN for the benefit of the Acts project
4 //
5 // This Source Code Form is subject to the terms of the Mozilla Public
6 // License, v. 2.0. If a copy of the MPL was not distributed with this
7 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 
9 #pragma once
10 
16 
17 #include <vector>
18 
19 namespace Acts {
20 
21 class Surface;
22 
23 namespace Experimental {
24 
25 class Portal;
26 class Detector;
27 class DetectorVolume;
28 
37  inline static void fill(NavigationState& nState,
38  const DetectorVolume* volume) {
39  nState.currentVolume = volume;
40  }
41 };
42 
50  inline static void fill(NavigationState& nState,
51  const std::vector<const Surface*>& surfaces) {
52  std::for_each(surfaces.begin(), surfaces.end(), [&](const auto& s) {
55  nState.surfaceBoundaryCheck});
56  });
57  }
58 };
59 
61 struct PortalsFiller {
67  inline static void fill(NavigationState& nState,
68  const std::vector<const Portal*>& portals) {
69  std::for_each(portals.begin(), portals.end(), [&](const auto& p) {
71  ObjectIntersection<Surface>::invalid(), nullptr, p, true});
72  });
73  }
74 };
75 
76 } // namespace Experimental
77 } // namespace Acts