Skip to content

Commit

Permalink
Merge branch 'main' into refactor/loop-stepper-utils
Browse files Browse the repository at this point in the history
  • Loading branch information
kodiakhq[bot] authored Nov 3, 2023
2 parents 9732f95 + 76cf010 commit 9535001
Show file tree
Hide file tree
Showing 39 changed files with 131 additions and 147 deletions.
26 changes: 14 additions & 12 deletions Core/include/Acts/Detector/detail/GridAxisGenerators.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

#pragma once

#include "Acts/Utilities/Grid.hpp"
#include "Acts/Utilities/detail/Axis.hpp"
#include "Acts/Utilities/detail/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,8 +69,9 @@ struct Var {

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

std::vector<ActsScalar> edges = {};

Expand Down Expand Up @@ -101,7 +102,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,9 +157,10 @@ struct EqVar {

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

std::array<ActsScalar, 2u> range = {};
std::size_t nBins = 0u;
Expand Down Expand Up @@ -208,7 +210,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,9 +262,9 @@ struct VarVar {

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

std::vector<ActsScalar> edges0 = {};
std::vector<ActsScalar> edges1 = {};
Expand Down
16 changes: 8 additions & 8 deletions Core/include/Acts/MagneticField/BFieldMapUtils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
#include "Acts/Definitions/Algebra.hpp"
#include "Acts/Definitions/Units.hpp"
#include "Acts/MagneticField/InterpolatedBFieldMap.hpp"
#include "Acts/Utilities/Grid.hpp"
#include "Acts/Utilities/detail/AxisFwd.hpp"
#include "Acts/Utilities/detail/Grid.hpp"

#include <array>
#include <cstddef>
Expand Down Expand Up @@ -69,8 +69,8 @@ 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::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)>&
localToGlobalBin,
Expand Down Expand Up @@ -127,9 +127,9 @@ 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::Vector3, Acts::detail::EquidistantAxis, Acts::detail::EquidistantAxis,
Acts::detail::EquidistantAxis>>
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,
std::array<size_t, 3> nBinsXYZ)>&
localToGlobalBin,
Expand All @@ -149,8 +149,8 @@ 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::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 @@ -12,9 +12,9 @@
#include "Acts/MagneticField/MagneticFieldContext.hpp"
#include "Acts/MagneticField/MagneticFieldError.hpp"
#include "Acts/MagneticField/MagneticFieldProvider.hpp"
#include "Acts/Utilities/Grid.hpp"
#include "Acts/Utilities/Interpolation.hpp"
#include "Acts/Utilities/Result.hpp"
#include "Acts/Utilities/detail/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
10 changes: 5 additions & 5 deletions Core/include/Acts/Material/MaterialMapUtils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
#include "Acts/Definitions/Units.hpp"
#include "Acts/Material/InterpolatedMaterialMap.hpp"
#include "Acts/Material/Material.hpp"
#include "Acts/Utilities/Grid.hpp"
#include "Acts/Utilities/detail/AxisFwd.hpp"
#include "Acts/Utilities/detail/Grid.hpp"

#include <array>
#include <cstddef>
Expand Down Expand Up @@ -59,8 +59,8 @@ 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,
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)>&
materialVectorToGridMapper,
Expand Down Expand Up @@ -109,8 +109,8 @@ 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,
detail::EquidistantAxis, 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)>&
materialVectorToGridMapper,
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 @@ -15,8 +15,8 @@
#include "Acts/Navigation/NavigationState.hpp"
#include "Acts/Navigation/NavigationStateFillers.hpp"
#include "Acts/Navigation/NavigationStateUpdators.hpp"
#include "Acts/Utilities/Grid.hpp"
#include "Acts/Utilities/detail/Axis.hpp"
#include "Acts/Utilities/detail/Grid.hpp"

#include <stdexcept>

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

#include <stdexcept>

Expand Down Expand Up @@ -69,8 +69,7 @@ using SingleIndex = std::size_t;
using VariableBoundAxis =
Acts::detail::Axis<Acts::detail::AxisType::Variable,
Acts::detail::AxisBoundaryType::Bound>;
using VariableBoundIndexGrid1 =
Acts::detail::Grid<SingleIndex, VariableBoundAxis>;
using VariableBoundIndexGrid1 = 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 @@ -10,8 +10,8 @@

#include "Acts/Definitions/Units.hpp"
#include "Acts/Seeding/InternalSpacePoint.hpp"
#include "Acts/Utilities/Grid.hpp"
#include "Acts/Utilities/detail/Axis.hpp"
#include "Acts/Utilities/detail/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 @@ -11,9 +11,9 @@
#include "Acts/Geometry/GeometryContext.hpp"
#include "Acts/Surfaces/Surface.hpp"
#include "Acts/Utilities/BinningType.hpp"
#include "Acts/Utilities/Grid.hpp"
#include "Acts/Utilities/IAxis.hpp"
#include "Acts/Utilities/detail/Axis.hpp"
#include "Acts/Utilities/detail/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

0 comments on commit 9535001

Please sign in to comment.