21 std::unique_ptr<const Logger> mlogger)
22 : m_logger(std::move(mlogger)) {}
28 std::vector<DigitizationStep> cSteps;
31 auto& stepSurfaces = dmodule.
stepSurfaces(startPoint, endPoint);
34 Vector3D trackDirection((endPoint - startPoint).normalized());
37 std::vector<Acts::Intersection3D> stepIntersections;
38 stepIntersections.reserve(stepSurfaces.size() + 1);
41 for (
auto& sSurface : stepSurfaces) {
44 sSurface->intersect(gctx, startPoint, trackDirection,
true);
45 if (
bool(sIntersection)) {
47 stepIntersections.push_back(sIntersection.intersection);
49 << sIntersection.intersection.position.x() <<
", "
50 << sIntersection.intersection.position.y() <<
", "
51 << sIntersection.intersection.position.z());
55 stepIntersections.push_back(
57 Intersection3D::Status::reachable));
58 std::sort(stepIntersections.begin(), stepIntersections.end());
62 cSteps.reserve(stepIntersections.size());
63 for (
auto& sIntersection : stepIntersections) {
67 lastPosition = sIntersection.position;
81 Vector3D intersection3D(moduleIntersection.x(), moduleIntersection.y(), 0.);
84 std::vector<Acts::Intersection3D> boundaryIntersections;
86 for (
auto& bSurface : boundarySurfaces) {
91 bSurface->intersect(gctx, intersection3D, trackDirection,
true);
92 if (
bool(bIntersection)) {
94 boundaryIntersections.push_back(bIntersection.intersection);
96 << bIntersection.intersection.position.x() <<
", "
97 << bIntersection.intersection.position.y() <<
", "
98 << bIntersection.intersection.position.z());
103 if (attempts == 2 && boundaryIntersections.size() == attempts) {
109 if (boundaryIntersections.size() > 2) {
111 "More than 2 Boundary Surfaces intersected, this is an edge "
112 "case, resolving ... ");
113 std::sort(boundaryIntersections.begin(), boundaryIntersections.end());
116 if (boundaryIntersections.empty()) {
117 return std::vector<Acts::DigitizationStep>();
120 return cellSteps(gctx, dmodule, boundaryIntersections[0].
position,
121 boundaryIntersections[1].position);