ATLAS Offline Software
Loading...
Searching...
No Matches
CuboidVolumeBounds.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3*/
4
6// CuboidVolumeBounds.h, (c) ATLAS Detector software
8
9#ifndef TRKVOLUMES_BOXVOLUMESBOUNDS_H
10#define TRKVOLUMES_BOXVOLUMESBOUNDS_H
11
12// Trk
16
17class MsgStream;
18
19namespace Trk {
20
21class RectangleBounds;
22class Volume;
23class Surface;
24
51
52class CuboidVolumeBounds final: public VolumeBounds {
53 public:
56
58 CuboidVolumeBounds(double hlenghtx, double hlenghty, double hlengthz);
59
62
65
68
70 CuboidVolumeBounds* clone() const override final;
71
74 bool inside(const Amg::Vector3D&, double tol = 0.) const override final;
75
78 (const Amg::Transform3D& transform) override final;
79
82 const Amg::Vector3D& gp, const Amg::Vector3D& dir,
83 bool forceInside = false) const override final;
84
86 double halflengthX() const;
87
89 double halflengthY() const;
90
92 double halflengthZ() const;
93
95 MsgStream& dump(MsgStream& sl) const override final;
96
98 std::ostream& dump(std::ostream& sl) const override final;
99
100 private:
104
108
112
113 double m_halfX;
114 double m_halfY;
115 double m_halfZ;
116
120};
121
123 return new CuboidVolumeBounds(*this);
124}
125
127 double tol) const {
128 return (fabs(pos.x()) <= m_halfX + tol && fabs(pos.y()) <= m_halfY + tol &&
129 fabs(pos.z()) <= m_halfZ + tol);
130}
131
132inline double CuboidVolumeBounds::halflengthX() const { return m_halfX; }
133
134inline double CuboidVolumeBounds::halflengthY() const { return m_halfY; }
135
136inline double CuboidVolumeBounds::halflengthZ() const { return m_halfZ; }
137
142
143} // namespace Trk
144
145#endif // TRKVOLUMES_BOXVOLUMESBOUNDS_H
Eigen::Affine3d Transform3D
Eigen::Matrix< double, 3, 1 > Vector3D
SixObjectsAccessor m_objectAccessor
There's only one single object Acessor for the moment has to be implemented if Cuboids are used more ...
CuboidVolumeBounds()
Default Constructor.
double halflengthX() const
This method returns the 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.
virtual std::vector< std::unique_ptr< Trk::Surface > > decomposeToSurfaces(const Amg::Transform3D &transform) override final
Method to decompose the Bounds into boundarySurfaces.
std::shared_ptr< RectangleBounds > faceZXRectangleBounds() const
This method returns the associated RecantleBounds of the face PlaneSurface parallel to local zx plane...
CuboidVolumeBounds & operator=(const CuboidVolumeBounds &bobo)
Assignment operator.
virtual ~CuboidVolumeBounds()
Destructor.
std::shared_ptr< RectangleBounds > faceYZRectangleBounds() const
This method returns the associated RecantleBounds of the face PlaneSurface parallel to local yz plane...
CuboidVolumeBounds * clone() const override final
Virtual constructor.
double halflengthY() const
This method returns the halflength in local y.
std::shared_ptr< RectangleBounds > faceXYRectangleBounds() const
This method returns the associated RecantleBounds of the face PlaneSurface parallel to local xy plane...
ObjectAccessor boundarySurfaceAccessor(const Amg::Vector3D &gp, const Amg::Vector3D &dir, bool forceInside=false) const override final
Provide accessor for BoundarySurfaces.
double halflengthZ() const
This method returns the halflength in local z.
Bounds for a rectangular, planar surface.
Abstract Base Class for tracking surfaces.
VolumeBounds()
Default Constructor.
Base class for all volumes inside the tracking realm, it defines the interface for inherited Volume c...
Definition Volume.h:36
STL class.
STL class.
Definition of ATLAS Math & Geometry primitives (Amg)
Eigen::Matrix< double, 3, 1 > Vector3D
Ensure that the ATLAS eigen extensions are properly loaded.
std::array< ObjectAccessor::value_type, 6 > SixObjectsAccessor
-event-from-file
STL namespace.
#define private