ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Tracking
TrkDetDescr
TrkVolumes
TrkVolumes
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
13
#include "
GeoPrimitives/GeoPrimitives.h
"
14
#include "
TrkDetDescrUtils/ObjectsAccessor.h
"
15
#include "
TrkVolumes/VolumeBounds.h
"
16
17
class
MsgStream;
18
19
namespace
Trk
{
20
21
class
RectangleBounds
;
22
class
Volume
;
23
class
Surface
;
24
51
52
class
CuboidVolumeBounds
final:
public
VolumeBounds
{
53
public
:
55
CuboidVolumeBounds
();
56
58
CuboidVolumeBounds
(
double
hlenghtx,
double
hlenghty,
double
hlengthz);
59
61
CuboidVolumeBounds
(
const
CuboidVolumeBounds
& bobo);
62
64
virtual
~CuboidVolumeBounds
();
65
67
CuboidVolumeBounds
&
operator=
(
const
CuboidVolumeBounds
& bobo);
68
70
CuboidVolumeBounds
*
clone
()
const
override final;
71
74
bool
inside
(
const
Amg
::
Vector3D
&,
double
tol = 0.)
const
override final;
75
77
virtual
std
::
vector
<
std
::
unique_ptr
<
Trk
::
Surface
>>
decomposeToSurfaces
78
(
const
Amg
::
Transform3D
& transform) override final;
79
81
ObjectAccessor
boundarySurfaceAccessor
(
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
:
103
std
::shared_ptr<
RectangleBounds
>
faceXYRectangleBounds
()
const
;
104
107
std
::shared_ptr<
RectangleBounds
>
faceYZRectangleBounds
()
const
;
108
111
std
::shared_ptr<
RectangleBounds
>
faceZXRectangleBounds
()
const
;
112
113
double
m_halfX
;
114
double
m_halfY
;
115
double
m_halfZ
;
116
119
SixObjectsAccessor
m_objectAccessor
;
120
};
121
122
inline
CuboidVolumeBounds
*
CuboidVolumeBounds
::
clone
()
const
{
123
return
new
CuboidVolumeBounds
(*
this
);
124
}
125
126
inline
bool
CuboidVolumeBounds::inside
(
const
Amg::Vector3D
& pos,
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
138
inline
ObjectAccessor
CuboidVolumeBounds::boundarySurfaceAccessor
(
139
const
Amg::Vector3D
&,
const
Amg::Vector3D
&,
bool
)
const
{
140
return
Trk::ObjectAccessor
(
m_objectAccessor
);
141
}
142
143
}
// namespace Trk
144
145
#endif
// TRKVOLUMES_BOXVOLUMESBOUNDS_H
Transform3D
Eigen::Affine3d Transform3D
Definition
GeoPrimitives.h:46
GeoPrimitives.h
ObjectsAccessor.h
Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition
GeoPrimitives.h:47
VolumeBounds.h
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
Trk::CuboidVolumeBounds::CuboidVolumeBounds
CuboidVolumeBounds()
Default Constructor.
Definition
CuboidVolumeBounds.cxx:22
Trk::CuboidVolumeBounds::halflengthX
double halflengthX() const
This method returns the halflength in local x.
Definition
CuboidVolumeBounds.h:132
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::CuboidVolumeBounds::decomposeToSurfaces
virtual std::vector< std::unique_ptr< Trk::Surface > > decomposeToSurfaces(const Amg::Transform3D &transform) override final
Method to decompose the Bounds into boundarySurfaces.
Definition
CuboidVolumeBounds.cxx:65
Trk::CuboidVolumeBounds::faceZXRectangleBounds
std::shared_ptr< RectangleBounds > faceZXRectangleBounds() const
This method returns the associated RecantleBounds of the face PlaneSurface parallel to local zx plane...
Definition
CuboidVolumeBounds.cxx:139
Trk::CuboidVolumeBounds::operator=
CuboidVolumeBounds & operator=(const CuboidVolumeBounds &bobo)
Assignment operator.
Definition
CuboidVolumeBounds.cxx:52
Trk::CuboidVolumeBounds::m_halfX
double m_halfX
Definition
CuboidVolumeBounds.h:113
Trk::CuboidVolumeBounds::~CuboidVolumeBounds
virtual ~CuboidVolumeBounds()
Destructor.
Trk::CuboidVolumeBounds::faceYZRectangleBounds
std::shared_ptr< RectangleBounds > faceYZRectangleBounds() const
This method returns the associated RecantleBounds of the face PlaneSurface parallel to local yz plane...
Definition
CuboidVolumeBounds.cxx:133
Trk::CuboidVolumeBounds::m_halfZ
double m_halfZ
Definition
CuboidVolumeBounds.h:115
Trk::CuboidVolumeBounds::clone
CuboidVolumeBounds * clone() const override final
Virtual constructor.
Definition
CuboidVolumeBounds.h:122
Trk::CuboidVolumeBounds::halflengthY
double halflengthY() const
This method returns the halflength in local y.
Definition
CuboidVolumeBounds.h:134
Trk::CuboidVolumeBounds::faceXYRectangleBounds
std::shared_ptr< RectangleBounds > faceXYRectangleBounds() const
This method returns the associated RecantleBounds of the face PlaneSurface parallel to local xy plane...
Definition
CuboidVolumeBounds.cxx:127
Trk::CuboidVolumeBounds::m_halfY
double m_halfY
Definition
CuboidVolumeBounds.h:114
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::halflengthZ
double halflengthZ() const
This method returns the halflength in local z.
Definition
CuboidVolumeBounds.h:136
Trk::ObjectAccessor
Definition
ObjectAccessor.h:15
Trk::RectangleBounds
Bounds for a rectangular, planar surface.
Definition
RectangleBounds.h:38
Trk::Surface
Abstract Base Class for tracking surfaces.
Definition
Surface.h:79
Trk::VolumeBounds::VolumeBounds
VolumeBounds()
Default Constructor.
Definition
VolumeBounds.h:49
Trk::Volume
Base class for all volumes inside the tracking realm, it defines the interface for inherited Volume c...
Definition
Volume.h:36
ostream
STL class.
unique_ptr
STL class.
vector
Definition
MultiHisto.h:13
const
Amg
Definition of ATLAS Math & Geometry primitives (Amg).
Definition
AmgStringHelpers.h:19
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition
GeoPrimitives.h:47
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition
FakeTrackBuilder.h:9
Trk::SixObjectsAccessor
std::array< ObjectAccessor::value_type, 6 > SixObjectsAccessor
Definition
ObjectsAccessor.h:17
dump
-event-from-file
std
STL namespace.
private
#define private
Definition
testRead.cxx:27
Generated on
for ATLAS Offline Software by
1.17.0