27 double haley,
double halez)
43 double haley,
double halez,
44 double alpha,
double beta)
52 double gamma = (alpha > beta) ? (alpha - 0.5 *
M_PI) : (beta - 0.5 *
M_PI);
59 std::vector<std::shared_ptr<const Acts::Surface>>
62 std::vector<std::shared_ptr<const Surface>> rSurfaces;
65 (transformPtr ==
nullptr) ? Transform3D::Identity() : (*transformPtr);
69 Vector3D trapezoidX(trapezoidRotation.col(0));
70 Vector3D trapezoidY(trapezoidRotation.col(1));
71 Vector3D trapezoidZ(trapezoidRotation.col(2));
72 Vector3D trapezoidCenter(transform.translation());
79 rSurfaces.push_back(Surface::makeShared<PlaneSurface>(
80 std::shared_ptr<const Transform3D>(tTransform), m_faceXYTrapezoidBounds));
84 rSurfaces.push_back(Surface::makeShared<PlaneSurface>(
85 std::shared_ptr<const Transform3D>(tTransform), m_faceXYTrapezoidBounds));
90 Vector3D A(
get(eHalfLengthXnegY),
get(eHalfLengthY), trapezoidCenter.z());
96 faceAlphaRotation.col(0) = alphaZRotation.col(1);
97 faceAlphaRotation.col(1) = -alphaZRotation.col(2);
98 faceAlphaRotation.col(2) = -alphaZRotation.col(0);
103 -0.5 * (
get(eHalfLengthXnegY) +
get(eHalfLengthXposY)), 0., 0.);
104 Vector3D faceAlphaPosition = transform * faceAlphaPosition0;
106 (trapezoidRotation * faceAlphaRotation));
107 rSurfaces.push_back(Surface::makeShared<PlaneSurface>(
108 std::shared_ptr<const Transform3D>(tTransform),
109 m_faceAlphaRectangleBounds));
112 Vector3D B(
get(eHalfLengthXnegY), -
get(eHalfLengthY), trapezoidCenter.z());
118 faceBetaRotation.col(0) = betaZRotation.col(1);
119 faceBetaRotation.col(1) = betaZRotation.col(2);
120 faceBetaRotation.col(2) = betaZRotation.col(0);
124 0.5 * (
get(eHalfLengthXnegY) +
get(eHalfLengthXposY)), 0., 0.);
125 Vector3D faceBetaPosition = transform * faceBetaPosition0;
127 (trapezoidRotation * faceBetaRotation));
128 rSurfaces.push_back(Surface::makeShared<PlaneSurface>(
129 std::shared_ptr<const Transform3D>(tTransform),
130 m_faceBetaRectangleBounds));
139 rSurfaces.push_back(Surface::makeShared<PlaneSurface>(
140 std::shared_ptr<const Transform3D>(tTransform),
141 std::shared_ptr<const PlanarBounds>(m_faceZXRectangleBoundsBottom)));
147 rSurfaces.push_back(Surface::makeShared<PlaneSurface>(
148 std::shared_ptr<const Transform3D>(tTransform),
149 std::shared_ptr<const PlanarBounds>(m_faceZXRectangleBoundsTop)));
155 m_faceXYTrapezoidBounds = std::make_shared<const TrapezoidBounds>(
156 get(eHalfLengthXnegY),
get(eHalfLengthXposY),
get(eHalfLengthY));
158 m_faceAlphaRectangleBounds = std::make_shared<const RectangleBounds>(
159 get(eHalfLengthY) / cos(
get(eAlpha) - 0.5 *
M_PI),
get(eHalfLengthZ));
161 m_faceBetaRectangleBounds = std::make_shared<const RectangleBounds>(
162 get(eHalfLengthY) / cos(
get(eBeta) - 0.5 *
M_PI),
get(eHalfLengthZ));
164 m_faceZXRectangleBoundsBottom = std::make_shared<const RectangleBounds>(
165 get(eHalfLengthZ),
get(eHalfLengthXnegY));
167 m_faceZXRectangleBoundsTop = std::make_shared<const RectangleBounds>(
168 get(eHalfLengthZ),
get(eHalfLengthXposY));
173 if (
std::abs(pos.z()) >
get(eHalfLengthZ) + tol) {
176 if (
std::abs(pos.y()) >
get(eHalfLengthY) + tol) {
180 bool inside(m_faceXYTrapezoidBounds->inside(
186 return dumpT<std::ostream>(sl);
191 const Volume* entity)
const {
192 double minx =
get(eHalfLengthXnegY);
193 double maxx =
get(eHalfLengthXposY);
194 double haley =
get(eHalfLengthY);
195 double halez =
get(eHalfLengthZ);
197 std::array<Vector3D, 8> vertices = {{{-minx, -haley, -halez},
198 {+minx, -haley, -halez},
199 {-maxx, +haley, -halez},
200 {+maxx, +haley, -halez},
201 {-minx, -haley, +halez},
202 {+minx, -haley, +halez},
203 {-maxx, +haley, +halez},
204 {+maxx, +haley, +halez}}};
207 if (trf !=
nullptr) {
211 Vector3D vmin = transform * vertices[0];
212 Vector3D vmax = transform * vertices[0];
214 for (
size_t i = 1; i < 8; i++) {
215 const Vector3D vtx = transform * vertices[i];
216 vmin = vmin.cwiseMin(vtx);
217 vmax = vmax.cwiseMax(vtx);
220 return {entity, vmin - envelope, vmax + envelope};