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

refactor!: Move Grid out of detail #2616

Merged
merged 4 commits into from
Nov 3, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
14 changes: 7 additions & 7 deletions Core/include/Acts/Detector/detail/GridAxisGenerators.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#pragma once

#include "Acts/Utilities/detail/Axis.hpp"
#include "Acts/Utilities/detail/Grid.hpp"
#include "Acts/Utilities/Grid.hpp"

#include <array>
#include <tuple>
Expand Down Expand Up @@ -39,7 +39,7 @@ struct Eq {

/// Broadcast the grid type
template <typename T>
using grid_type = Acts::detail::Grid<
using grid_type = Acts::Grid<
T, Acts::detail::Axis<Acts::detail::AxisType::Equidistant, aType>>;

std::array<ActsScalar, 2u> range = {};
Expand Down Expand Up @@ -69,7 +69,7 @@ struct Var {

/// Broadcast the grid type
template <typename T>
using grid_type = Acts::detail::Grid<
using grid_type = Acts::Grid<
T, Acts::detail::Axis<Acts::detail::AxisType::Variable, aType>>;

std::vector<ActsScalar> edges = {};
Expand Down Expand Up @@ -101,7 +101,7 @@ struct EqEq {

/// Broadcast the grid type
template <typename T>
using grid_type = Acts::detail::Grid<
using grid_type = Acts::Grid<
T, Acts::detail::Axis<Acts::detail::AxisType::Equidistant, aType>,
Acts::detail::Axis<Acts::detail::AxisType::Equidistant, bType>>;

Expand Down Expand Up @@ -156,7 +156,7 @@ struct EqVar {

/// Broadcast the grid type
template <typename T>
using grid_type = Acts::detail::Grid<
using grid_type = Acts::Grid<
T, Acts::detail::Axis<Acts::detail::AxisType::Equidistant, aType>,
Acts::detail::Axis<Acts::detail::AxisType::Variable, bType>>;

Expand Down Expand Up @@ -208,7 +208,7 @@ struct VarEq {

/// Broadcast the grid type
template <typename T>
using grid_type = Acts::detail::Grid<
using grid_type = Acts::Grid<
T, Acts::detail::Axis<Acts::detail::AxisType::Variable, aType>,
Acts::detail::Axis<Acts::detail::AxisType::Equidistant, bType>>;

Expand Down Expand Up @@ -260,7 +260,7 @@ struct VarVar {

/// Broadcast the grid type
template <typename T>
using grid_type = Acts::detail::Grid<
using grid_type = Acts::Grid<
T, Acts::detail::Axis<Acts::detail::AxisType::Variable, aType>,
Acts::detail::Axis<Acts::detail::AxisType::Variable, bType>>;

Expand Down
8 changes: 4 additions & 4 deletions Core/include/Acts/MagneticField/BFieldMapUtils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include "Acts/Definitions/Units.hpp"
#include "Acts/MagneticField/InterpolatedBFieldMap.hpp"
#include "Acts/Utilities/detail/AxisFwd.hpp"
#include "Acts/Utilities/detail/Grid.hpp"
#include "Acts/Utilities/Grid.hpp"

#include <array>
#include <cstddef>
Expand Down Expand Up @@ -69,7 +69,7 @@ class SolenoidBField;
/// {-1,0,1} and the BFieldValues will be set to {3,2,3}.
/// @return A field map instance for use in interpolation.
Acts::InterpolatedBFieldMap<
Acts::detail::Grid<Acts::Vector2, Acts::detail::EquidistantAxis,
Acts::Grid<Acts::Vector2, Acts::detail::EquidistantAxis,
Acts::detail::EquidistantAxis>>
fieldMapRZ(const std::function<size_t(std::array<size_t, 2> binsRZ,
std::array<size_t, 2> nBinsRZ)>&
Expand Down Expand Up @@ -127,7 +127,7 @@ fieldMapRZ(const std::function<size_t(std::array<size_t, 2> binsRZ,
/// z-axis grid values will be set to {-1,0,1} and the BFieldValues will
/// be set to {3,2,3}.
/// @return A field map instance for use in interpolation.
Acts::InterpolatedBFieldMap<Acts::detail::Grid<
Acts::InterpolatedBFieldMap<Acts::Grid<
Acts::Vector3, Acts::detail::EquidistantAxis, Acts::detail::EquidistantAxis,
Acts::detail::EquidistantAxis>>
fieldMapXYZ(const std::function<size_t(std::array<size_t, 3> binsXYZ,
Expand All @@ -149,7 +149,7 @@ fieldMapXYZ(const std::function<size_t(std::array<size_t, 3> binsXYZ,
///
/// @return A field map instance for use in interpolation.
Acts::InterpolatedBFieldMap<
Acts::detail::Grid<Acts::Vector2, Acts::detail::EquidistantAxis,
Acts::Grid<Acts::Vector2, Acts::detail::EquidistantAxis,
Acts::detail::EquidistantAxis>>
solenoidFieldMap(std::pair<double, double> rlim, std::pair<double, double> zlim,
std::pair<size_t, size_t> nbins, const SolenoidBField& field);
Expand Down
2 changes: 1 addition & 1 deletion Core/include/Acts/MagneticField/InterpolatedBFieldMap.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include "Acts/MagneticField/MagneticFieldProvider.hpp"
#include "Acts/Utilities/Interpolation.hpp"
#include "Acts/Utilities/Result.hpp"
#include "Acts/Utilities/detail/Grid.hpp"
#include "Acts/Utilities/Grid.hpp"

#include <functional>
#include <optional>
Expand Down
12 changes: 5 additions & 7 deletions Core/include/Acts/Material/MaterialGridHelper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
#include "Acts/Material/Material.hpp"
#include "Acts/Utilities/BinUtility.hpp"
#include "Acts/Utilities/BinningType.hpp"
#include "Acts/Utilities/Grid.hpp"
#include "Acts/Utilities/detail/Axis.hpp"
#include "Acts/Utilities/detail/AxisFwd.hpp"
#include "Acts/Utilities/detail/Grid.hpp"

#include <array>
#include <cstddef>
Expand All @@ -29,14 +29,12 @@ namespace Acts {
class MaterialSlab;

using EAxis = Acts::detail::EquidistantAxis;
using Grid2D =
Acts::detail::Grid<Acts::AccumulatedVolumeMaterial, EAxis, EAxis>;
using Grid3D =
Acts::detail::Grid<Acts::AccumulatedVolumeMaterial, EAxis, EAxis, EAxis>;
using Grid2D = Acts::Grid<Acts::AccumulatedVolumeMaterial, EAxis, EAxis>;
using Grid3D = Acts::Grid<Acts::AccumulatedVolumeMaterial, EAxis, EAxis, EAxis>;
using MaterialGrid2D =
Acts::detail::Grid<Acts::Material::ParametersVector, EAxis, EAxis>;
Acts::Grid<Acts::Material::ParametersVector, EAxis, EAxis>;
using MaterialGrid3D =
Acts::detail::Grid<Acts::Material::ParametersVector, EAxis, EAxis, EAxis>;
Acts::Grid<Acts::Material::ParametersVector, EAxis, EAxis, EAxis>;

using MaterialGridAxisData = std::tuple<double, double, size_t>;

Expand Down
6 changes: 3 additions & 3 deletions Core/include/Acts/Material/MaterialMapUtils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include "Acts/Material/InterpolatedMaterialMap.hpp"
#include "Acts/Material/Material.hpp"
#include "Acts/Utilities/detail/AxisFwd.hpp"
#include "Acts/Utilities/detail/Grid.hpp"
#include "Acts/Utilities/Grid.hpp"

#include <array>
#include <cstddef>
Expand Down Expand Up @@ -59,7 +59,7 @@ class Material;
/// @note The function localToGlobalBin determines how the material was
/// stored in the vector in respect to the grid values
/// @param [in] lengthUnit The unit of the grid points
MaterialMapper<detail::Grid<Material::ParametersVector, detail::EquidistantAxis,
MaterialMapper<Grid<Material::ParametersVector, detail::EquidistantAxis,
detail::EquidistantAxis>>
materialMapperRZ(const std::function<size_t(std::array<size_t, 2> binsRZ,
std::array<size_t, 2> nBinsRZ)>&
Expand Down Expand Up @@ -109,7 +109,7 @@ materialMapperRZ(const std::function<size_t(std::array<size_t, 2> binsRZ,
/// @note The function localToGlobalBin determines how the material was
/// stored in the vector in respect to the grid values
/// @param [in] lengthUnit The unit of the grid points
MaterialMapper<detail::Grid<Material::ParametersVector, detail::EquidistantAxis,
MaterialMapper<Grid<Material::ParametersVector, detail::EquidistantAxis,
detail::EquidistantAxis, detail::EquidistantAxis>>
materialMapperXYZ(const std::function<size_t(std::array<size_t, 3> binsXYZ,
std::array<size_t, 3> nBinsXYZ)>&
Expand Down
2 changes: 1 addition & 1 deletion Core/include/Acts/Navigation/DetectorVolumeFinders.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include "Acts/Navigation/NavigationStateFillers.hpp"
#include "Acts/Navigation/NavigationStateUpdators.hpp"
#include "Acts/Utilities/detail/Axis.hpp"
#include "Acts/Utilities/detail/Grid.hpp"
#include "Acts/Utilities/Grid.hpp"

#include <stdexcept>

Expand Down
4 changes: 2 additions & 2 deletions Core/include/Acts/Navigation/DetectorVolumeUpdators.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include "Acts/Navigation/NavigationStateFillers.hpp"
#include "Acts/Navigation/NavigationStateUpdators.hpp"
#include "Acts/Utilities/detail/Axis.hpp"
#include "Acts/Utilities/detail/Grid.hpp"
#include "Acts/Utilities/Grid.hpp"

#include <stdexcept>

Expand Down Expand Up @@ -70,7 +70,7 @@ using VariableBoundAxis =
Acts::detail::Axis<Acts::detail::AxisType::Variable,
Acts::detail::AxisBoundaryType::Bound>;
using VariableBoundIndexGrid1 =
Acts::detail::Grid<SingleIndex, VariableBoundAxis>;
Acts::Grid<SingleIndex, VariableBoundAxis>;

/// @brief This holds and extracts a collection of detector
/// volumes. Alternatively an extractor could also use the
Expand Down
4 changes: 2 additions & 2 deletions Core/include/Acts/Seeding/SpacePointGrid.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include "Acts/Definitions/Units.hpp"
#include "Acts/Seeding/InternalSpacePoint.hpp"
#include "Acts/Utilities/detail/Axis.hpp"
#include "Acts/Utilities/detail/Grid.hpp"
#include "Acts/Utilities/Grid.hpp"

#include <memory>

Expand Down Expand Up @@ -88,7 +88,7 @@ struct SpacePointGridOptions {
};

template <typename external_spacepoint_t>
using SpacePointGrid = detail::Grid<
using SpacePointGrid = Grid<
std::vector<std::unique_ptr<InternalSpacePoint<external_spacepoint_t>>>,
detail::Axis<detail::AxisType::Equidistant,
detail::AxisBoundaryType::Closed>,
Expand Down
4 changes: 2 additions & 2 deletions Core/include/Acts/Surfaces/SurfaceArray.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include "Acts/Utilities/BinningType.hpp"
#include "Acts/Utilities/IAxis.hpp"
#include "Acts/Utilities/detail/Axis.hpp"
#include "Acts/Utilities/detail/Grid.hpp"
#include "Acts/Utilities/Grid.hpp"

#include <iostream>
#include <type_traits>
Expand Down Expand Up @@ -125,7 +125,7 @@ class SurfaceArray {
/// std::array<double, 1>
using point_t =
std::conditional_t<DIM == 1, std::array<double, 1>, ActsVector<DIM>>;
using Grid_t = detail::Grid<SurfaceVector, Axes...>;
using Grid_t = Grid<SurfaceVector, Axes...>;

/// @brief Default constructor
///
Expand Down
Loading
Loading