15 Vector3D dir1 = invTrans.linear() * direction;
18 double tan2Alpha = bounds().tanAlpha() * bounds().tanAlpha(),
19 A = dir1.x() * dir1.x() + dir1.y() * dir1.y() -
20 tan2Alpha * dir1.z() * dir1.z(),
21 B = 2 * (dir1.x() * point1.x() + dir1.y() * point1.y() -
22 tan2Alpha * dir1.z() * point1.z()),
23 C = point1.x() * point1.x() + point1.y() * point1.y() -
24 tan2Alpha * point1.z() * point1.z();
36 auto qe = intersectionSolver(gctx, position, direction);
39 if (qe.solutions == 0) {
44 Vector3D solution1 = position + qe.first * direction;
47 ? Intersection3D::Status::onSurface
48 : Intersection3D::Status::reachable;
50 if (bcheck and not isOnSurface(gctx, solution1, direction, bcheck)) {
51 status1 = Intersection3D::Status::missed;
55 Vector3D solution2 = position + qe.first * direction;
58 ? Intersection3D::Status::onSurface
59 : Intersection3D::Status::reachable;
60 if (bcheck and not isOnSurface(gctx, solution2, direction, bcheck)) {
61 status2 = Intersection3D::Status::missed;
70 bool check1 = status1 != Intersection3D::Status::missed or
71 (status1 == Intersection3D::Status::missed and
72 status2 == Intersection3D::Status::missed);
74 if ((check1 and qe.first * qe.first < qe.second * qe.second) or
75 status2 == Intersection3D::Status::missed) {
77 if (qe.solutions > 1) {
82 if (qe.solutions > 1) {
91 ConeSurface::localCartesianToBoundLocalDerivative(
99 const double lr =
perp(localPos);
100 const double lphi =
phi(localPos);
101 const double lcphi =
std::cos(lphi);
102 const double lsphi = std::sin(lphi);
104 const double R = localPos.z() * bounds().tanAlpha();
106 LocalCartesianToBoundLocalMatrix::Zero();
107 loc3DToLocBound << -R * lsphi / lr, R * lcphi / lr,
108 lphi * bounds().tanAlpha(), 0, 0, 1;
110 return loc3DToLocBound;