ATLAS Offline Software
SubtractedDiscSurface.cxx
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.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 
18 // constructor
20  const Trk::DiscSurface& ps,
21  std::shared_ptr<const AreaExcluder> vol,
22  bool shared)
23  : Trk::DiscSurface(ps), m_subtrVol(std::move(vol)), m_shared(shared) {}
24 
25 // copy constructor
27 
28 // copy constructor with shift
30  : Trk::DiscSurface(psf, shift)
31  , m_subtrVol{psf.m_subtrVol}
32  , m_shared(psf.m_shared)
33 {}
34 
35 //Assignment
38 
39 bool
41 {
42  // first check the type not to compare apples with oranges
43  const Trk::SubtractedDiscSurface* sdsf = dynamic_cast<const Trk::SubtractedDiscSurface*>(&sf);
44  if (!sdsf)
45  return false;
46  bool surfaceEqual = Trk::DiscSurface::operator==(sf);
47  bool sharedEqual = (surfaceEqual) ? (shared() == sdsf->shared()) : false;
48  return sharedEqual;
49 }
Trk::SubtractedDiscSurface
Definition: SubtractedDiscSurface.h:33
Trk::DiscSurface
Definition: DiscSurface.h:54
Trk::SubtractedDiscSurface::m_subtrVol
std::shared_ptr< const AreaExcluder > m_subtrVol
Definition: SubtractedDiscSurface.h:75
python.SystemOfUnits.ps
float ps
Definition: SystemOfUnits.py:150
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::SubtractedDiscSurface::SubtractedDiscSurface
SubtractedDiscSurface()=default
Defaults.
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Trk::DiscSurface::operator==
virtual bool operator==(const Surface &sf) const override
Equality operator.
Definition: DiscSurface.cxx:160
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:40
Trk::SubtractedDiscSurface::operator=
SubtractedDiscSurface & operator=(SubtractedDiscSurface &&)=default
Trk::Surface
Definition: Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h:79