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