23 const std::array<double, eSize>&
values) noexcept(
false)
47 double m = std::tan(
phi);
49 double x1 = (O_x + O_y * m -
50 std::sqrt(-std::pow(O_x, 2) * std::pow(m, 2) +
51 2 * O_x * O_y * m - std::pow(O_y, 2) +
52 std::pow(m, 2) * std::pow(r, 2) + std::pow(r, 2))) /
54 double x2 = (O_x + O_y * m +
55 std::sqrt(-std::pow(O_x, 2) * std::pow(m, 2) +
56 2 * O_x * O_y * m - std::pow(O_y, 2) +
57 std::pow(m, 2) * std::pow(r, 2) + std::pow(r, 2))) /
61 if (v1.dot(dir) > 0) {
72 circIx(m_moduleOrigin[eBoundLoc0], m_moduleOrigin[eBoundLoc1],
get(eMinR),
75 circIx(m_moduleOrigin[eBoundLoc0], m_moduleOrigin[eBoundLoc1],
get(eMaxR),
78 circIx(m_moduleOrigin[eBoundLoc0], m_moduleOrigin[eBoundLoc1],
get(eMinR),
104 unsigned int lseg)
const {
107 std::vector<Acts::Vector2> rvertices;
118 for (
unsigned int iseg = 0; iseg < phisInner.size() - 1; ++iseg) {
119 int addon = (iseg == phisInner.size() - 2) ? 1 : 0;
120 detail::VerticesHelper::createSegment<Vector2, Transform2>(
121 rvertices, {
get(eMinR),
get(eMinR)}, phisInner[iseg],
122 phisInner[iseg + 1], lseg, addon);
125 for (
unsigned int iseg = 0; iseg < phisOuter.size() - 1; ++iseg) {
126 int addon = (iseg == phisOuter.size() - 2) ? 1 : 0;
127 detail::VerticesHelper::createSegment<Vector2, Transform2>(
128 rvertices, {
get(eMaxR),
get(eMaxR)}, phisOuter[iseg],
129 phisOuter[iseg + 1], lseg, addon);
131 std::for_each(rvertices.begin(), rvertices.end(),
140 double tolPhi)
const {
147 if (phiLoc < (
get(eMinPhiRel) - tolPhi) ||
148 phiLoc > (
get(eMaxPhiRel) + tolPhi)) {
159 if (r_mod2 <
get(eMinR) *
get(eMinR) || r_mod2 >
get(eMaxR) *
get(eMaxR)) {
168 if (r_mod < (
get(eMinR) - tolR) || r_mod > (
get(eMaxR) + tolR)) {
178 if (bcheck.
type() == BoundaryCheck::Type::eAbsolute) {
184 if (inside(lposition, 0., 0.)) {
196 double dphi =
get(eAveragePhi);
257 double cosDPhiPhiStrip = std::cos(dphi - phi_strip);
258 double sinDPhiPhiStrip = std::sin(dphi - phi_strip);
260 double A = O_x * O_x + 2 * O_x * r_strip * cosDPhiPhiStrip + O_y * O_y -
261 2 * O_y * r_strip * sinDPhiPhiStrip + r_strip * r_strip;
262 double sqrtA = std::sqrt(A);
264 double B = cosDPhiPhiStrip;
265 double C = -sinDPhiPhiStrip;
267 jacobianStripPCToModulePC(0, 0) = (B * O_x + C * O_y + r_strip) / sqrtA;
268 jacobianStripPCToModulePC(0, 1) =
269 r_strip * (B * O_y + O_x * sinDPhiPhiStrip) / sqrtA;
270 jacobianStripPCToModulePC(1, 0) = -(B * O_y - C * O_x) / A;
271 jacobianStripPCToModulePC(1, 1) =
272 r_strip * (B * O_x + C * O_y + r_strip) / A;
277 auto covModulePC = jacobianStripPCToModulePC * covStripPC *
278 jacobianStripPCToModulePC.transpose();
281 auto weightStripPC = covStripPC.inverse();
282 auto weightModulePC = covModulePC.inverse();
284 double minDist = std::numeric_limits<double>::max();
287 double currentDist = 0;
293 locpo_rotated, weightStripPC);
294 currentDist = squaredNorm(locpo_rotated - currentClosest, weightStripPC);
295 minDist = currentDist;
298 locpo_rotated, weightStripPC);
299 currentDist = squaredNorm(locpo_rotated - currentClosest, weightStripPC);
300 if (currentDist < minDist) {
301 minDist = currentDist;
307 locpo_rotated[eBoundLoc0] * std::cos(locpo_rotated[eBoundLoc1]),
308 locpo_rotated[eBoundLoc0] * std::sin(locpo_rotated[eBoundLoc1]));
309 Vector2 locpoModulePC = stripXYToModulePC(locpoStripXY);
315 locpoModulePC, weightModulePC);
316 currentDist = squaredNorm(locpoModulePC - currentClosest, weightModulePC);
317 if (currentDist < minDist) {
318 minDist = currentDist;
322 locpoModulePC, weightModulePC);
323 currentDist = squaredNorm(locpoModulePC - currentClosest, weightModulePC);
324 if (currentDist < minDist) {
325 minDist = currentDist;
336 const Vector2& vStripXY)
const {
347 auto f = (
n.transpose() * weight *
n).
value();
349 auto u = ((p -
a).transpose() * weight *
n).
value() /
f;
351 return std::min(std::max(
u, static_cast<ActsScalar>(0)),
352 static_cast<ActsScalar>(1)) *
359 return (v.transpose() * weight *
v).
value();
363 return Eigen::Rotation2D<ActsScalar>(
get(eAveragePhi)) * m_moduleOrigin;
368 sl << std::setiosflags(std::ios::fixed);
369 sl << std::setprecision(7);
370 sl <<
"Acts::AnnulusBounds: (innerRadius, outerRadius, minPhi, maxPhi) = ";
371 sl <<
"(" <<
get(eMinR) <<
", " <<
get(eMaxR) <<
", " <<
phiMin() <<
", "
372 << phiMax() <<
")" <<
'\n';
375 sl << std::setprecision(-1);