Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
VoidPropagatorComponents.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file VoidPropagatorComponents.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2018 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 
11 namespace Acts {
12 namespace detail {
13 
19 struct VoidNavigator {
21  struct State {
23  const Surface* startSurface = nullptr;
24 
26  const Surface* currentSurface = nullptr;
27 
29  const Surface* targetSurface = nullptr;
30 
32  bool targetReached = false;
33 
35  bool navigationBreak = false;
36  };
37 
39  using state_type = State;
40 
42  const Surface* targetSurface) const {
43  State result;
44  result.startSurface = startSurface;
46  return result;
47  }
48 
49  const Surface* currentSurface(const State& state) const {
50  return state.currentSurface;
51  }
52 
53  const Surface* startSurface(const State& state) const {
54  return state.startSurface;
55  }
56 
57  const Surface* targetSurface(const State& state) const {
58  return state.targetSurface;
59  }
60 
61  bool targetReached(const State& state) const { return state.targetReached; }
62 
63  bool navigationBreak(const State& state) const {
64  return state.navigationBreak;
65  }
66 
67  void currentSurface(State& state, const Surface* surface) const {
68  state.currentSurface = surface;
69  }
70 
71  void targetReached(State& state, bool targetReached) const {
73  }
74 
77  }
78 
85  template <typename propagator_state_t, typename stepper_t>
86  void initialize(propagator_state_t& /*state*/,
87  const stepper_t& /*stepper*/) const {}
88 
95  template <typename propagator_state_t, typename stepper_t>
96  void preStep(propagator_state_t& /*state*/,
97  const stepper_t& /*stepper*/) const {}
98 
105  template <typename propagator_state_t, typename stepper_t>
106  void postStep(propagator_state_t& /*state*/,
107  const stepper_t& /*stepper*/) const {}
108 };
109 
110 } // namespace detail
111 } // namespace Acts