ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Tracking
TrkDetDescr
TrkVolumes
TrkVolumes
CombinedVolumeBounds.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
// CombinedVolumeBounds.h, (c) ATLAS Detector software
8
9
#ifndef TRKVOLUMES_COMBINEDVOLUMEBOUNDS_H
10
#define TRKVOLUMES_COMBINEDVOLUMEBOUNDS_H
11
12
// Trk
13
#include "
TrkDetDescrUtils/ObjectsAccessor.h
"
14
#include "
TrkVolumes/Volume.h
"
15
#include "
TrkVolumes/VolumeBounds.h
"
16
17
// Eigen
18
#include "
GeoPrimitives/GeoPrimitives.h
"
19
//
20
#include <memory>
21
22
class
MsgStream;
23
24
namespace
Trk
{
25
26
class
SurfaceBounds
;
27
class
Volume
;
28
class
Surface
;
29
43
44
class
CombinedVolumeBounds
final :
public
VolumeBounds
{
45
public
:
47
CombinedVolumeBounds
();
48
50
CombinedVolumeBounds
(std::unique_ptr<Volume>
first
,
51
std::unique_ptr<Volume>
second
,
52
bool
intersection
);
53
55
CombinedVolumeBounds
(
const
CombinedVolumeBounds
& bobo);
56
58
virtual
~CombinedVolumeBounds
();
59
61
CombinedVolumeBounds
&
operator=
(
const
CombinedVolumeBounds
& bobo);
62
64
virtual
CombinedVolumeBounds
*
clone
()
const
override final;
65
68
virtual
bool
inside
(
const
Amg
::
Vector3D
&,
double
tol = 0.)
const
override final;
69
71
virtual
std
::
vector
<
std
::
unique_ptr
<
Trk
::
Surface
>>
decomposeToSurfaces
72
(
const
Amg
::
Transform3D
& transform) override final;
73
75
virtual
ObjectAccessor
boundarySurfaceAccessor
(
76
const
Amg
::
Vector3D
& gp,
const
Amg
::
Vector3D
& dir,
77
bool
forceInside = false)
const
override final;
78
80
const
Volume
*
first
()
const
;
81
83
const
Volume
*
second
()
const
;
84
86
bool
intersection
()
const
;
87
89
const
std
::
vector
<
bool
>&
boundsOrientation
()
const
;
90
92
virtual MsgStream&
dump
(MsgStream& sl)
const
override final;
93
95
virtual
std
::
ostream
&
dump
(
std
::
ostream
& sl)
const
override final;
96
97
private
:
98
static
Trk
::
Volume
*
createSubtractedVolume
(
const
Amg
::
Transform3D
& transf,
99
const
Trk
::
Volume
* subtrVol);
100
101
std
::
unique_ptr
<
Volume
>
m_first
{};
102
std::unique_ptr<Volume>
m_second
{};
103
bool
m_intersection
{};
104
EightObjectsAccessor
m_objectAccessor
{};
105
std::vector<bool>
m_boundsOrientation
{};
106
};
107
108
inline
CombinedVolumeBounds
*
CombinedVolumeBounds::clone
()
const
{
109
return
new
CombinedVolumeBounds
(*
this
);
110
}
111
112
inline
bool
CombinedVolumeBounds::inside
(
const
Amg::Vector3D
& pos,
double
tol)
const
{
113
if
(
m_intersection
) {
114
return
(
m_first
->inside(pos, tol) &&
m_second
->inside(pos, tol));
115
}
116
return
(
m_first
->inside(pos, tol) ||
m_second
->inside(pos, tol));
117
}
118
119
inline
const
Volume
*
CombinedVolumeBounds::first
()
const
{
120
return
m_first
.get();
121
}
122
123
inline
const
Volume
*
CombinedVolumeBounds::second
()
const
{
124
return
m_second
.get();
125
}
126
127
inline
bool
CombinedVolumeBounds::intersection
()
const
{
128
return
m_intersection
;
129
}
130
131
inline
ObjectAccessor
CombinedVolumeBounds::boundarySurfaceAccessor
(
132
const
Amg::Vector3D
&,
const
Amg::Vector3D
&,
bool
)
const
{
133
return
Trk::ObjectAccessor
(
m_objectAccessor
);
134
}
135
136
inline
const
std::vector<bool>&
CombinedVolumeBounds::boundsOrientation
()
const
{
137
return
(
m_boundsOrientation
);
138
}
139
140
}
// namespace Trk
141
142
#endif
// TRKVOLUMES_COMBINEDVOLUMEBOUNDS_H
143
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
Volume.h
Trk::CombinedVolumeBounds::m_second
std::unique_ptr< Volume > m_second
Definition
CombinedVolumeBounds.h:102
Trk::CombinedVolumeBounds::boundarySurfaceAccessor
virtual ObjectAccessor boundarySurfaceAccessor(const Amg::Vector3D &gp, const Amg::Vector3D &dir, bool forceInside=false) const override final
Provide accessor for BoundarySurfaces.
Definition
CombinedVolumeBounds.h:131
Trk::CombinedVolumeBounds::second
const Volume * second() const
This method returns the second VolumeBounds.
Definition
CombinedVolumeBounds.h:123
Trk::CombinedVolumeBounds::first
const Volume * first() const
This method returns the first VolumeBounds.
Definition
CombinedVolumeBounds.h:119
Trk::CombinedVolumeBounds::CombinedVolumeBounds
CombinedVolumeBounds()
Default Constructor.
Trk::CombinedVolumeBounds::decomposeToSurfaces
virtual std::vector< std::unique_ptr< Trk::Surface > > decomposeToSurfaces(const Amg::Transform3D &transform) override final
Method to decompose the Bounds into boundarySurfaces.
Definition
CombinedVolumeBounds.cxx:74
Trk::CombinedVolumeBounds::operator=
CombinedVolumeBounds & operator=(const CombinedVolumeBounds &bobo)
Assignment operator.
Definition
CombinedVolumeBounds.cxx:61
Trk::CombinedVolumeBounds::m_first
std::unique_ptr< Volume > m_first
Definition
CombinedVolumeBounds.h:101
Trk::CombinedVolumeBounds::boundsOrientation
const std::vector< bool > & boundsOrientation() const
This method returns bounds orientation.
Definition
CombinedVolumeBounds.h:136
Trk::CombinedVolumeBounds::m_intersection
bool m_intersection
Definition
CombinedVolumeBounds.h:103
Trk::CombinedVolumeBounds::m_objectAccessor
EightObjectsAccessor m_objectAccessor
Definition
CombinedVolumeBounds.h:104
Trk::CombinedVolumeBounds::~CombinedVolumeBounds
virtual ~CombinedVolumeBounds()
Destructor.
Trk::CombinedVolumeBounds::intersection
bool intersection() const
This method distinguishes between Union(0) and Intersection(1).
Definition
CombinedVolumeBounds.h:127
Trk::CombinedVolumeBounds::clone
virtual CombinedVolumeBounds * clone() const override final
Virtual constructor.
Definition
CombinedVolumeBounds.h:108
Trk::CombinedVolumeBounds::inside
virtual bool inside(const Amg::Vector3D &, double tol=0.) const override final
This method checks if position in the 3D volume frame is inside the volume.
Definition
CombinedVolumeBounds.h:112
Trk::CombinedVolumeBounds::createSubtractedVolume
static Trk::Volume * createSubtractedVolume(const Amg::Transform3D &transf, const Trk::Volume *subtrVol)
Definition
CombinedVolumeBounds.cxx:341
Trk::CombinedVolumeBounds::m_boundsOrientation
std::vector< bool > m_boundsOrientation
Definition
CombinedVolumeBounds.h:105
Trk::ObjectAccessor
Definition
ObjectAccessor.h:15
Trk::SurfaceBounds
Abstract base class for surface bounds to be specified.
Definition
SurfaceBounds.h:47
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::EightObjectsAccessor
std::array< ObjectAccessor::value_type, 8 > EightObjectsAccessor
Definition
ObjectsAccessor.h:18
dump
-event-from-file
std
STL namespace.
private
#define private
Definition
testRead.cxx:27
Generated on
for ATLAS Offline Software by
1.17.0