18 const auto& tMatrix = sTransform.matrix();
19 Vector3D lineDirection(tMatrix(0, 2), tMatrix(1, 2), tMatrix(2, 2));
22 Vector3D radiusAxisGlobal(lineDirection.cross(momentum));
26 lposition[
eLOC_R] * radiusAxisGlobal.normalized());
36 const auto& tMatrix = sTransform.matrix();
37 Vector3D lineDirection(tMatrix(0, 2), tMatrix(1, 2), tMatrix(2, 2));
42 Vector3D sCenter(tMatrix(0, 3), tMatrix(1, 3), tMatrix(2, 3));
45 double sign = ((lineDirection.cross(momentum)).dot(decVec) < 0.) ? -1. : 1.;
51 return "Acts::LineSurface";
58 const auto& tMatrix =
transform(gctx).matrix();
59 Vector3D measY(tMatrix(0, 2), tMatrix(1, 2), tMatrix(2, 2));
60 Vector3D measX(measY.cross(momentum).normalized());
61 Vector3D measDepth(measX.cross(measY));
63 mFrame.col(0) = measX;
64 mFrame.col(1) = measY;
65 mFrame.col(2) = measDepth;
76 inline const Vector3D LineSurface::binningPosition(
83 const auto& tMatrix =
transform(gctx).matrix();
84 return Vector3D(tMatrix(0, 2), tMatrix(1, 2), tMatrix(2, 2));
89 return (*m_bounds.get());
102 const auto& tMatrix =
transform(gctx).matrix();
103 Vector3D mb = tMatrix.block<3, 1>(0, 3).transpose();
104 Vector3D eb = tMatrix.block<3, 1>(0, 2).transpose();
107 double eaTeb = ea.dot(eb);
108 double denom = 1 - eaTeb * eaTeb;
112 double u = (mab.dot(ea) - mab.dot(eb) * eaTeb) / denom;
115 ? Intersection::Status::onSurface
116 : Intersection::Status::reachable;
120 if (bcheck and m_bounds) {
122 const Vector3D vecLocal(result - mb);
123 double cZ = vecLocal.dot(eb);
126 if ((cZ * cZ > hZ * hZ) or
127 ((vecLocal - cZ * eb).
norm() >
129 status = Intersection::Status::missed;
149 const double x = direction(0);
150 const double y = direction(1);
151 const double z = direction(2);
154 const double cos_theta =
z;
155 const double sin_theta = sqrt(x * x + y * y);
156 const double inv_sin_theta = 1. / sin_theta;
157 const double cos_phi = x * inv_sin_theta;
158 const double sin_phi = y * inv_sin_theta;
160 const auto rframe = referenceFrame(gctx, position, direction);
162 jacobian.topLeftCorner<3, 2>() = rframe.topLeftCorner<3, 2>();
166 jacobian(4,
ePHI) = (-sin_theta) * sin_phi;
167 jacobian(4,
eTHETA) = cos_theta * cos_phi;
168 jacobian(5,
ePHI) = sin_theta * cos_phi;
169 jacobian(5,
eTHETA) = cos_theta * sin_phi;
170 jacobian(6,
eTHETA) = (-sin_theta);
171 jacobian(7,
eQOP) = 1;
174 double ipdn = 1. / direction.dot(rframe.col(2));
176 auto dDPhiY = rframe.block<3, 1>(0, 1).
cross(jacobian.block<3, 1>(4,
ePHI));
179 rframe.block<3, 1>(0, 1).
cross(jacobian.block<3, 1>(4,
eTHETA));
181 dDPhiY -= rframe.block<3, 1>(0, 0) * (rframe.block<3, 1>(0, 0).dot(dDPhiY));
183 rframe.block<3, 1>(0, 0) * (rframe.block<3, 1>(0, 0).dot(dDThetaY));
185 jacobian.block<3, 1>(0,
ePHI) = dDPhiY * pars[
eLOC_0] * ipdn;
186 jacobian.block<3, 1>(0,
eTHETA) = dDThetaY * pars[
eLOC_0] * ipdn;
198 double long_c = locz * direction;
207 double norm = 1. / (1. - long_c * long_c);
211 long_mat.colwise() += locz.transpose();
214 (s_vec - pc * (long_mat * d_vec.asDiagonal() -