13 const auto& tMatrix = sTransform.matrix();
14 Vector3D lineDirection(tMatrix(0, 2), tMatrix(1, 2), tMatrix(2, 2));
17 Vector3D radiusAxisGlobal(lineDirection.cross(momentum));
21 lposition[
eBoundLoc0] * radiusAxisGlobal.normalized());
30 const auto& tMatrix = sTransform.matrix();
31 Vector3D lineDirection(tMatrix(0, 2), tMatrix(1, 2), tMatrix(2, 2));
36 Vector3D sCenter(tMatrix(0, 3), tMatrix(1, 3), tMatrix(2, 3));
39 double sign = ((lineDirection.cross(momentum)).dot(decVec) < 0.) ? -1. : 1.;
45 return "Acts::LineSurface";
52 const auto& tMatrix =
transform(gctx).matrix();
53 Vector3D measY(tMatrix(0, 2), tMatrix(1, 2), tMatrix(2, 2));
54 Vector3D measX(measY.cross(momentum).normalized());
55 Vector3D measDepth(measX.cross(measY));
57 mFrame.col(0) = measX;
58 mFrame.col(1) = measY;
59 mFrame.col(2) = measDepth;
77 const auto& tMatrix =
transform(gctx).matrix();
78 return Vector3D(tMatrix(0, 2), tMatrix(1, 2), tMatrix(2, 2));
83 return (*m_bounds.get());
96 const auto& tMatrix =
transform(gctx).matrix();
97 Vector3D mb = tMatrix.block<3, 1>(0, 3).transpose();
98 Vector3D eb = tMatrix.block<3, 1>(0, 2).transpose();
101 double eaTeb = ea.dot(eb);
102 double denom = 1 - eaTeb * eaTeb;
106 double u = (mab.dot(ea) - mab.dot(eb) * eaTeb) / denom;
109 ? Intersection3D::Status::onSurface
110 : Intersection3D::Status::reachable;
114 if (bcheck and m_bounds) {
116 const Vector3D vecLocal(result - mb);
117 double cZ = vecLocal.dot(eb);
120 if ((cZ * cZ > hZ * hZ) or
121 ((vecLocal - cZ * eb).norm() >
123 status = Intersection3D::Status::missed;
144 const double x = direction(0);
145 const double y = direction(1);
146 const double z = direction(2);
149 const double cos_theta =
z;
150 const double sin_theta = sqrt(x * x + y * y);
151 const double inv_sin_theta = 1. / sin_theta;
152 const double cos_phi = x * inv_sin_theta;
153 const double sin_phi = y * inv_sin_theta;
155 const auto rframe = referenceFrame(gctx, position, direction);
157 jacobian.topLeftCorner<3, 2>() = rframe.topLeftCorner<3, 2>();
161 jacobian(4,
eBoundPhi) = (-sin_theta) * sin_phi;
163 jacobian(5,
eBoundPhi) = sin_theta * cos_phi;
169 double ipdn = 1. / direction.dot(rframe.col(2));
172 rframe.block<3, 1>(0, 1).
cross(jacobian.block<3, 1>(4,
eBoundPhi));
177 dDPhiY -= rframe.block<3, 1>(0, 0) * (rframe.block<3, 1>(0, 0).dot(dDPhiY));
179 rframe.block<3, 1>(0, 0) * (rframe.block<3, 1>(0, 0).dot(dDThetaY));
194 double long_c = locz * direction;
198 norm_vec * jacobian.topLeftCorner<3,
eBoundSize>();
202 double norm = 1. / (1. - long_c * long_c);
205 long_mat.colwise() += locz.transpose();
207 return (norm * (s_vec - pc * (long_mat * d_vec.asDiagonal() -
216 (position - center(gctx)).transpose();
218 const auto& sTransform =
transform(gctx);
219 const auto& rotation = sTransform.rotation();
221 const Vector3D localZAxis = rotation.col(2);
223 const double localZ = pcRowVec * localZAxis;
226 const double dirZ = localZAxis.dot(direction);
227 const double norm = 1. / (1. - dirZ * dirZ);
232 norm * (direction.transpose() - dirZ * localZAxis.transpose());
234 norm * (dirZ * pcRowVec + localZ * direction.transpose()) *
241 LineSurface::localCartesianToBoundLocalDerivative(
245 const auto& sTransform =
transform(gctx);
248 const double lphi =
phi(localPos);
249 const double lcphi =
std::cos(lphi);
250 const double lsphi = std::sin(lphi);
252 LocalCartesianToBoundLocalMatrix::Zero();
253 loc3DToLocBound << lcphi, lsphi, 0, 0, 0, 1;
255 return loc3DToLocBound;