21 namespace Experimental {
23 template <
typename gr
id_t,
typename path_generator>
36 std::array<BinningValue, grid_type::DIM>
casts{};
46 grid_type&& igrid,
const std::array<BinningValue, grid_type::DIM>& icasts,
47 const Transform3& itr = Transform3::Identity())
53 auto step = std::sqrt(std::pow(
grid.binWidth()[0], 2) +
54 std::pow(
grid.binWidth()[1], 2));
56 grid.numLocalBins()[1]);
58 std::vector<const Acts::Surface*> surfCandidates = {};
60 for (
const auto&
p :
path) {
62 const auto extracted =
64 surfCandidates.insert(surfCandidates.end(), extracted.begin(),
82 std::array<ActsScalar, grid_type::DIM> casted{};
84 std::make_integer_sequence<std::size_t, grid_type::DIM>{});
93 std::vector<const Acts::Surface*>& surfaces)
const {
95 std::sort(surfaces.begin(), surfaces.end(),
96 [&
gctx](
const auto& surf1,
const auto& surf2) {
97 if (surf1->center(gctx).x() != surf2->center(gctx).x()) {
98 return surf1->center(gctx).x() < surf2->center(gctx).x();
100 if (surf1->center(gctx).y() != surf2->center(gctx).y()) {
101 return surf1->center(gctx).y() < surf2->center(gctx).y();
103 return surf1->center(gctx).z() < surf2->center(gctx).z();
107 surfaces.erase(std::unique(surfaces.begin(), surfaces.end()),
115 template <
typename Array, std::size_t...
idx>
117 std::index_sequence<idx...> )
const {
125 std::size_t numberOfSteps)
const {
126 std::vector<Vector3> pathCoordinates = {};
127 pathCoordinates.reserve(numberOfSteps);
129 auto tposition =
std::move(startPosition);
133 for (std::size_t
i = 0;
i < numberOfSteps;
i++) {
134 pathCoordinates.push_back(tposition);
135 tposition.y() = tposition.y() + stepSizeY;
136 tposition.x() = tposition.x() + stepSizeX;
139 return pathCoordinates;