ATLAS Offline Software
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
11 // Gaudi
12 #include "GaudiKernel/MsgStream.h"
13 // STD
14 #include <iomanip>
15 #include <iostream>
16 
17 // default constructor
19  : Trk::PlaneSurface()
20  , m_subtrVol()
21  , m_shared(true)
22 {}
23 
24 // copy constructor
26 
27 = default;
28 
29 // copy constructor with shift
31  : Trk::PlaneSurface(psf, transf)
32  , m_subtrVol(psf.m_subtrVol)
33  , m_shared(psf.m_shared)
34 {}
35 
36 // constructor
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)
45 
48 {
49 
50  if (this != &psf) {
52  m_subtrVol = psf.m_subtrVol;
53  m_shared = psf.m_shared;
54  }
55  return *this;
56 }
57 
58 bool
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