19#include "GaudiKernel/MsgStream.h"
20#include "GaudiKernel/SystemOfUnits.h"
103std::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>(
124 retsf.push_back(std::make_unique<Trk::PlaneSurface>(
155 double s=sin(-
alpha());
156 double c=cos(-
alpha());
157 rotateToFaceAlpha << c, 0.f, s,
165 Amg::Vector3D faceAlphaPosition = transform * faceAlphaPosition0;
166 retsf.push_back(std::make_unique<Trk::PlaneSurface>(
Amg::Translation3D(faceAlphaPosition)
173 double s=sin(
beta());
174 double c=cos(
beta());
175 rotateToFaceBeta << c, 0.f, s,
185 Amg::Vector3D faceBetaPosition = transform * faceBetaPosition0;
186 retsf.push_back(std::make_unique<Trk::PlaneSurface>(
Amg::Translation3D(faceBetaPosition)
189 retsf.push_back(std::make_unique<Trk::PlaneSurface>(
198 retsf.push_back(std::make_unique<Trk::PlaneSurface>(
210std::shared_ptr<Trk::TrapezoidBounds>
216std::shared_ptr<Trk::RectangleBounds>
222std::shared_ptr<Trk::RectangleBounds>
228std::shared_ptr<Trk::RectangleBounds>
234std::shared_ptr<Trk::RectangleBounds>
246 if (std::abs(pos.z()) >
m_halfZ + tol)
248 if (std::abs(pos.y()) >
m_halfY + tol)
252 bool inside(faceXYBounds->inside(locp, tol, tol));
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) = ";
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) = ";
Bounds for a trapezoidal shaped Volume, the decomposeToSurfaces method creates a vector of 6 surfaces...
MsgStream & dump(MsgStream &sl) const override final
Output Method for MsgStream.
double halflengthZ() const
This method returns the halflength in local z.
double m_halfZ
halflength in z
std::shared_ptr< RectangleBounds > faceAlphaRectangleBounds() const
This method returns the associated RecantleBounds of the face PlaneSurface attached to alpha (negativ...
std::shared_ptr< RectangleBounds > faceZXRectangleBoundsBottom() const
This method returns the associated RecantleBounds of the face PlaneSurface parallel to local zx plane...
double minHalflengthX() const
This method returns the minimal halflength in local x.
double halflengthY() const
This method returns the halflength in local y.
virtual std::vector< std::unique_ptr< Trk::Surface > > decomposeToSurfaces(const Amg::Transform3D &transform) override final
Method to decompose the Bounds into Surfaces.
double m_alpha
opening angle alpha (in point A)
SixObjectsAccessor m_objectAccessor
There's only one single object Acessor for the moment has to be implemented if Cuboids are used more ...
TrapezoidVolumeBounds()
Default Constructor.
std::shared_ptr< RectangleBounds > faceZXRectangleBoundsTop() const
This method returns the associated RecantleBounds of the face PlaneSurface parallel to local zx plane...
double alpha() const
This method returns the opening angle in point A (negative local x)
std::shared_ptr< TrapezoidBounds > faceXYTrapezoidBounds() const
This method returns the associated TrapezoidBounds of the face PlaneSurface parallel to local xy plan...
TrapezoidVolumeBounds & operator=(const TrapezoidVolumeBounds &bobo)
Assignment operator.
double m_maxHalfX
maximal halflength in x
double m_beta
opening angle beta (in point B)
virtual ~TrapezoidVolumeBounds()
Destructor.
double m_minHalfX
minimal halflength in x
double m_halfY
halflength in y
double beta() const
This method returns the opening angle in point B (negative local x)
std::shared_ptr< RectangleBounds > faceBetaRectangleBounds() const
This method returns the associated RecantleBounds of the face PlaneSurface attached to beta (positive...
double maxHalflengthX() const
This method returns the maximal halflength in local x.
bool inside(const Amg::Vector3D &, double tol=0.) const override final
This method checks if position in the 3D volume frame is inside the cylinder.
VolumeBounds()
Default Constructor.
Eigen::AngleAxisd AngleAxis3D
Eigen::Matrix< double, 3, 3 > RotationMatrix3D
Eigen::Affine3d Transform3D
Eigen::Matrix< double, 2, 1 > Vector2D
Eigen::Matrix< double, 3, 1 > Vector3D
Eigen::Translation< double, 3 > Translation3D