2525
2626#include < limits>
2727#include < memory>
28- #include < vector>
2928
3029namespace Acts {
3130
@@ -39,9 +38,6 @@ namespace Acts {
3938// /
4039class DirectNavigator {
4140 public:
42- // / The sequentially crossed surfaces
43- using SurfaceSequence = std::vector<const Surface*>;
44-
4541 // / @brief The nested configuration struct
4642 struct Config {};
4743
@@ -52,9 +48,6 @@ class DirectNavigator {
5248 explicit Options (const GeometryContext& gctx)
5349 : NavigatorPlainOptions(gctx) {}
5450
55- // / The Surface sequence
56- SurfaceSequence surfaces;
57-
5851 // / The surface tolerance
5952 double surfaceTolerance = s_onSurfaceTolerance;
6053
@@ -93,7 +86,7 @@ class DirectNavigator {
9386 // / Index of the next surface to try
9487 // / @note -1 means before the first surface in the sequence and size()
9588 // / means after the last surface in the sequence
96- int surfaceIndex = -1 ;
89+ std:: int32_t surfaceIndex = -1 ;
9790
9891 // / Navigation state - external interface: the current surface
9992 const Surface* currentSurface = nullptr ;
@@ -107,7 +100,7 @@ class DirectNavigator {
107100 // / Get the current navigation surface
108101 // / @return Reference to the surface at the current surface index
109102 const Surface& navSurface () const {
110- return *options.surfaces .at (surfaceIndex);
103+ return *options.externalSurfaces .at (surfaceIndex);
111104 }
112105
113106 // / Move to the next surface in the sequence
@@ -124,7 +117,8 @@ class DirectNavigator {
124117 // / @return True if no more surfaces remain in the propagation direction
125118 bool endOfSurfaces () const {
126119 if (direction == Direction::Forward ()) {
127- return surfaceIndex >= static_cast <int >(options.surfaces .size ());
120+ return surfaceIndex >=
121+ static_cast <int >(options.externalSurfaces .size ());
128122 }
129123 return surfaceIndex < 0 ;
130124 }
@@ -133,7 +127,7 @@ class DirectNavigator {
133127 // / @return Number of surfaces left to process in the propagation direction
134128 int remainingSurfaces () const {
135129 if (direction == Direction::Forward ()) {
136- return options.surfaces .size () - surfaceIndex;
130+ return options.externalSurfaces .size () - surfaceIndex;
137131 }
138132 return surfaceIndex + 1 ;
139133 }
@@ -144,7 +138,7 @@ class DirectNavigator {
144138 void resetSurfaceIndex () {
145139 surfaceIndex = direction == Direction::Forward ()
146140 ? -1
147- : static_cast <int >(options.surfaces .size ());
141+ : static_cast <int >(options.externalSurfaces .size ());
148142 }
149143 };
150144
@@ -232,7 +226,7 @@ class DirectNavigator {
232226 static_cast <void >(direction);
233227
234228 ACTS_VERBOSE (" Initialize. Surface sequence for navigation:" );
235- for (const Surface* surface : state.options .surfaces ) {
229+ for (const Surface* surface : state.options .externalSurfaces ) {
236230 ACTS_VERBOSE (surface->geometryId ()
237231 << " - "
238232 << surface->center (state.options .geoContext ).transpose ());
@@ -251,13 +245,14 @@ class DirectNavigator {
251245 }
252246
253247 // Find initial index.
254- auto found =
255- std::ranges::find (state. options . surfaces , state.options .startSurface );
248+ auto found = std::ranges::find (state. options . externalSurfaces ,
249+ state.options .startSurface );
256250
257- if (found != state.options .surfaces .end ()) {
251+ if (found != state.options .externalSurfaces .end ()) {
258252 // The index should be the index before the start surface, depending on
259253 // the direction
260- state.surfaceIndex = std::distance (state.options .surfaces .begin (), found);
254+ state.surfaceIndex =
255+ std::distance (state.options .externalSurfaces .begin (), found);
261256 state.surfaceIndex += state.direction == Direction::Backward () ? 1 : -1 ;
262257 } else {
263258 ACTS_DEBUG (
@@ -300,7 +295,7 @@ class DirectNavigator {
300295 ACTS_VERBOSE (" Next surface candidate is "
301296 << state.navSurface ().geometryId () << " . "
302297 << state.remainingSurfaces () << " out of "
303- << state.options .surfaces .size ()
298+ << state.options .externalSurfaces .size ()
304299 << " surfaces remain to try." );
305300
306301 // Establish & update the surface status
0 commit comments