19 template <
typename Gr
id2D>
20 void fillGridIndices2D(
22 const std::vector<std::shared_ptr<Acts::Experimental::DetectorVolume>>&
24 const std::array<std::vector<Acts::ActsScalar>, 2
u>& boundaries,
25 const std::array<Acts::BinningValue, 2u>& casts) {
37 if (
v->inside(gctx, zrPosition)) {
38 typename Grid2D::point_t
p{v0, v1};
39 grid.atPosition(
p) = iv;
52 : m_casts(std::
move(binning)) {
54 throw std::invalid_argument(
"Online (z,r) binning is currently supported.");
61 const std::vector<std::shared_ptr<DetectorVolume>>& rootVolumes)
const {
65 using AxesGeneratorType =
68 AxesGeneratorType zrAxes{rzphis[1], rzphis[0]};
71 using GridType =
typename AxesGeneratorType::template grid_type<std::size_t>;
72 GridType
grid(zrAxes());
74 auto casts = std::array<BinningValue, 2u>{m_casts[0
u], m_casts[1
u]};
77 std::array<std::vector<ActsScalar>, 2u>{rzphis[1], rzphis[0]};
78 fillGridIndices2D(gctx, grid, rootVolumes, boundaries, casts);
84 auto indexedDetectorVolumeImpl =
85 std::make_unique<const IndexedDetectorVolumeImpl>(
std::move(grid), casts);
91 return rootVolumeFinder;