ATLAS Offline Software
Tracking
TrkDetDescr
TrkGeometrySurfaces
src
SubtractedDiscSurface.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3
*/
4
6
// SubtractedDiscSurface.cxx, (c) ATLAS Detector Software
8
9
// Trk
10
#include "
TrkGeometrySurfaces/SubtractedDiscSurface.h
"
11
// Gaudi
12
#include "GaudiKernel/MsgStream.h"
13
// STD
14
#include <iomanip>
15
#include <iostream>
16
17
// default constructor
18
Trk::SubtractedDiscSurface::SubtractedDiscSurface
()
19
:
Trk
::
DiscSurface
()
20
, m_subtrVol()
21
, m_shared(true)
22
{}
23
24
// copy constructor
25
Trk::SubtractedDiscSurface::SubtractedDiscSurface
(
const
SubtractedDiscSurface
& psf)
26
27
=
default
;
28
29
// copy constructor with shift
30
Trk::SubtractedDiscSurface::SubtractedDiscSurface
(
const
SubtractedDiscSurface
& psf,
const
Amg::Transform3D
& shift)
31
:
Trk
::
DiscSurface
(psf, shift)
32
, m_subtrVol(psf.m_subtrVol)
33
, m_shared(psf.m_shared)
34
{}
35
36
// constructor
37
Trk::SubtractedDiscSurface::SubtractedDiscSurface
(
const
Trk::DiscSurface
& ps,
AreaExcluder
* vol,
bool
shared)
38
:
Trk
::
DiscSurface
(ps)
39
, m_subtrVol(
Trk
::
SharedObject
<
AreaExcluder
>(vol))
40
, m_shared(shared)
41
{}
42
43
// destructor (will call destructor from base class which deletes objects)
44
Trk::SubtractedDiscSurface::~SubtractedDiscSurface
() =
default
;
45
46
Trk::SubtractedDiscSurface
&
47
Trk::SubtractedDiscSurface::operator=
(
const
Trk::SubtractedDiscSurface
& psf)
48
{
49
50
if
(
this
!= &psf) {
51
Trk::DiscSurface::operator=
(psf);
52
m_subtrVol = psf.
m_subtrVol
;
53
m_shared = psf.
m_shared
;
54
}
55
return
*
this
;
56
}
57
58
bool
59
Trk::SubtractedDiscSurface::operator==
(
const
Trk::Surface
&
sf
)
const
60
{
61
// first check the type not to compare apples with oranges
62
const
Trk::SubtractedDiscSurface
* sdsf =
dynamic_cast<
const
Trk::SubtractedDiscSurface
*
>
(&
sf
);
63
if
(!sdsf)
64
return
false
;
65
bool
surfaceEqual =
Trk::DiscSurface::operator==
(
sf
);
66
bool
sharedEqual = (surfaceEqual) ? (shared() == sdsf->
shared
()) :
false
;
67
return
sharedEqual;
68
}
Trk::SubtractedDiscSurface::~SubtractedDiscSurface
virtual ~SubtractedDiscSurface()
Destructor.
Trk::SubtractedDiscSurface
Definition:
SubtractedDiscSurface.h:33
Trk::DiscSurface::operator=
DiscSurface & operator=(const DiscSurface &dsf)
Assignement operator.
Definition:
DiscSurface.cxx:148
Trk::DiscSurface
Definition:
DiscSurface.h:54
Trk::SubtractedDiscSurface::operator=
SubtractedDiscSurface & operator=(const SubtractedDiscSurface &psf)
Assignment operator.
Definition:
SubtractedDiscSurface.cxx:47
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition:
GeoPrimitives.h:46
Trk::SubtractedDiscSurface::shared
bool shared() const
This method indicates the subtraction mode.
Definition:
SubtractedDiscSurface.h:103
Trk::AreaExcluder
Definition:
AreaExcluder.h:26
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition:
FakeTrackBuilder.h:9
Trk::SubtractedDiscSurface::m_subtrVol
SharedObject< AreaExcluder > m_subtrVol
Definition:
SubtractedDiscSurface.h:75
Trk::DiscSurface::operator==
virtual bool operator==(const Surface &sf) const override
Equality operator.
Definition:
DiscSurface.cxx:159
Trk::SubtractedDiscSurface::SubtractedDiscSurface
SubtractedDiscSurface()
Default Constructor - needed for persistency.
Definition:
SubtractedDiscSurface.cxx:18
Trk::SharedObject
std::shared_ptr< T > SharedObject
Definition:
SharedObject.h:24
mapkey::sf
@ sf
Definition:
TElectronEfficiencyCorrectionTool.cxx:38
SubtractedDiscSurface.h
Trk::SubtractedDiscSurface::operator==
virtual bool operator==(const Surface &sf) const override
Equality operator.
Definition:
SubtractedDiscSurface.cxx:59
Trk::Surface
Definition:
Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h:75
Trk::SubtractedDiscSurface::m_shared
bool m_shared
Definition:
SubtractedDiscSurface.h:76
Generated on Thu Nov 7 2024 21:26:44 for ATLAS Offline Software by
1.8.18