26 std::unique_ptr<const Logger> mlogger)
33 std::vector<DigitizationStep> cSteps;
36 auto stepSurfaces = dmodule.
stepSurfaces(startPoint, endPoint);
39 Vector3 trackDirection((endPoint - startPoint).normalized());
42 std::vector<Acts::Intersection3D> stepIntersections;
43 stepIntersections.reserve(stepSurfaces.size() + 1);
46 for (
auto& sSurface : stepSurfaces) {
49 sSurface->intersect(gctx, startPoint, trackDirection,
true).closest();
52 stepIntersections.push_back(sIntersection.intersection());
54 << sIntersection.position().x() <<
", "
55 << sIntersection.position().y() <<
", "
56 << sIntersection.position().z());
60 stepIntersections.push_back(
62 Intersection3D::Status::reachable));
63 std::sort(stepIntersections.begin(), stepIntersections.end(),
66 Vector3 lastPosition = startPoint;
68 cSteps.reserve(stepIntersections.size());
69 for (
auto& sIntersection : stepIntersections) {
73 lastPosition = sIntersection.position();
82 const Vector2& moduleIntersection,
const Vector3& trackDirection)
const {
87 Vector3 intersection3D(moduleIntersection.x(), moduleIntersection.y(), 0.);
90 std::vector<Acts::Intersection3D> boundaryIntersections;
92 for (
auto& bSurface : boundarySurfaces) {
97 bSurface->intersect(gctx, intersection3D, trackDirection,
true)
101 boundaryIntersections.push_back(bIntersection.intersection());
103 << bIntersection.position().x() <<
", "
104 << bIntersection.position().y() <<
", "
105 << bIntersection.position().z());
110 if (attempts == 2 && boundaryIntersections.size() == attempts) {
116 if (boundaryIntersections.size() > 2) {
118 "More than 2 Boundary Surfaces intersected, this is an edge "
119 "case, resolving ... ");
120 std::sort(boundaryIntersections.begin(), boundaryIntersections.end(),
124 if (boundaryIntersections.empty()) {
125 return std::vector<Acts::DigitizationStep>();
128 return cellSteps(gctx, dmodule, boundaryIntersections[0].
position(),
129 boundaryIntersections[1].
position());