Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-16 09:24:57

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 <boost/test/unit_test.hpp>
0010 
0011 #include "Acts/Definitions/Algebra.hpp"
0012 #include "Acts/Geometry/CuboidVolumeBounds.hpp"
0013 #include "Acts/Geometry/CylinderVolumeBounds.hpp"
0014 #include "Acts/Geometry/GeometryContext.hpp"
0015 #include "Acts/Geometry/IndexGrid.hpp"
0016 #include "Acts/Geometry/ReferenceGenerators.hpp"
0017 #include "Acts/Geometry/TrackingVolume.hpp"
0018 #include "Acts/Navigation/IndexGridNavigationPolicy.hpp"
0019 #include "Acts/Navigation/NavigationDelegate.hpp"
0020 #include "Acts/Navigation/NavigationStream.hpp"
0021 #include "Acts/Surfaces/CylinderBounds.hpp"
0022 #include "Acts/Surfaces/CylinderSurface.hpp"
0023 #include "Acts/Surfaces/DiscSurface.hpp"
0024 #include "Acts/Surfaces/PlaneSurface.hpp"
0025 #include "Acts/Surfaces/RadialBounds.hpp"
0026 #include "Acts/Surfaces/RectangleBounds.hpp"
0027 #include "Acts/Utilities/Axis.hpp"
0028 #include "Acts/Utilities/Grid.hpp"
0029 #include "Acts/Utilities/Logger.hpp"
0030 
0031 #include <memory>
0032 #include <numbers>
0033 
0034 namespace ActsTests {
0035 
0036 using namespace Acts;
0037 
0038 GeometryContext tContext;
0039 
0040 auto tLogger = getDefaultLogger("IndexGridNavigation", Logging::VERBOSE);
0041 
0042 BOOST_AUTO_TEST_SUITE(NavigationSuite)
0043 
0044 BOOST_AUTO_TEST_CASE(RegularPlaneIndexGridTests) {
0045   // Test here:
0046   // - we create a grid -25, -15, -5, 5, 15, 25 in X and Y
0047   // - we create a surface at Z=0 spanning -4 to 4 in X and -6 to 6 in Y
0048   //
0049   // Setup the surface should thus be (without any expansion):
0050   // - central bin [3,3] for center reference at (0,0,0)
0051   // - bins [3,2], [3,3], [3,4] for polyhedron reference
0052   //
0053   // All can be modified by bin expansion or reference expansion
0054 
0055   // Let's create a simple plane in the XY plane
0056   auto planeSurface = Surface::makeShared<PlaneSurface>(
0057       Transform3::Identity(), std::make_shared<RectangleBounds>(4., 6.));
0058 
0059   // x-y Axes & Grid
0060   Axis<AxisType::Equidistant, AxisBoundaryType::Bound> axisX(-35, 35, 7);
0061   Axis<AxisType::Equidistant, AxisBoundaryType::Bound> axisY(-25., 25., 5);
0062   Grid gridXY(Type<std::vector<std::size_t>>, std::move(axisX),
0063               std::move(axisY));
0064 
0065   TrackingVolume tVolume(Transform3::Identity(),
0066                          std::make_shared<CuboidVolumeBounds>(20., 20., 5.),
0067                          "CuboidVolume");
0068 
0069   tVolume.addSurface(planeSurface);
0070 
0071   // Indexed Surface grid
0072   IndexGrid<decltype(gridXY)> indexedGridXY(
0073       std::move(gridXY), {AxisDirection::AxisX, AxisDirection::AxisY});
0074 
0075   // Create a tracking volume and add the surface
0076 
0077   // (1a) Test with Center reference generator - no bin expansion
0078   IndexGridNavigationConfig centerConfig;
0079   centerConfig.referenceGenerator =
0080       std::make_shared<CenterReferenceGenerator>();
0081 
0082   IndexGridNavigationPolicy<decltype(gridXY)> centerNavigationPolicy(
0083       tContext, tVolume, *tLogger, centerConfig, indexedGridXY);
0084 
0085   NavigationDelegate delegate;
0086   BOOST_CHECK_NO_THROW(centerNavigationPolicy.connect(delegate));
0087 
0088   // Now initialize candidates at position (0,0,0)
0089   NavigationArguments navArgs;
0090   NavigationStream nStream;
0091   AppendOnlyNavigationStream navStream{nStream};
0092 
0093   // Address central posision
0094   navArgs.position = Vector3(0., 0., 0.);
0095   navArgs.direction = Vector3(0., 0., 1.);
0096   centerNavigationPolicy.initializeCandidates(tContext, navArgs, navStream,
0097                                               *tLogger);
0098   BOOST_CHECK_EQUAL(nStream.candidates().size(), 1);
0099 
0100   // The off-central position - should yield no candidates
0101   nStream.reset();
0102   navArgs.position = Vector3(11., 11., 0.);
0103   navArgs.direction = Vector3(0., 0., 1.);
0104   centerNavigationPolicy.initializeCandidates(tContext, navArgs, navStream,
0105                                               *tLogger);
0106   BOOST_CHECK_EQUAL(nStream.candidates().size(), 0);
0107 
0108   // (1b) Test with Center reference generator - with bin expansion (1,0)
0109   IndexGridNavigationConfig expandedConfig;
0110   expandedConfig.referenceGenerator =
0111       std::make_shared<CenterReferenceGenerator>();
0112   expandedConfig.binExpansion = {1u, 0u};
0113 
0114   IndexGridNavigationPolicy<decltype(gridXY)> expandedNavigationPolicy(
0115       tContext, tVolume, *tLogger, expandedConfig, indexedGridXY);
0116 
0117   nStream.reset();
0118 
0119   // The bins are expanded in X - should yield a candidate
0120   navArgs.position = Vector3(11., 0., 0.);
0121   navArgs.direction = Vector3(0., 0., 1.);
0122   expandedNavigationPolicy.initializeCandidates(tContext, navArgs, navStream,
0123                                                 *tLogger);
0124   BOOST_CHECK_EQUAL(nStream.candidates().size(), 1);
0125   // They are not expanded in Y - should yield no candidate
0126   nStream.reset();
0127   navArgs.position = Vector3(0., 11., 0.);
0128   navArgs.direction = Vector3(0., 0., 1.);
0129   expandedNavigationPolicy.initializeCandidates(tContext, navArgs, navStream,
0130                                                 *tLogger);
0131   BOOST_CHECK_EQUAL(nStream.candidates().size(), 0);
0132 
0133   // (2a) Test with Polyhedron reference generator - no bin expansion
0134   IndexGridNavigationConfig polyConfig;
0135   polyConfig.referenceGenerator =
0136       std::make_shared<PolyhedronReferenceGenerator>();
0137 
0138   IndexGridNavigationPolicy<decltype(gridXY)> polyNavigationPolicy(
0139       tContext, tVolume, *tLogger, polyConfig, indexedGridXY);
0140   nStream.reset();
0141   // Address central posision
0142   navArgs.position = Vector3(0., 0., 0.);
0143   polyNavigationPolicy.initializeCandidates(tContext, navArgs, navStream,
0144                                             *tLogger);
0145   BOOST_CHECK_EQUAL(nStream.candidates().size(), 1);
0146   // Through the polyhedron also the bins in y before/after are filled
0147   nStream.reset();
0148   navArgs.position = Vector3(0., -7., 0.);
0149   polyNavigationPolicy.initializeCandidates(tContext, navArgs, navStream,
0150                                             *tLogger);
0151   BOOST_CHECK_EQUAL(nStream.candidates().size(), 1);
0152   nStream.reset();
0153   navArgs.position = Vector3(0., 7., 0.);
0154   polyNavigationPolicy.initializeCandidates(tContext, navArgs, navStream,
0155                                             *tLogger);
0156   BOOST_CHECK_EQUAL(nStream.candidates().size(), 1);
0157   // However, the bins in x before/after are not filled
0158   nStream.reset();
0159   navArgs.position = Vector3(-7., 0., 0.);
0160   polyNavigationPolicy.initializeCandidates(tContext, navArgs, navStream,
0161                                             *tLogger);
0162   BOOST_CHECK_EQUAL(nStream.candidates().size(), 0);
0163   nStream.reset();
0164   navArgs.position = Vector3(7., 0., 0.);
0165   polyNavigationPolicy.initializeCandidates(tContext, navArgs, navStream,
0166                                             *tLogger);
0167   BOOST_CHECK_EQUAL(nStream.candidates().size(), 0);
0168 
0169   // (2b) Test with Polyhedron reference generator - with reference expansion
0170   // (12., 0.)
0171   IndexGridNavigationConfig polyExpandedConfig;
0172   polyExpandedConfig.referenceGenerator =
0173       std::make_shared<PolyhedronReferenceGenerator>();
0174   polyExpandedConfig.referenceExpansion = {12., 0.};
0175 
0176   IndexGridNavigationPolicy<decltype(gridXY)> polyExpandedNavigationPolicy(
0177       tContext, tVolume, *tLogger, polyExpandedConfig, indexedGridXY);
0178   nStream.reset();
0179   // Address central posision - should still work
0180   navArgs.position = Vector3(0., 0., 0.);
0181   polyExpandedNavigationPolicy.initializeCandidates(tContext, navArgs,
0182                                                     navStream, *tLogger);
0183   BOOST_CHECK_EQUAL(nStream.candidates().size(), 1);
0184   // Sunndenly all x bins +2/-2 are filled
0185   nStream.reset();
0186   navArgs.position = Vector3(-20., 0., 0.);
0187   polyExpandedNavigationPolicy.initializeCandidates(tContext, navArgs,
0188                                                     navStream, *tLogger);
0189   BOOST_CHECK_EQUAL(nStream.candidates().size(), 1);
0190   nStream.reset();
0191   navArgs.position = Vector3(20., 0., 0.);
0192   polyExpandedNavigationPolicy.initializeCandidates(tContext, navArgs,
0193                                                     navStream, *tLogger);
0194   BOOST_CHECK_EQUAL(nStream.candidates().size(), 1);
0195   // While the first bin is still out of reach
0196   nStream.reset();
0197   navArgs.position = Vector3(-30., 0., 0.);
0198   polyExpandedNavigationPolicy.initializeCandidates(tContext, navArgs,
0199                                                     navStream, *tLogger);
0200   BOOST_CHECK_EQUAL(nStream.candidates().size(), 0);
0201   nStream.reset();
0202   navArgs.position = Vector3(30., 0., 0.);
0203   polyExpandedNavigationPolicy.initializeCandidates(tContext, navArgs,
0204                                                     navStream, *tLogger);
0205   BOOST_CHECK_EQUAL(nStream.candidates().size(), 0);
0206 }
0207 
0208 BOOST_AUTO_TEST_CASE(RegularCylinderIndexGridTests) {
0209   // Most of the tests are covered by the plane grid, we can concentrate here on
0210   // the phi periodicity & the projected reference generator
0211 
0212   // Test setup:
0213   // - We create a grid in z: -20 to 20 in 20 bins in z
0214   // - in phi: -pi to pi in 10 bins
0215   // - We create a surface at phi = -PI at radius R=10, spanning -2 to 2 in z
0216 
0217   // We create a plane surface at phi = -PI and Radius R
0218   double cylinderRadius = 10.;
0219   Vector3 surfaceCenter(-cylinderRadius, 0., 0.);
0220 
0221   // Local z axis is the negative x axis
0222   Vector3 surfaceLocalZ(-1, 0., 0.);
0223   // Local x axis is the global y axis
0224   Vector3 surfaceLocalY(0., 0., -1.);
0225   // Local x axis is then the global
0226   Vector3 surfaceLocalX(0., 1., 0);
0227   // Create the RotationMatrix
0228   RotationMatrix3 surfaceRotation;
0229   surfaceRotation.col(0) = surfaceLocalX;
0230   surfaceRotation.col(1) = surfaceLocalY;
0231   surfaceRotation.col(2) = surfaceLocalZ;
0232   // Get the surfaceTransform
0233   auto surfaceTransform =
0234       Transform3(Translation3(surfaceCenter) * surfaceRotation);
0235 
0236   auto planeSurface = Surface::makeShared<PlaneSurface>(
0237       surfaceTransform, std::make_shared<RectangleBounds>(2., 3.));
0238 
0239   // z-phi axes & Grid
0240   Axis<AxisType::Equidistant, AxisBoundaryType::Bound> axisZ(-20, 20, 20);
0241   Axis<AxisType::Equidistant, AxisBoundaryType::Closed> axisPhi(
0242       -std::numbers::pi, std::numbers::pi, 10);
0243   Grid gridZPhi(Type<std::vector<std::size_t>>, std::move(axisZ),
0244                 std::move(axisPhi));
0245 
0246   TrackingVolume tVolume(Transform3::Identity(),
0247                          std::make_shared<CylinderVolumeBounds>(0., 15., 22.),
0248                          "CylinderVolume");
0249   tVolume.addSurface(planeSurface);
0250 
0251   // (1a) - Index grid with polyhedron reference generator - no expansion
0252   IndexGrid<decltype(gridZPhi)> indexedGridZPhi(
0253       std::move(gridZPhi), {AxisDirection::AxisZ, AxisDirection::AxisPhi});
0254   IndexGridNavigationConfig polyConfig;
0255   polyConfig.referenceGenerator =
0256       std::make_shared<PolyhedronReferenceGenerator>();
0257   IndexGridNavigationPolicy<decltype(gridZPhi)> polyNavigationPolicy(
0258       tContext, tVolume, *tLogger, polyConfig, indexedGridZPhi);
0259 
0260   NavigationDelegate delegate;
0261   BOOST_CHECK_NO_THROW(polyNavigationPolicy.connect(delegate));
0262 
0263   // Now initialize candidates at position (R,0,0) - opposite should. not lead
0264   // to a candidate
0265   NavigationArguments navArgs;
0266   NavigationStream nStream;
0267   AppendOnlyNavigationStream navStream{nStream};
0268   navArgs.position = Vector3(cylinderRadius, 0., 0.);
0269   navArgs.direction = Vector3(1., 0., 0.);
0270   polyNavigationPolicy.initializeCandidates(tContext, navArgs, navStream,
0271                                             *tLogger);
0272   BOOST_CHECK_EQUAL(nStream.candidates().size(), 0);
0273   // However, a position at (-R,0,0) should yield a candidate
0274   nStream.reset();
0275   navArgs.position = Vector3(-cylinderRadius, 0., 0.);
0276   navArgs.direction = Vector3(-1., 0., 0.);
0277   polyNavigationPolicy.initializeCandidates(tContext, navArgs, navStream,
0278                                             *tLogger);
0279   BOOST_CHECK_EQUAL(nStream.candidates().size(), 1);
0280   // A candidate a off in phi - no results
0281   nStream.reset();
0282   navArgs.position =
0283       Vector3(cylinderRadius * std::cos(-std::numbers::pi + 0.8),
0284               cylinderRadius * std::sin(-std::numbers::pi + 0.8), 0.);
0285   polyNavigationPolicy.initializeCandidates(tContext, navArgs, navStream,
0286                                             *tLogger);
0287   BOOST_CHECK_EQUAL(nStream.candidates().size(), 0);
0288 
0289   // A candidate a off in z range - no result
0290   nStream.reset();
0291   navArgs.position = Vector3(-cylinderRadius, 0., 4.);
0292   polyNavigationPolicy.initializeCandidates(tContext, navArgs, navStream,
0293                                             *tLogger);
0294   BOOST_CHECK_EQUAL(nStream.candidates().size(), 0);
0295 
0296   // Let's test a reference surface projection generator
0297   // Create a reference surface with bigger radius, should expand z but not phi
0298   double referenceSurfaceRadius = 15.;
0299   auto referenceCylinder = Surface::makeShared<CylinderSurface>(
0300       Transform3::Identity(),
0301       std::make_shared<CylinderBounds>(referenceSurfaceRadius, 22.));
0302 
0303   IndexGridNavigationConfig projectedConfig;
0304   auto projectedReferenceGenerator =
0305       std::make_shared<ProjectedReferenceGenerator>();
0306   projectedReferenceGenerator->nSegements = 1;
0307   projectedReferenceGenerator->expansionValue = 0.0;
0308   projectedReferenceGenerator->referenceSurface = referenceCylinder;
0309   projectedReferenceGenerator->luminousRegion = {Vector3(0., 0., 0.)};
0310 
0311   projectedConfig.referenceGenerator = projectedReferenceGenerator;
0312   IndexGridNavigationPolicy<decltype(gridZPhi)> projectedNavigationPolicy(
0313       tContext, tVolume, *tLogger, projectedConfig, indexedGridZPhi);
0314 
0315   // A candidate a off in phi - still outside
0316   nStream.reset();
0317   navArgs.position =
0318       Vector3(cylinderRadius * std::cos(-std::numbers::pi + 0.8),
0319               cylinderRadius * std::sin(-std::numbers::pi + 0.8), 0.);
0320   projectedNavigationPolicy.initializeCandidates(tContext, navArgs, navStream,
0321                                                  *tLogger);
0322   BOOST_CHECK_EQUAL(nStream.candidates().size(), 0);
0323 
0324   // A candidate a off in z range - should now yield a candidate now
0325   nStream.reset();
0326   navArgs.position = Vector3(-cylinderRadius, 0., 4.);
0327   projectedNavigationPolicy.initializeCandidates(tContext, navArgs, navStream,
0328                                                  *tLogger);
0329   BOOST_CHECK_EQUAL(nStream.candidates().size(), 1);
0330 
0331   // Now reference generator that also carries the reference surface
0332   IndexGridNavigationConfig projectedWithSurfaceConfig;
0333   projectedWithSurfaceConfig.surface = referenceCylinder;
0334   auto projectedWithSurfaceReferenceGenerator =
0335       std::make_shared<ProjectedReferenceGenerator>();
0336   projectedWithSurfaceReferenceGenerator->nSegements = 1;
0337   projectedWithSurfaceReferenceGenerator->expansionValue = 0.0;
0338   projectedWithSurfaceReferenceGenerator->referenceSurface = referenceCylinder;
0339   projectedWithSurfaceReferenceGenerator->luminousRegion = {
0340       Vector3(0., 0., 0.)};
0341   projectedWithSurfaceConfig.referenceGenerator =
0342       projectedWithSurfaceReferenceGenerator;
0343   IndexGridNavigationPolicy<decltype(gridZPhi)>
0344       projectedWithSurfaceNavigationPolicy(tContext, tVolume, *tLogger,
0345                                            projectedWithSurfaceConfig,
0346                                            indexedGridZPhi);
0347   // A candidate a off in phi - we get the phi surface now as well
0348   nStream.reset();
0349   navArgs.position =
0350       Vector3(cylinderRadius * std::cos(-std::numbers::pi + 0.8),
0351               cylinderRadius * std::sin(-std::numbers::pi + 0.8), 0.);
0352   projectedWithSurfaceNavigationPolicy.initializeCandidates(
0353       tContext, navArgs, navStream, *tLogger);
0354   BOOST_CHECK_EQUAL(nStream.candidates().size(), 1);
0355 }
0356 
0357 BOOST_AUTO_TEST_CASE(RegularDiscIndexGridTests) {
0358   // Most of the test cases are covered by the plane and cylinder grid and
0359   // planar grid we can concentrate here on multiple fillings
0360 
0361   // Test setup:
0362   // - We create a grid in r: 5 to 25 in 4 bins
0363   // - in phi: -pi to pi in 10 bins
0364   // - We create a few disc sectoral surfaces and let them overlap in r and phi
0365 
0366   // This surface spans in some bins around phi = 0
0367   auto surface0 = Surface::makeShared<DiscSurface>(
0368       Transform3::Identity(),
0369       std::make_shared<RadialBounds>(5., 12., std::numbers::pi / 5, 0.));
0370 
0371   // Tiny surface only in the neighboring bin
0372   auto surface1 = Surface::makeShared<DiscSurface>(
0373       Transform3::Identity(),
0374       std::make_shared<RadialBounds>(6., 8., std::numbers::pi / 12,
0375                                      1.5 * std::numbers::pi / 5));
0376 
0377   double innerRadius = 5.;
0378   double outerRadius = 25.;
0379 
0380   Axis<AxisType::Equidistant, AxisBoundaryType::Bound> axisR(innerRadius,
0381                                                              outerRadius, 4);
0382   Axis<AxisType::Equidistant, AxisBoundaryType::Closed> axisPhi(
0383       -std::numbers::pi, std::numbers::pi, 10);
0384   Grid gridRPhi(Type<std::vector<std::size_t>>, std::move(axisR),
0385                 std::move(axisPhi));
0386 
0387   auto tVolume = TrackingVolume(Transform3::Identity(),
0388                                 std::make_shared<CylinderVolumeBounds>(
0389                                     innerRadius - 1., outerRadius + 1., 5.),
0390                                 "DiscVolume");
0391   tVolume.addSurface(surface0);
0392   tVolume.addSurface(surface1);
0393 
0394   // (1a) - Index grid with center reference generator - no expansion
0395   IndexGrid<decltype(gridRPhi)> indexedGridRPhi(
0396       std::move(gridRPhi), {AxisDirection::AxisR, AxisDirection::AxisPhi});
0397   IndexGridNavigationConfig centerConfig;
0398   centerConfig.referenceGenerator =
0399       std::make_shared<PolyhedronReferenceGenerator>();
0400   IndexGridNavigationPolicy<decltype(gridRPhi)> centerNavigationPolicy(
0401       tContext, tVolume, *tLogger, centerConfig, indexedGridRPhi);
0402 
0403   NavigationDelegate delegate;
0404   BOOST_CHECK_NO_THROW(centerNavigationPolicy.connect(delegate));
0405 
0406   // Now initialize candidates at position (R,0,0) - should yield only surface0
0407   NavigationArguments navArgs;
0408   NavigationStream nStream;
0409   AppendOnlyNavigationStream navStream{nStream};
0410   navArgs.position = Vector3(7.5, 0., 0.);
0411   navArgs.direction = Vector3(1., 0., 0.);
0412   centerNavigationPolicy.initializeCandidates(tContext, navArgs, navStream,
0413                                               *tLogger);
0414   BOOST_CHECK_EQUAL(nStream.candidates().size(), 1);
0415   BOOST_CHECK(&nStream.currentCandidate().surface() == surface0.get());
0416   // Check the neighboring bin, which should not be filled by surface0 and
0417   // surface1
0418   nStream.reset();
0419   navArgs.position = Vector3(7.5 * std::cos(1.1 * std::numbers::pi / 5),
0420                              7.5 * std::sin(1.1 * std::numbers::pi / 5), 0.);
0421   centerNavigationPolicy.initializeCandidates(tContext, navArgs, navStream,
0422                                               *tLogger);
0423   BOOST_CHECK_EQUAL(nStream.candidates().size(), 2);
0424 }
0425 
0426 BOOST_AUTO_TEST_CASE(RegularRingIndexGridTests) {
0427   // This tests the one dimensional closed grid in phi only
0428   // Test setup:
0429   // - We create a grid in phi: -pi to pi in 10 bins
0430 
0431   Axis<AxisType::Equidistant, AxisBoundaryType::Closed> axisPhi(
0432       -std::numbers::pi, std::numbers::pi, 10);
0433   Grid gridPhi(Type<std::vector<std::size_t>>, std::move(axisPhi));
0434 
0435   auto surface = Surface::makeShared<DiscSurface>(
0436       Transform3::Identity(),
0437       std::make_shared<RadialBounds>(6., 14., std::numbers::pi / 5, 0.));
0438 
0439   auto tVolume = TrackingVolume(
0440       Transform3::Identity(),
0441       std::make_shared<CylinderVolumeBounds>(0., 15., 5.), "RingVolume");
0442   tVolume.addSurface(surface);
0443   // (1a) - Index grid with center reference generator - no expansion
0444   IndexGrid<decltype(gridPhi)> indexedGridPhi(std::move(gridPhi),
0445                                               {AxisDirection::AxisPhi});
0446   IndexGridNavigationConfig centerConfig;
0447   centerConfig.referenceGenerator =
0448       std::make_shared<CenterReferenceGenerator>();
0449   BOOST_CHECK_THROW(
0450       {
0451         IndexGridNavigationPolicy<decltype(gridPhi)>
0452             centerNavigationPolicyThrow(tContext, tVolume, *tLogger,
0453                                         centerConfig, indexedGridPhi);
0454       },
0455       std::runtime_error);
0456 
0457   centerConfig.binExpansion = {1u};
0458 
0459   IndexGridNavigationPolicy<decltype(gridPhi)> centerNavigationPolicy(
0460       tContext, tVolume, *tLogger, centerConfig, indexedGridPhi);
0461 
0462   NavigationDelegate delegate;
0463   BOOST_CHECK_NO_THROW(centerNavigationPolicy.connect(delegate));
0464 
0465   // Now initialize candidates at position (R,0,0) - should yield the surface
0466   NavigationArguments navArgs;
0467   NavigationStream nStream;
0468   AppendOnlyNavigationStream navStream{nStream};
0469   navArgs.position = Vector3(10., 0., 0.);
0470   navArgs.direction = Vector3(1., 0., 0.);
0471   centerNavigationPolicy.initializeCandidates(tContext, navArgs, navStream,
0472                                               *tLogger);
0473   BOOST_CHECK_EQUAL(nStream.candidates().size(), 1);
0474 }
0475 
0476 BOOST_AUTO_TEST_SUITE_END()
0477 
0478 }  // namespace ActsTests