ATLAS Offline Software
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 
17 class MsgStream;
18 
19 namespace Trk {
20 
21 class RectangleBounds;
22 class Volume;
23 class Surface;
24 
52 class 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 
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 
132 inline double CuboidVolumeBounds::halflengthX() const { return m_halfX; }
133 
134 inline double CuboidVolumeBounds::halflengthY() const { return m_halfY; }
135 
136 inline double CuboidVolumeBounds::halflengthZ() const { return m_halfZ; }
137 
139  const Amg::Vector3D&, const Amg::Vector3D&, bool) const {
141 }
142 
143 } // namespace Trk
144 
145 #endif // TRKVOLUMES_BOXVOLUMESBOUNDS_H
Trk::CuboidVolumeBounds::halflengthZ
double halflengthZ() const
This method returns the halflength in local z.
Definition: CuboidVolumeBounds.h:136
Trk::RectangleBounds
Definition: RectangleBounds.h:38
Trk::CuboidVolumeBounds::operator=
CuboidVolumeBounds & operator=(const CuboidVolumeBounds &bobo)
Assignment operator.
Definition: CuboidVolumeBounds.cxx:52
Trk::CuboidVolumeBounds
Definition: CuboidVolumeBounds.h:52
Trk::CuboidVolumeBounds::clone
CuboidVolumeBounds * clone() const override final
Virtual constructor.
Definition: CuboidVolumeBounds.h:122
Surface
Definition: Trigger/TrigAccel/TrigCudaFitter/src/Surface.h:7
Trk::CuboidVolumeBounds::halflengthX
double halflengthX() const
This method returns the halflength in local x.
Definition: CuboidVolumeBounds.h:132
VolumeBounds.h
ObjectsAccessor.h
Trk::CuboidVolumeBounds::m_halfX
double m_halfX
Definition: CuboidVolumeBounds.h:113
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:562
Trk::CuboidVolumeBounds::halflengthY
double halflengthY() const
This method returns the halflength in local y.
Definition: CuboidVolumeBounds.h:134
GeoPrimitives.h
Trk::VolumeBounds
Definition: VolumeBounds.h:45
Trk::CuboidVolumeBounds::faceYZRectangleBounds
RectangleBounds * faceYZRectangleBounds() const
This method returns the associated RecantleBounds of the face PlaneSurface parallel to local yz plane...
Definition: CuboidVolumeBounds.cxx:134
Trk::CuboidVolumeBounds::decomposeToSurfaces
const std::vector< const Trk::Surface * > * decomposeToSurfaces(const Amg::Transform3D &transform) override final
Method to decompose the Bounds into boundarySurfaces.
Definition: CuboidVolumeBounds.cxx:65
vector
Definition: MultiHisto.h:13
Trk::CuboidVolumeBounds::m_objectAccessor
SixObjectsAccessor m_objectAccessor
There's only one single object Acessor for the moment has to be implemented if Cuboids are used more ...
Definition: CuboidVolumeBounds.h:119
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
Amg::transform
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
Definition: GeoPrimitivesHelpers.h:156
Trk::CuboidVolumeBounds::faceXYRectangleBounds
RectangleBounds * faceXYRectangleBounds() const
This method returns the associated RecantleBounds of the face PlaneSurface parallel to local xy plane...
Definition: CuboidVolumeBounds.cxx:128
Trk::CuboidVolumeBounds::boundarySurfaceAccessor
ObjectAccessor boundarySurfaceAccessor(const Amg::Vector3D &gp, const Amg::Vector3D &dir, bool forceInside=false) const override final
Provide accessor for BoundarySurfaces.
Definition: CuboidVolumeBounds.h:138
Trk::CuboidVolumeBounds::~CuboidVolumeBounds
virtual ~CuboidVolumeBounds()
Destructor.
beamspotman.dir
string dir
Definition: beamspotman.py:623
Trk::CuboidVolumeBounds::inside
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.
Definition: CuboidVolumeBounds.h:126
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Amg
Definition of ATLAS Math & Geometry primitives (Amg)
Definition: AmgStringHelpers.h:19
private
#define private
Definition: DetDescrConditionsDict_dict_fixes.cxx:13
Trk::CuboidVolumeBounds::faceZXRectangleBounds
RectangleBounds * faceZXRectangleBounds() const
This method returns the associated RecantleBounds of the face PlaneSurface parallel to local zx plane...
Definition: CuboidVolumeBounds.cxx:140
Trk::SixObjectsAccessor
std::array< ObjectAccessor::value_type, 6 > SixObjectsAccessor
Definition: ObjectsAccessor.h:17
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
Trk::CuboidVolumeBounds::m_halfZ
double m_halfZ
Definition: CuboidVolumeBounds.h:115
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
Trk::ObjectAccessor
Definition: ObjectAccessor.h:15
Trk::CuboidVolumeBounds::dump
MsgStream & dump(MsgStream &sl) const override final
Output Method for MsgStream.
Definition: CuboidVolumeBounds.cxx:148
Trk::CuboidVolumeBounds::CuboidVolumeBounds
CuboidVolumeBounds()
Default Constructor.
Definition: CuboidVolumeBounds.cxx:22
Trk::CuboidVolumeBounds::m_halfY
double m_halfY
Definition: CuboidVolumeBounds.h:114
Trk::Surface
Definition: Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h:75