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++) {
149 int firstCornerIndex = combinations[bound].first;
150 int secondCornerIndex = combinations[bound].second;
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];
159 double d = (x2-x1)*(x2-x1)+(y2-y1)*(y2-y1);
162 double ax =-(y2-y1)*(y1*x2-x1*y2)/d;
164 double ay = (x2-x1)*(y1*x2-x1*y2)/d;
167 m_bound[bound][2] = sqrt(ax*ax+ay*ay);
182 double y = p[1]-
m_dR;
199 constexpr std::array<int, 3> otherDirections = {
204 for (
const auto& testDirection : otherDirections) {
206 if (testDistance>distance) {
207 distance = testDistance;
208 direction = testDirection;
237 if(!
m_detelement->nearBondGap(
Tp.localPosition(), 3.*sqrt(cov(1, 1))))
245 if(std::abs(distance) <=3. or (distance*distance) <=
tolerance)
249 else if(distance > 0.)