38 double x[4],
y[4],
z[4];
39 double Ax[3] = {1., 0., 0.};
40 double Ay[3] = {0., 1., 0.};
54 auto corners = annulusBounds->
corners();
56 x[0] = corners[0].first;
57 y[0] = corners[0].second -
m_dR;
60 x[1] = corners[1].first;
61 y[1] = corners[1].second -
m_dR;
64 x[2] = corners[2].first;
65 y[2] = corners[2].second -
m_dR;
68 x[3] = corners[3].first;
69 y[3] = corners[3].second -
m_dR;
89 x[0] =
AF.x()*Swmax+
AE.x()*Sl;
90 y[0] =
AF.y()*Swmax+
AE.y()*Sl;
91 z[0] =
AF.z()*Swmax+
AE.z()*Sl;
93 x[1] =
AF.x()*Swmin-
AE.x()*Sl;
94 y[1] =
AF.y()*Swmin-
AE.y()*Sl;
95 z[1] =
AF.z()*Swmin-
AE.z()*Sl;
97 x[2] =-
AF.x()*Swmin-
AE.x()*Sl;
98 y[2] =-
AF.y()*Swmin-
AE.y()*Sl;
99 z[2] =-
AF.z()*Swmin-
AE.z()*Sl;
101 x[3] =-
AF.x()*Swmax+
AE.x()*Sl;
102 y[3] =-
AF.y()*Swmax+
AE.y()*Sl;
103 z[3] =-
AF.z()*Swmax+
AE.z()*Sl;
144 constexpr std::array<std::pair<int, int>, 4>
combinations = {
145 {{0, 1}, {1, 2}, {2, 3}, {3, 0}}};
146 for (
unsigned int bound = 0; bound <
combinations.size(); bound++) {
153 double x1 =
x[firstCornerIndex]*Ax[0]+
y[firstCornerIndex]*Ax[1]+
z[firstCornerIndex]*Ax[2];
154 double y1 =
x[firstCornerIndex]*Ay[0]+
y[firstCornerIndex]*Ay[1]+
z[firstCornerIndex]*Ay[2];
155 double x2 =
x[secondCornerIndex]*Ax[0]+
y[secondCornerIndex]*Ax[1]+
z[secondCornerIndex]*Ax[2];
156 double y2 =
x[secondCornerIndex]*Ay[0]+
y[secondCornerIndex]*Ay[1]+
z[secondCornerIndex]*Ay[2];
195 int direction = InDet::SiDetElementBoundaryLink_xk::AxisDirection::PositiveX;
199 constexpr std::array<int, 3> otherDirections = {
200 InDet::SiDetElementBoundaryLink_xk::AxisDirection::NegativeY,
201 InDet::SiDetElementBoundaryLink_xk::AxisDirection::NegativeX,
202 InDet::SiDetElementBoundaryLink_xk::AxisDirection::PositiveY};
204 for (
const auto& testDirection : otherDirections) {
208 direction = testDirection;
215 return InDet::SiDetElementBoundaryLink_xk::IntersectionStatus::Outside;
227 return InDet::SiDetElementBoundaryLink_xk::IntersectionStatus::NotInsideNorOutside;
232 return InDet::SiDetElementBoundaryLink_xk::IntersectionStatus::Outside;
238 return InDet::SiDetElementBoundaryLink_xk::IntersectionStatus::Inside;
246 return InDet::SiDetElementBoundaryLink_xk::IntersectionStatus::NotInsideNorOutside;
250 return InDet::SiDetElementBoundaryLink_xk::IntersectionStatus::Outside;
253 return InDet::SiDetElementBoundaryLink_xk::IntersectionStatus::Inside;
258 return InDet::SiDetElementBoundaryLink_xk::IntersectionStatus::NotInsideNorOutside;