32 template <
typename gr
id_type>
34 grid_type&&
grid,
const std::array<Acts::BinningValue, grid_type::DIM>& bv,
45 auto indexedSurfacesAllPortals = std::make_unique<const DelegateType>(
46 std::tie(allPortals, indexedSurfaces));
60 const nlohmann::json& jSurfaceNavigation) {
65 auto eqExtractor = [](
const nlohmann::json& jAxis)
66 -> std::tuple<std::array<ActsScalar, 2u>, std::size_t> {
67 std::array<ActsScalar, 2u> range = jAxis[
"range"];
68 std::size_t
bins = jAxis[
"bins"];
72 auto vExtractor = [](
const nlohmann::json& jAxis) -> std::vector<ActsScalar> {
73 return std::vector<ActsScalar>(jAxis[
"boundaries"]);
77 if (jSurfaceNavigation[
"type"] ==
"IndexedSurfaces") {
78 if (jSurfaceNavigation.find(
"grid") != jSurfaceNavigation.end()) {
81 auto jGrid = jSurfaceNavigation[
"grid"];
83 jSurfaceNavigation[
"casts"].get<std::vector<BinningValue>>();
84 auto jAxes = jGrid[
"axes"];
87 if (jAxes.size() == 1
u) {
89 auto jAxis = jAxes[0
u];
95 if (axisType == detail::AxisType::Equidistant) {
96 auto [range,
bins] = eqExtractor(jAxis);
97 if (axisBoundaryType == detail::AxisBoundaryType::Closed) {
108 if (axisBoundaryType == detail::AxisBoundaryType::Closed) {
118 }
else if (jAxes.size() == 2
u) {
124 auto jAxisA = jAxes[0
u];
125 auto jAxisB = jAxes[1
u];
131 if (axisBoundaryTypeB != detail::AxisBoundaryType::Closed) {
133 if (axisTypeA == detail::AxisType::Equidistant) {
134 auto [rangeA, binsA] = eqExtractor(jAxisA);
135 if (axisTypeB == detail::AxisType::Equidistant) {
136 auto [rangeB, binsB] = eqExtractor(jAxisB);
148 if (axisTypeB == detail::AxisType::Equidistant) {
149 auto [rangeB, binsB] = eqExtractor(jAxisB);
163 if (axisTypeA == detail::AxisType::Equidistant) {
164 auto [rangeA, binsA] = eqExtractor(jAxisA);
165 if (axisTypeB == detail::AxisType::Equidistant) {
166 auto [rangeB, binsB] = eqExtractor(jAxisB);
178 if (axisTypeB == detail::AxisType::Equidistant) {
179 auto [rangeB, binsB] = eqExtractor(jAxisB);