ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Tracking
TrkDetDescr
TrkVolumes
TrkVolumes
Volume.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
*/
4
6
// AbstractVolume.h, (c) ATLAS Detector software
8
9
#ifndef TRKVOLUMES_VOLUME_H
10
#define TRKVOLUMES_VOLUME_H
11
12
//Trk
13
#include "
TrkDetDescrUtils/GeometryStatics.h
"
14
#include "
TrkDetDescrUtils/ObjectAccessor.h
"
15
#include "
GeoPrimitives/GeoPrimitives.h
"
16
//
17
#include "
AthenaKernel/CLASS_DEF.h
"
18
//std
19
#include <memory>
20
21
class
MsgStream;
22
23
namespace
Trk
{
24
25
class
VolumeBounds
;
26
36
class
Volume
{
37
public
:
39
Volume
() =
default
;
40
Volume
(
Volume
&&) =
default
;
41
Volume
&
operator=
(
Volume
&&) =
default
;
42
virtual
~Volume
() =
default
;
43
45
Volume
(std::unique_ptr<Amg::Transform3D> htrans,
46
std::shared_ptr<VolumeBounds> volBounds);
47
49
Volume
(
const
Volume
& vol);
50
52
Volume
(
const
Volume
& vol,
const
Amg::Transform3D
& shift);
53
55
Volume
&
operator=
(
const
Volume
& vol);
56
58
virtual
Volume
*
clone
()
const
;
59
61
const
Amg::Transform3D
&
transform
()
const
;
62
64
const
Amg::Vector3D
&
center
()
const
;
65
67
const
VolumeBounds
&
volumeBounds
()
const
;
68
VolumeBounds
&
volumeBounds
() ;
69
71
bool
inside
(
const
Amg::Vector3D
& gp,
double
tol=0.)
const
;
72
74
ObjectAccessor
boundarySurfaceAccessor
(
const
Amg::Vector3D
& gp,
75
const
Amg::Vector3D
& mom,
76
bool
forceInside=
false
)
const
;
77
protected
:
78
std::unique_ptr<Amg::Transform3D>
m_transform
=
nullptr
;
79
Amg::Vector3D
m_center
=
Trk::s_origin
;
80
std::shared_ptr<VolumeBounds>
m_volumeBounds
=
nullptr
;
81
};
82
83
inline
const
Amg::Transform3D
&
Volume::transform
()
const
{
84
if
(
m_transform
) {
85
return
(*
m_transform
);
86
}
87
return
Trk::s_idTransform
;
88
}
89
90
inline
const
Amg::Vector3D
&
Volume::center
()
const
91
{
92
return
m_center
;
93
}
94
95
inline
const
VolumeBounds
&
96
Volume::volumeBounds
()
const
97
{
98
return
*(
m_volumeBounds
.get());
99
}
100
101
inline
VolumeBounds
&
102
Volume::volumeBounds
()
103
{
104
return
*(
m_volumeBounds
.get());
105
}
106
107
109
MsgStream&
operator <<
( MsgStream& sl,
const
Volume
& vol);
110
std::ostream&
operator <<
( std::ostream& sl,
const
Volume
& vol);
111
112
113
}
// end of namespace Trk
114
115
CLASS_DEF
(
Trk::Volume
, 125765716 , 1 )
116
117
118
#endif
// TRKVOLUMES_VOLUME_H
119
CLASS_DEF.h
macros to associate a CLID to a type
CLASS_DEF
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Definition
Control/AthenaKernel/AthenaKernel/CLASS_DEF.h:67
GeoPrimitives.h
GeometryStatics.h
ObjectAccessor.h
Trk::ObjectAccessor
Definition
ObjectAccessor.h:15
Trk::VolumeBounds
Pure Absract Base Class for Volume bounds.
Definition
VolumeBounds.h:46
Trk::Volume
Base class for all volumes inside the tracking realm, it defines the interface for inherited Volume c...
Definition
Volume.h:36
Trk::Volume::~Volume
virtual ~Volume()=default
Trk::Volume::Volume
Volume(Volume &&)=default
Trk::Volume::Volume
Volume()=default
Defaults copies are special due ot unique ptr data member.
Trk::Volume::center
const Amg::Vector3D & center() const
returns the center of the volume
Definition
Volume.h:90
Trk::Volume::operator=
Volume & operator=(Volume &&)=default
Trk::Volume::transform
const Amg::Transform3D & transform() const
Return methods for geometry transform.
Definition
Volume.h:83
Trk::Volume::volumeBounds
const VolumeBounds & volumeBounds() const
returns the volumeBounds()
Definition
Volume.h:96
Trk::Volume::m_center
Amg::Vector3D m_center
center position of the surface
Definition
Volume.h:79
Trk::Volume::m_transform
std::unique_ptr< Amg::Transform3D > m_transform
Transform3D (optional).
Definition
Volume.h:78
Trk::Volume::m_volumeBounds
std::shared_ptr< VolumeBounds > m_volumeBounds
the volumeBounds
Definition
Volume.h:80
Trk::Volume::boundarySurfaceAccessor
ObjectAccessor boundarySurfaceAccessor(const Amg::Vector3D &gp, const Amg::Vector3D &mom, bool forceInside=false) const
Provide accessor for BoundarySurfaces.
Definition
Volume.cxx:82
Trk::Volume::clone
virtual Volume * clone() const
polymorpic deep copy
Definition
Volume.cxx:60
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition
GeoPrimitives.h:46
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::s_idTransform
static const Amg::Transform3D s_idTransform
idendity transformation
Definition
GeometryStatics.h:20
Trk::operator<<
MsgStream & operator<<(MsgStream &sl, const AlignModule &alignModule)
overload of << operator for MsgStream for debug output
Definition
AlignModule.cxx:204
Trk::s_origin
static const Amg::Vector3D s_origin(0, 0, 0)
origin position
Trk::inside
@ inside
Definition
PropDirection.h:29
Generated on
for ATLAS Offline Software by
1.17.0