Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: naming of other navigation delegates #3199

Merged
merged 3 commits into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Core/include/Acts/Navigation/DetectorVolumeFinders.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ struct IndexedDetectorVolumeExtractor {
/// @tparam grid_type is the grid type used for this
template <typename grid_type>
using IndexedDetectorVolumesImpl =
IndexedUpdaterImpl<IExternalNavigation, grid_type,
IndexedDetectorVolumeExtractor, DetectorVolumeFiller>;
IndexedGridNavigation<IExternalNavigation, grid_type,
IndexedDetectorVolumeExtractor, DetectorVolumeFiller>;

} // namespace Acts::Experimental
8 changes: 4 additions & 4 deletions Core/include/Acts/Navigation/InternalNavigation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ struct AdditionalSurfacesNavigation : public IInternalNavigation {
/// @tparam grid_type is the grid type used for this indexed lookup
template <typename grid_type>
using IndexedSurfacesNavigation =
IndexedUpdaterImpl<IInternalNavigation, grid_type, IndexedSurfacesExtractor,
SurfacesFiller>;
IndexedGridNavigation<IInternalNavigation, grid_type,
IndexedSurfacesExtractor, SurfacesFiller>;

/// @brief An indexed multi layer surface implementation access
///
Expand All @@ -155,7 +155,7 @@ using MultiLayerSurfacesNavigation =
///@tparam inexed_updator is the updator for the indexed surfaces
template <typename grid_type, template <typename> class indexed_updator>
using IndexedSurfacesAllPortalsNavigation =
ChainedUpdaterImpl<IInternalNavigation, AllPortalsNavigation,
indexed_updator<grid_type>>;
ChainedNavigation<IInternalNavigation, AllPortalsNavigation,
indexed_updator<grid_type>>;

} // namespace Acts::Experimental
14 changes: 7 additions & 7 deletions Core/include/Acts/Navigation/NavigationStateUpdaters.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ class StaticAccessNavigation : public navigation_type {
///
template <typename navigation_type, typename grid_t, typename extractor_type,
typename filler_type>
class IndexedUpdaterImpl : public navigation_type {
class IndexedGridNavigation : public navigation_type {
public:
/// Broadcast the grid type
using grid_type = grid_t;
Expand All @@ -159,12 +159,12 @@ class IndexedUpdaterImpl : public navigation_type {
/// @param igrid the grid that is moved into this attacher
/// @param icasts is the cast values array
/// @param itr a transform applied to the global position
IndexedUpdaterImpl(grid_type&& igrid,
const std::array<BinningValue, grid_type::DIM>& icasts,
const Transform3& itr = Transform3::Identity())
IndexedGridNavigation(grid_type&& igrid,
const std::array<BinningValue, grid_type::DIM>& icasts,
const Transform3& itr = Transform3::Identity())
: grid(std::move(igrid)), casts(icasts), transform(itr) {}

IndexedUpdaterImpl() = delete;
IndexedGridNavigation() = delete;

/// @brief updates the navigation state with objects from the grid according
/// to the filling type AFTER applying `p3loc = transform * p3`
Expand Down Expand Up @@ -197,7 +197,7 @@ class IndexedUpdaterImpl : public navigation_type {
/// @tparam updators_t the updators that will be called in sequence
///
template <typename navigation_type, typename... updators_t>
class ChainedUpdaterImpl : public navigation_type {
class ChainedNavigation : public navigation_type {
public:
/// The stored updators
std::tuple<updators_t...> updators;
Expand All @@ -206,7 +206,7 @@ class ChainedUpdaterImpl : public navigation_type {
/// the tuple and call them in sequence
///
/// @param upts the updators to be called in chain
ChainedUpdaterImpl(const std::tuple<updators_t...>&& upts)
ChainedNavigation(const std::tuple<updators_t...>&& upts)
: updators(std::move(upts)) {}

/// A combined navigation state updator w/o intersection specifics
Expand Down
4 changes: 2 additions & 2 deletions Core/include/Acts/Navigation/PortalNavigation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ struct DetectorVolumesCollection {
///
struct BoundVolumesGrid1Navigation : public IExternalNavigation {
using IndexedUpdater =
IndexedUpdaterImpl<IExternalNavigation, VariableBoundIndexGrid1,
DetectorVolumesCollection, DetectorVolumeFiller>;
IndexedGridNavigation<IExternalNavigation, VariableBoundIndexGrid1,
DetectorVolumesCollection, DetectorVolumeFiller>;
// The indexed updator
IndexedUpdater indexedUpdater;

Expand Down
5 changes: 3 additions & 2 deletions Core/src/Detector/IndexedRootVolumeFinderBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,9 @@ Acts::Experimental::IndexedRootVolumeFinderBuilder::construct(
fillGridIndices2D(gctx, grid, rootVolumes, boundaries, casts);

using IndexedDetectorVolumesImpl =
IndexedUpdaterImpl<IExternalNavigation, GridType,
IndexedDetectorVolumeExtractor, DetectorVolumeFiller>;
IndexedGridNavigation<IExternalNavigation, GridType,
IndexedDetectorVolumeExtractor,
DetectorVolumeFiller>;

auto indexedDetectorVolumeImpl =
std::make_unique<const IndexedDetectorVolumesImpl>(std::move(grid),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ void convert(nlohmann::json& jIndexedVolumes,
bool detray, [[maybe_unused]] const instance_type& refInstance) {
using GridType = typename instance_type::template grid_type<std::size_t>;
// Defining a Delegate type
using DelegateType = Experimental::IndexedUpdaterImpl<
using DelegateType = Experimental::IndexedGridNavigation<
Experimental::IExternalNavigation, GridType,
Experimental::IndexedDetectorVolumeExtractor,
Experimental::DetectorVolumeFiller>;
Expand Down
9 changes: 5 additions & 4 deletions Plugins/Json/src/DetectorVolumeFinderJsonConverter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,11 @@ struct IndexedVolumesGenerator {
grid_type&& grid,
const std::array<Acts::BinningValue, grid_type::DIM>& bv,
const Acts::Transform3& transform) {
using IndexedDetectorVolumesImpl = Acts::Experimental::IndexedUpdaterImpl<
Acts::Experimental::IExternalNavigation, grid_type,
Acts::Experimental::IndexedDetectorVolumeExtractor,
Acts::Experimental::DetectorVolumeFiller>;
using IndexedDetectorVolumesImpl =
Acts::Experimental::IndexedGridNavigation<
Acts::Experimental::IExternalNavigation, grid_type,
Acts::Experimental::IndexedDetectorVolumeExtractor,
Acts::Experimental::DetectorVolumeFiller>;

auto indexedDetectorVolumeImpl =
std::make_unique<const IndexedDetectorVolumesImpl>(std::move(grid), bv,
Expand Down
10 changes: 5 additions & 5 deletions Tests/UnitTests/Core/Navigation/NavigationStateUpdatersTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ BOOST_AUTO_TEST_CASE(AllPortalsAllSurfaces) {

AllPortalsProvider allPortals;
AllSurfacesProvider allSurfaces;
auto allPortalsAllSurfaces = Acts::Experimental::ChainedUpdaterImpl<
auto allPortalsAllSurfaces = Acts::Experimental::ChainedNavigation<
Acts::Experimental::IInternalNavigation, AllPortalsProvider,
AllSurfacesProvider>(std::tie(allPortals, allSurfaces));

Expand All @@ -259,13 +259,13 @@ BOOST_AUTO_TEST_CASE(AllPortalsGrid1DSurfaces) {

AllPortalsProvider allPortals;
Acts::MultiGrid1D grid;
using Grid1DSurfacesProvider = Acts::Experimental::IndexedUpdaterImpl<
using Grid1DSurfacesProvider = Acts::Experimental::IndexedGridNavigation<
Acts::Experimental::IInternalNavigation, decltype(grid),
Acts::Experimental::IndexedSurfacesExtractor,
Acts::Experimental::SurfacesFiller>;
auto grid1DSurfaces = Grid1DSurfacesProvider(std::move(grid), {Acts::binR});

auto allPortalsGrid1DSurfaces = Acts::Experimental::ChainedUpdaterImpl<
auto allPortalsGrid1DSurfaces = Acts::Experimental::ChainedNavigation<
Acts::Experimental::IInternalNavigation, AllPortalsProvider,
Grid1DSurfacesProvider>(std::tie(allPortals, grid1DSurfaces));

Expand All @@ -285,14 +285,14 @@ BOOST_AUTO_TEST_CASE(AllPortalsGrid2DSurfaces) {

AllPortalsProvider allPortals;
Acts::MultiGrid2D grid;
using Grid2DSurfacesProvider = Acts::Experimental::IndexedUpdaterImpl<
using Grid2DSurfacesProvider = Acts::Experimental::IndexedGridNavigation<
Acts::Experimental::IInternalNavigation, decltype(grid),
Acts::Experimental::IndexedSurfacesExtractor,
Acts::Experimental::SurfacesFiller>;
auto grid2DSurfaces =
Grid2DSurfacesProvider(std::move(grid), {Acts::binR, Acts::binZ});

auto allPortalsGrid2DSurfaces = Acts::Experimental::ChainedUpdaterImpl<
auto allPortalsGrid2DSurfaces = Acts::Experimental::ChainedNavigation<
Acts::Experimental::IInternalNavigation, AllPortalsProvider,
Grid2DSurfacesProvider>(std::tie(allPortals, grid2DSurfaces));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ BOOST_AUTO_TEST_CASE(RzVolumes) {

auto casts = std::array<Acts::BinningValue, 2u>{Acts::binZ, Acts::binR};

using IndexedDetectorVolumesImpl = Acts::Experimental::IndexedUpdaterImpl<
using IndexedDetectorVolumesImpl = Acts::Experimental::IndexedGridNavigation<
Acts::Experimental::IExternalNavigation, GridType,
Acts::Experimental::IndexedDetectorVolumeExtractor,
Acts::Experimental::DetectorVolumeFiller>;
Expand Down
Loading