19 #include "GaudiKernel/MsgStream.h"
20 #include "GaudiKernel/SystemOfUnits.h"
43 , m_minHalfX(minhalex)
44 , m_maxHalfX(maxhalex)
62 , m_minHalfX(minhalex)
77 , m_minHalfX(trabo.m_minHalfX)
78 , m_maxHalfX(trabo.m_maxHalfX)
79 , m_halfY(trabo.m_halfY)
80 , m_halfZ(trabo.m_halfZ)
81 , m_alpha(trabo.m_alpha)
82 , m_beta(trabo.m_beta)
83 , m_objectAccessor(trabo.m_objectAccessor)
103 std::vector<std::unique_ptr<Trk::Surface>>
107 auto retsf = std::vector<std::unique_ptr<Trk::Surface>>();
117 retsf.push_back(std::make_unique<Trk::PlaneSurface>(
122 this->faceXYTrapezoidBounds()));
124 retsf.push_back(std::make_unique<Trk::PlaneSurface>(
128 this->faceXYTrapezoidBounds()));
157 rotateToFaceAlpha <<
c, 0.f,
s,
162 std::shared_ptr<RectangleBounds> faceAlphaBounds = this->faceAlphaRectangleBounds();
164 -0.5 * (this->minHalflengthX() + this->maxHalflengthX()), 0., 0.);
166 retsf.push_back(std::make_unique<Trk::PlaneSurface>(
Amg::Translation3D(faceAlphaPosition)
175 rotateToFaceBeta <<
c, 0.f,
s,
180 std::shared_ptr<RectangleBounds> faceBetaBounds = this->faceBetaRectangleBounds();
184 0.5 * (this->minHalflengthX() + this->maxHalflengthX()), 0., 0.);
186 retsf.push_back(std::make_unique<Trk::PlaneSurface>(
Amg::Translation3D(faceBetaPosition)
189 retsf.push_back(std::make_unique<Trk::PlaneSurface>(
196 this->faceZXRectangleBoundsBottom()));
198 retsf.push_back(std::make_unique<Trk::PlaneSurface>(
204 this->faceZXRectangleBoundsTop()));
210 std::shared_ptr<Trk::TrapezoidBounds>
213 return std::make_shared<Trk::TrapezoidBounds>(m_minHalfX, m_maxHalfX, m_halfY);
216 std::shared_ptr<Trk::RectangleBounds>
219 return std::make_shared<Trk::RectangleBounds>(m_halfY /
cos(m_alpha - 0.5 *
M_PI), m_halfZ);
222 std::shared_ptr<Trk::RectangleBounds>
225 return std::make_shared<Trk::RectangleBounds>(m_halfY /
cos(m_beta - 0.5 *
M_PI), m_halfZ);
228 std::shared_ptr<Trk::RectangleBounds>
231 return std::make_shared<Trk::RectangleBounds>(m_halfZ, m_minHalfX);
234 std::shared_ptr<Trk::RectangleBounds>
240 return std::make_shared<Trk::RectangleBounds>(m_halfZ, m_maxHalfX);
246 if (std::abs(
pos.z()) > m_halfZ + tol)
248 if (std::abs(
pos.y()) > m_halfY + tol)
250 std::shared_ptr<Trk::TrapezoidBounds> faceXYBounds = this->faceXYTrapezoidBounds();
260 std::stringstream temp_sl;
261 temp_sl << std::setiosflags(std::ios::fixed);
262 temp_sl << std::setprecision(7);
264 <<
"Trk::TrapezoidVolumeBounds: (minhalfX, halfY, halfZ, alpha, beta) = ";
265 temp_sl <<
"(" << m_minHalfX <<
", " << m_halfY <<
", " << m_halfZ;
266 temp_sl <<
", " << m_alpha <<
", " << m_beta <<
")";
274 std::stringstream temp_sl;
275 temp_sl << std::setiosflags(std::ios::fixed);
276 temp_sl << std::setprecision(7);
278 <<
"Trk::TrapezoidVolumeBounds: (minhalfX, halfY, halfZ, alpha, beta) = ";
279 temp_sl <<
"(" << m_minHalfX <<
", " << m_halfY <<
", " << m_halfZ;
280 temp_sl <<
", " << m_alpha <<
", " << m_beta <<
")";