ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Tracking
TrkDetDescr
TrkGeometrySurfaces
TrkGeometrySurfaces
SubtractedDiscSurface.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
// SubtractedDiscSurface.h, (c) ATLAS Detector software
8
9
#ifndef TRKGEOMETRYSURFACES_SUBTRACTEDDISCSURFACE_H
10
#define TRKGEOMETRYSURFACES_SUBTRACTEDDISCSURFACE_H
11
12
// Trk
13
#include "
TrkDetDescrUtils/AreaExcluder.h
"
14
#include "
TrkEventPrimitives/ParamDefs.h
"
15
#include "
TrkSurfaces/DiscSurface.h
"
16
17
// Geometry & Maths
18
#include "
GeoPrimitives/GeoPrimitives.h
"
19
20
class
MsgStream;
21
22
namespace
Trk
{
23
31
32
class
SubtractedDiscSurface
final :
public
DiscSurface
33
{
34
public
:
36
SubtractedDiscSurface
() =
default
;
37
SubtractedDiscSurface
(
SubtractedDiscSurface
&&) =
default
;
38
SubtractedDiscSurface
&
operator=
(
SubtractedDiscSurface
&&) =
default
;
39
virtual
~SubtractedDiscSurface
() =
default
;
40
42
SubtractedDiscSurface
(
const
DiscSurface
& ps, std::shared_ptr<const AreaExcluder> vol,
bool
shared
);
43
45
SubtractedDiscSurface
(
const
SubtractedDiscSurface
& psf);
46
48
SubtractedDiscSurface
(
const
SubtractedDiscSurface
& psf,
49
const
Amg::Transform3D
& shift);
50
52
SubtractedDiscSurface
&
operator=
(
const
SubtractedDiscSurface
& psf);
53
55
virtual
bool
operator==
(
const
Surface
& sf)
const override
;
56
58
bool
shared
()
const
;
59
61
virtual
bool
insideBounds
(
const
Amg::Vector2D
& locpos,
62
double
tol1 = 0.,
63
double
tol2 = 0.)
const
override final;
64
66
const
AreaExcluder
*
subtractedVolume
()
const
;
67
69
virtual
std
::
string
name
()
const
override final
70
{
71
return
"Trk::SubtractedDiscSurface"
;
72
}
73
74
protected
:
75
std::shared_ptr<const AreaExcluder>
m_subtrVol
{
nullptr
};
76
bool
m_shared
{
true
};
77
};
78
79
inline
bool
80
SubtractedDiscSurface::insideBounds
(
const
Amg::Vector2D
& locpos,
81
double
tol1,
82
double
tol2)
const
83
{
84
// no subtracted Volume exists
85
if
(!
m_subtrVol
.get()) {
86
return
(this->
bounds
().
inside
(locpos, tol1, tol2));
87
}
88
// subtracted Volume exists, needs to be checked
89
double
rPos = locpos[
Trk::locR
];
90
double
phiPos = locpos[
Trk::locPhi
];
91
Amg::Vector3D
gp(rPos * cos(phiPos), rPos * sin(phiPos), 0.);
92
if
(
m_shared
) {
93
return
(this->
bounds
().
inside
(locpos, tol1, tol2) &&
94
m_subtrVol
.get()->inside(gp, 0.));
95
}
96
bool
in(this->
bounds
().
inside
(locpos, tol1, tol2) &&
97
!
m_subtrVol
.get()->inside(gp, 0.));
98
99
return
in;
100
}
101
102
inline
bool
103
SubtractedDiscSurface::shared
()
const
104
{
105
return
m_shared
;
106
}
107
108
inline
const
AreaExcluder
*
109
SubtractedDiscSurface::subtractedVolume
()
const
110
{
111
return
m_subtrVol
.get();
112
}
113
114
}
// end of namespace
115
116
#endif
// TRKGEOMETRYSURFACES_SUBTRACTEDDISCSURFACE_H
AreaExcluder.h
DiscSurface.h
GeoPrimitives.h
ParamDefs.h
Trk::AreaExcluder
Pure abstract base class.
Definition
AreaExcluder.h:26
Trk::DiscSurface::DiscSurface
DiscSurface()
Default Constructor.
Definition
DiscSurface.cxx:26
Trk::DiscSurface::bounds
const SurfaceBounds & bounds() const override final
This method returns the bounds by reference.
Trk::SubtractedDiscSurface::operator=
SubtractedDiscSurface & operator=(SubtractedDiscSurface &&)=default
Trk::SubtractedDiscSurface::SubtractedDiscSurface
SubtractedDiscSurface()=default
Defaults.
Trk::SubtractedDiscSurface::~SubtractedDiscSurface
virtual ~SubtractedDiscSurface()=default
Trk::SubtractedDiscSurface::m_subtrVol
std::shared_ptr< const AreaExcluder > m_subtrVol
Definition
SubtractedDiscSurface.h:75
Trk::SubtractedDiscSurface::m_shared
bool m_shared
Definition
SubtractedDiscSurface.h:76
Trk::SubtractedDiscSurface::operator==
virtual bool operator==(const Surface &sf) const override
Equality operator.
Definition
SubtractedDiscSurface.cxx:40
Trk::SubtractedDiscSurface::SubtractedDiscSurface
SubtractedDiscSurface(const SubtractedDiscSurface &psf)
Copy Constructor.
Trk::SubtractedDiscSurface::operator=
SubtractedDiscSurface & operator=(const SubtractedDiscSurface &psf)
Assignment operator.
Trk::SubtractedDiscSurface::subtractedVolume
const AreaExcluder * subtractedVolume() const
This method allows access to the subtracted part.
Definition
SubtractedDiscSurface.h:109
Trk::SubtractedDiscSurface::shared
bool shared() const
This method indicates the subtraction mode.
Definition
SubtractedDiscSurface.h:103
Trk::SubtractedDiscSurface::SubtractedDiscSurface
SubtractedDiscSurface(SubtractedDiscSurface &&)=default
Trk::SubtractedDiscSurface::name
virtual std::string name() const override final
Return properly formatted class name for screen output.
Definition
SubtractedDiscSurface.h:69
Trk::SubtractedDiscSurface::insideBounds
virtual bool insideBounds(const Amg::Vector2D &locpos, double tol1=0., double tol2=0.) const override final
This method calls the inside() method of the Bounds.
Definition
SubtractedDiscSurface.h:80
Trk::Surface
Abstract Base Class for tracking surfaces.
Definition
Surface.h:79
const
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition
GeoPrimitives.h:46
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition
GeoPrimitives.h:48
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::locR
@ locR
Definition
ParamDefs.h:44
Trk::locPhi
@ locPhi
local polar
Definition
ParamDefs.h:45
Trk::inside
@ inside
Definition
PropDirection.h:29
std
STL namespace.
Generated on
for ATLAS Offline Software by
1.17.0