diff --git a/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/AnnulusBounds.h b/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/AnnulusBounds.h index ec185ab0baf80d6f20dbf4a3f6cb9bdb25e91b76..9e017a7d3de3c3c72641ef10e75b0f2a823d992b 100644 --- a/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/AnnulusBounds.h +++ b/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/AnnulusBounds.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -66,7 +66,7 @@ public: AnnulusBounds(const AnnulusBounds& annbo) = default; /**Destructor*/ - virtual ~AnnulusBounds(); + virtual ~AnnulusBounds() = default; /**Virtual constructor*/ virtual AnnulusBounds* clone() const override; diff --git a/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/ConeBounds.h b/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/ConeBounds.h index b80e612110ee982d97d935c1c9a27335ab7e5d6d..df5fd340dae08e2f8a0312359a495459d422dcbe 100644 --- a/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/ConeBounds.h +++ b/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/ConeBounds.h @@ -66,13 +66,13 @@ public: ConeBounds(double alpha, double zmin, double zmax, double halfphi = M_PI, double avphi = 0.); /**Copy Constructor */ - ConeBounds(const ConeBounds& cylbo); - - /**Destructor */ - virtual ~ConeBounds(); + ConeBounds(const ConeBounds& cylbo) = default; /**Assignment operator*/ - ConeBounds& operator=(const ConeBounds& cylbo); + ConeBounds& operator=(const ConeBounds& cylbo) = default; + + /**Destructor */ + virtual ~ConeBounds() = default; /**Equality operator*/ virtual bool operator==(const SurfaceBounds& sbo) const override; diff --git a/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/CylinderBounds.h b/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/CylinderBounds.h index 3e3089acf9241cf54ca1599cc1d727bf0197f650..124e8171a3dbb6a221633e13d65002bab043b8ea 100644 --- a/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/CylinderBounds.h +++ b/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/CylinderBounds.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -68,16 +68,19 @@ public: CylinderBounds(double radius, double halfphi, double avphi, double halez); /**Copy Constructor */ - CylinderBounds(const CylinderBounds& cylbo); + CylinderBounds(const CylinderBounds& cylbo) = default; + + /**Move Constructor */ + CylinderBounds(CylinderBounds&& cylbo) = default; /**Destructor */ - virtual ~CylinderBounds(); + virtual ~CylinderBounds() = default; /**Assignment operator*/ - CylinderBounds& operator=(const CylinderBounds& cylbo); + CylinderBounds& operator=(const CylinderBounds& cylbo) = default; /**Move assignment operator*/ - CylinderBounds& operator=(CylinderBounds&& cylbo); + CylinderBounds& operator=(CylinderBounds&& cylbo) = default; /**Equality operator*/ virtual bool operator==(const SurfaceBounds& sbo) const override; diff --git a/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/DiamondBounds.h b/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/DiamondBounds.h index 212401fd19cef6533ae7a69dfa4fa2859160dc15..2c375d619997ce689cf9d546f36b2e4525fb5af6 100644 --- a/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/DiamondBounds.h +++ b/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/DiamondBounds.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -55,16 +55,16 @@ public: DiamondBounds(double minhalex, double medhalex, double maxhalex, double haley1, double haley2); /**Copy constructor*/ - DiamondBounds(const DiamondBounds& diabo); + DiamondBounds(const DiamondBounds& diabo) = default; /**Destructor*/ - virtual ~DiamondBounds(); + virtual ~DiamondBounds() = default; /**Virtual constructor*/ DiamondBounds* clone() const override; /**Assignment operator*/ - DiamondBounds& operator=(const DiamondBounds& sbo); + DiamondBounds& operator=(const DiamondBounds& sbo) = default; /**Equality operator*/ virtual bool operator==(const SurfaceBounds& diabo) const override; diff --git a/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/DiscSurface.h b/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/DiscSurface.h index ab9f10755e773fcdf3162c8a32cc52dbf2379ee0..42d683b16de5fe97ef92031d3d6e82e6fca6a3f4 100644 --- a/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/DiscSurface.h +++ b/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/DiscSurface.h @@ -94,7 +94,7 @@ public: DiscSurface(const DiscSurface& psf, const Amg::Transform3D& transf); /**Destructor*/ - virtual ~DiscSurface(); + virtual ~DiscSurface() = default; /**Assignement operator*/ DiscSurface& operator=(const DiscSurface& dsf); diff --git a/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/EllipseBounds.h b/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/EllipseBounds.h index d64675cab2359cee34cba0ddb822f2277bafdb26..2d07e63d18ecd5ab48a691d5bf09463b88771cc0 100644 --- a/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/EllipseBounds.h +++ b/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/EllipseBounds.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -63,16 +63,16 @@ public: EllipseBounds(double minrad1, double minrad2, double maxrad1, double maxrad2, double avephi, double hphisec); /**Copy constructor*/ - EllipseBounds(const EllipseBounds& discbo); + EllipseBounds(const EllipseBounds& discbo) = default; /**Destructor*/ - virtual ~EllipseBounds(); + virtual ~EllipseBounds() = default; /**Assignment operator*/ - EllipseBounds& operator=(const EllipseBounds& discbo); + EllipseBounds& operator=(const EllipseBounds& discbo) = default; /**Move assignment operator*/ - EllipseBounds& operator=(EllipseBounds&& discbo); + EllipseBounds& operator=(EllipseBounds&& discbo) = default; /**Equality operator*/ virtual bool operator==(const SurfaceBounds& sbo) const override; diff --git a/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/PerigeeSurface.h b/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/PerigeeSurface.h index c278c7bdc0b92b39ba31a6dc162e8d47ebfae35f..0c74ae462332c0f7b4760adeeb7a543e91bee786 100644 --- a/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/PerigeeSurface.h +++ b/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/PerigeeSurface.h @@ -59,7 +59,7 @@ public: PerigeeSurface(const PerigeeSurface& pesf, const Amg::Transform3D& transf); /**Destructor*/ - virtual ~PerigeeSurface(); + virtual ~PerigeeSurface() = default; /**Virtual constructor*/ virtual PerigeeSurface* clone() const override; diff --git a/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/PlaneSurface.h b/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/PlaneSurface.h index 6d494836d060155bb7071d1ef766e240acddb7a9..917177da3dfa45c6661a020e9950f3f571d9dd5f 100644 --- a/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/PlaneSurface.h +++ b/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/PlaneSurface.h @@ -63,7 +63,7 @@ public: PlaneSurface(); /** Copy Constructor*/ - PlaneSurface(const PlaneSurface& psf); + PlaneSurface(const PlaneSurface& psf) = default; /** Copy Constructor with shift*/ PlaneSurface(const PlaneSurface& psf, const Amg::Transform3D& transf); @@ -129,10 +129,10 @@ public: Trk::SharedObject<const Trk::SurfaceBounds>& sbounds); /**Destructor*/ - virtual ~PlaneSurface(); + virtual ~PlaneSurface() = default; /**Assignment operator*/ - PlaneSurface& operator=(const PlaneSurface& psf); + PlaneSurface& operator=(const PlaneSurface& psf) = default; /**Equality operator*/ virtual bool operator==(const Surface& sf) const override; diff --git a/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/RotatedDiamondBounds.h b/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/RotatedDiamondBounds.h index 99f163c3fa8785b66d5deb15c40d99b0a5e9b04b..9db6926a50647f0d3dc886e8f1a5c58da771b492 100644 --- a/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/RotatedDiamondBounds.h +++ b/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/RotatedDiamondBounds.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -60,16 +60,16 @@ public: RotatedDiamondBounds(double minhalex, double medhalex, double maxhalex, double haley1, double haley2); /**Copy constructor*/ - RotatedDiamondBounds(const RotatedDiamondBounds& diabo); + RotatedDiamondBounds(const RotatedDiamondBounds& diabo) = default; /**Destructor*/ - virtual ~RotatedDiamondBounds(); + virtual ~RotatedDiamondBounds() = default; /**Virtual constructor*/ RotatedDiamondBounds* clone() const override; /**Assignment operator*/ - RotatedDiamondBounds& operator=(const RotatedDiamondBounds& sbo); + RotatedDiamondBounds& operator=(const RotatedDiamondBounds& sbo) = default; /**Equality operator*/ virtual bool operator==(const SurfaceBounds& diabo) const override; diff --git a/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/RotatedTrapezoidBounds.h b/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/RotatedTrapezoidBounds.h index c6f9986ca7ff7bd8ebfaca23a13c2ac19568a216..76bba568e297e6825ac7b8cc882d9a665f62348e 100644 --- a/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/RotatedTrapezoidBounds.h +++ b/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/RotatedTrapezoidBounds.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -61,10 +61,10 @@ public: RotatedTrapezoidBounds(double halex, double minhalex, double maxhalex); /**Copy constructor*/ - RotatedTrapezoidBounds(const RotatedTrapezoidBounds& trabo); + RotatedTrapezoidBounds(const RotatedTrapezoidBounds& trabo) = default; /**Destructor*/ - virtual ~RotatedTrapezoidBounds(); + virtual ~RotatedTrapezoidBounds() = default; /**Virtual constructor*/ virtual RotatedTrapezoidBounds* clone() const override; @@ -73,7 +73,7 @@ public: virtual BoundsType type() const override { return SurfaceBounds::RotatedTrapezoid; } /**Assignment operator*/ - RotatedTrapezoidBounds& operator=(const RotatedTrapezoidBounds& sbo); + RotatedTrapezoidBounds& operator=(const RotatedTrapezoidBounds& sbo) = default; /**Equality operator*/ virtual bool operator==(const SurfaceBounds& trabo) const override; diff --git a/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/StraightLineSurface.h b/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/StraightLineSurface.h index db57e565fbc56c1a0c0823308dc7d0a572160e5d..84ccf2153c683d83bfda45928aeb0f55739f6b02 100644 --- a/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/StraightLineSurface.h +++ b/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/StraightLineSurface.h @@ -69,7 +69,7 @@ public: const Amg::Transform3D& transf); /**Destructor*/ - virtual ~StraightLineSurface(); + virtual ~StraightLineSurface() = default; /**Assignment operator*/ StraightLineSurface& operator=(const StraightLineSurface& slsf); diff --git a/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/TrapezoidBounds.h b/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/TrapezoidBounds.h index 08c4038c0e7fa9f8f5239c70385f647a3441cc67..e6b530c1439a67f2d3b66efd7c0b25f2a85b9f41 100644 --- a/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/TrapezoidBounds.h +++ b/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/TrapezoidBounds.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -62,10 +62,10 @@ public: TrapezoidBounds(double minhalex, double haley, double alpha, double beta); /**Copy constructor*/ - TrapezoidBounds(const TrapezoidBounds& trabo); + TrapezoidBounds(const TrapezoidBounds& trabo) = default; /**Destructor*/ - virtual ~TrapezoidBounds(); + virtual ~TrapezoidBounds() = default; /**Virtual constructor*/ virtual TrapezoidBounds* clone() const override; @@ -74,7 +74,7 @@ public: virtual BoundsType type() const override { return SurfaceBounds::Trapezoid; } /**Assignment operator*/ - TrapezoidBounds& operator=(const TrapezoidBounds& sbo); + TrapezoidBounds& operator=(const TrapezoidBounds& sbo) = default; /**Equality operator*/ virtual bool operator==(const SurfaceBounds& trabo) const override; diff --git a/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/TriangleBounds.h b/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/TriangleBounds.h index 01bc15a86b6d3e41e03e246fed2dd71689e54319..9117cfc67b8e8b0a3690151a79fd99b08b9e35c4 100644 --- a/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/TriangleBounds.h +++ b/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/TriangleBounds.h @@ -64,13 +64,13 @@ public: TriangleBounds(const Amg::Vector2D& p1, const Amg::Vector2D& p2, const Amg::Vector2D& p3); /**Copy constructor*/ - TriangleBounds(const TriangleBounds& tribo); + TriangleBounds(const TriangleBounds& tribo) = default; /**Destructor*/ - virtual ~TriangleBounds(); + virtual ~TriangleBounds() = default; /**Assignment Operator*/ - TriangleBounds& operator=(const TriangleBounds& recbo); + TriangleBounds& operator=(const TriangleBounds& recbo) = default; /**Equality operator*/ virtual bool operator==(const SurfaceBounds& sbo) const override; diff --git a/Tracking/TrkDetDescr/TrkSurfaces/src/AnnulusBounds.cxx b/Tracking/TrkDetDescr/TrkSurfaces/src/AnnulusBounds.cxx index 0f492f84d92c5deffc294e98a23e072795a65995..8aea1456bb9eece51fab74952c6602d40f302915 100644 --- a/Tracking/TrkDetDescr/TrkSurfaces/src/AnnulusBounds.cxx +++ b/Tracking/TrkDetDescr/TrkSurfaces/src/AnnulusBounds.cxx @@ -106,18 +106,18 @@ public: || ((x * h + y * w - w * h) * (x * h + y * w - w * h) <= r * r * (w * w + h * h) && x * w - y * h >= -h * h && x * w - y * h <= w * w)) { // collision with (0, h)---(w, 0) return true; - } + } if ((x - w) * (x - w) + (y - h) * (y - h) <= r * r || (x <= w && y - r <= h) || (y <= h && x - r <= w)) { return iterate(x, y, w, 0, 0, h, r * r); // collision within triangle (0, h) (w, h) (0, 0) is possible } return false; - - } + + } double R = -r; double localCos = x / R; double deltaR = std::sqrt(h * h + (w * w - h * h) * localCos * localCos); return deltaR >= R - std::sqrt(x * x + y * y); - + } EllipseCollisionTest(int maxIterations) { this->m_maxIterations = maxIterations; } }; @@ -196,9 +196,6 @@ Trk::AnnulusBounds::AnnulusBounds(double minR, double maxR, double R, double phi m_minYin = minR; } -// destructor -Trk::AnnulusBounds::~AnnulusBounds() = default; - bool Trk::AnnulusBounds::operator==(const Trk::SurfaceBounds& sbo) const { @@ -357,7 +354,7 @@ Trk::AnnulusBounds::isAbove(const Amg::Vector2D& locpo, // the most tolerant approach for tol1 and tol2 double sign = k > 0. ? -1. : +1.; return (locpo[Trk::locY] + tol2 > (k * (locpo[Trk::locX] + sign * tol1) + d)); - } + } return false; } @@ -472,7 +469,7 @@ Trk::AnnulusBounds::circleLineIntersection(double R, double k, double d) const x2 = (-2. * k * d + std::sqrt(delta)) / (2. * (1 + k * k)); y1 = k * x1 + d; y2 = k * x2 + d; - + if (y1 > y2) { solution.push_back(x1); solution.push_back(y1); diff --git a/Tracking/TrkDetDescr/TrkSurfaces/src/ConeBounds.cxx b/Tracking/TrkDetDescr/TrkSurfaces/src/ConeBounds.cxx index 3e0871a206a8845f154c0f8658e80214cbc144cd..12e7f23151acafb906d77c3fea790801fdbdc1ce 100644 --- a/Tracking/TrkDetDescr/TrkSurfaces/src/ConeBounds.cxx +++ b/Tracking/TrkDetDescr/TrkSurfaces/src/ConeBounds.cxx @@ -50,27 +50,6 @@ Trk::ConeBounds::ConeBounds(double alpha, double zmin, double zmax, double halfp initCache(); } -Trk::ConeBounds::ConeBounds(const Trk::ConeBounds& conebo) - : m_boundValues(conebo.m_boundValues) - , m_tanAlpha(conebo.m_tanAlpha) - , m_sinAlpha(conebo.m_sinAlpha) - , m_cosAlpha(conebo.m_cosAlpha) -{} - -Trk::ConeBounds::~ConeBounds() = default; - -Trk::ConeBounds& -Trk::ConeBounds::operator=(const Trk::ConeBounds& conebo) -{ - if (this != &conebo) { - m_tanAlpha = conebo.m_tanAlpha; - m_sinAlpha = conebo.m_sinAlpha; - m_cosAlpha = conebo.m_cosAlpha; - m_boundValues = conebo.m_boundValues; - } - return *this; -} - bool Trk::ConeBounds::operator==(const SurfaceBounds& sbo) const { diff --git a/Tracking/TrkDetDescr/TrkSurfaces/src/CylinderBounds.cxx b/Tracking/TrkDetDescr/TrkSurfaces/src/CylinderBounds.cxx index 8f3035e7728e8188eee3182a267132419a916f30..2930a0b3b2c415865dad131d61b0fbbbed295274 100644 --- a/Tracking/TrkDetDescr/TrkSurfaces/src/CylinderBounds.cxx +++ b/Tracking/TrkDetDescr/TrkSurfaces/src/CylinderBounds.cxx @@ -48,34 +48,6 @@ Trk::CylinderBounds::CylinderBounds(double radius, double haphi, double averagep m_boundValues[CylinderBounds::bv_halfZ] = fabs(halez); } -Trk::CylinderBounds::CylinderBounds(const Trk::CylinderBounds& cylbo) - : Trk::SurfaceBounds() - , m_boundValues(cylbo.m_boundValues) - , m_checkPhi(cylbo.m_checkPhi) -{} - -Trk::CylinderBounds::~CylinderBounds() = default; - -Trk::CylinderBounds& -Trk::CylinderBounds::operator=(const Trk::CylinderBounds& cylbo) -{ - if (this != &cylbo) { - m_boundValues = cylbo.m_boundValues; - m_checkPhi = cylbo.m_checkPhi; - } - return *this; -} - -Trk::CylinderBounds& -Trk::CylinderBounds::operator=(Trk::CylinderBounds&& cylbo) -{ - if (this != &cylbo) { - m_boundValues = std::move(cylbo.m_boundValues); - m_checkPhi = cylbo.m_checkPhi; - } - return *this; -} - bool Trk::CylinderBounds::operator==(const SurfaceBounds& sbo) const { diff --git a/Tracking/TrkDetDescr/TrkSurfaces/src/DiamondBounds.cxx b/Tracking/TrkDetDescr/TrkSurfaces/src/DiamondBounds.cxx index 1ae873c77b120ace83a0add9316f3005452e4387..b1977dede3a1f1b87b78b4bced47ca8c35290c84 100644 --- a/Tracking/TrkDetDescr/TrkSurfaces/src/DiamondBounds.cxx +++ b/Tracking/TrkDetDescr/TrkSurfaces/src/DiamondBounds.cxx @@ -38,28 +38,6 @@ Trk::DiamondBounds::DiamondBounds(double minhalex, double medhalex, double maxha initCache(); } -// copy constructor -Trk::DiamondBounds::DiamondBounds(const DiamondBounds& diabo) - : Trk::SurfaceBounds() - , m_boundValues(diabo.m_boundValues) - , m_alpha1(diabo.m_alpha1) - , m_alpha2(diabo.m_alpha2) -{} - -// destructor -Trk::DiamondBounds::~DiamondBounds() = default; - -Trk::DiamondBounds& -Trk::DiamondBounds::operator=(const DiamondBounds& diabo) -{ - if (this != &diabo) { - m_boundValues = diabo.m_boundValues; - m_alpha1 = diabo.m_alpha1; - m_alpha2 = diabo.m_alpha2; - } - return *this; -} - bool Trk::DiamondBounds::operator==(const Trk::SurfaceBounds& sbo) const { @@ -105,13 +83,13 @@ Trk::DiamondBounds::insideFull(const Amg::Vector2D& locpo, double tol1, double t m_boundValues[DiamondBounds::bv_halfY1] : 0.; return (fabs(locpo[Trk::locX]) <= m_boundValues[DiamondBounds::bv_medHalfX] - k * fabs(locpo[Trk::locY])); - } + } double k = m_boundValues[DiamondBounds::bv_halfY2] > 0. ? (m_boundValues[DiamondBounds::bv_medHalfX] - m_boundValues[DiamondBounds::bv_maxHalfX]) / 2 / m_boundValues[DiamondBounds::bv_halfY2] : 0.; return (fabs(locpo[Trk::locX]) <= m_boundValues[DiamondBounds::bv_medHalfX] - k * fabs(locpo[Trk::locY])); - + } // opening angle in point A diff --git a/Tracking/TrkDetDescr/TrkSurfaces/src/DiscSurface.cxx b/Tracking/TrkDetDescr/TrkSurfaces/src/DiscSurface.cxx index 4c519c73558e47233dd3cfc707303a26b7e086e6..39cdf018f46f9f2b0b9ad4fdbe080854f060005e 100644 --- a/Tracking/TrkDetDescr/TrkSurfaces/src/DiscSurface.cxx +++ b/Tracking/TrkDetDescr/TrkSurfaces/src/DiscSurface.cxx @@ -97,8 +97,6 @@ Trk::DiscSurface::DiscSurface(const Trk::TrkDetElementBase& detelement) , m_bounds() , m_referencePoint(nullptr) {} -// destructor (will call destructor from base class which deletes objects) -Trk::DiscSurface::~DiscSurface() = default; Trk::DiscSurface& Trk::DiscSurface::operator=(const DiscSurface& dsf) @@ -237,9 +235,9 @@ Trk::DiscSurface::straightLineDistanceEstimate(const Amg::Vector3D& pos, const A if (A == 0.) { // direction parallel to surface if (fabs(d) < tol) { return Trk::DistanceSolution(1, 0., true, 0.); - } + } return Trk::DistanceSolution(0, d, true, 0.); - + } double D = b * (S - (pos.dot(N))) / A; diff --git a/Tracking/TrkDetDescr/TrkSurfaces/src/EllipseBounds.cxx b/Tracking/TrkDetDescr/TrkSurfaces/src/EllipseBounds.cxx index 4e430e2b4ab2d450af9a753c5554af517d1185d9..f07762e9844a677817dc5194b457f4144a58f1a8 100644 --- a/Tracking/TrkDetDescr/TrkSurfaces/src/EllipseBounds.cxx +++ b/Tracking/TrkDetDescr/TrkSurfaces/src/EllipseBounds.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -54,29 +54,6 @@ Trk::EllipseBounds::EllipseBounds(double minradX, swap(m_boundValues[EllipseBounds::bv_rMinY], m_boundValues[EllipseBounds::bv_rMaxY]); } -Trk::EllipseBounds::EllipseBounds(const EllipseBounds& discbo) - : Trk::SurfaceBounds() - , m_boundValues(discbo.m_boundValues) -{} - -Trk::EllipseBounds::~EllipseBounds() = default; - -Trk::EllipseBounds& -Trk::EllipseBounds::operator=(const EllipseBounds& discbo) -{ - if (this != &discbo) - m_boundValues = discbo.m_boundValues; - return *this; -} - -Trk::EllipseBounds& -Trk::EllipseBounds::operator=(EllipseBounds&& discbo) -{ - if (this != &discbo) - m_boundValues = std::move(discbo.m_boundValues); - return *this; -} - bool Trk::EllipseBounds::operator==(const Trk::SurfaceBounds& sbo) const { diff --git a/Tracking/TrkDetDescr/TrkSurfaces/src/PerigeeSurface.cxx b/Tracking/TrkDetDescr/TrkSurfaces/src/PerigeeSurface.cxx index e84583da29906fa2ecf6f91f6762c4abe543eeff..04634e9a14b47f8a0837f951a8e8b74bfb2b45d3 100644 --- a/Tracking/TrkDetDescr/TrkSurfaces/src/PerigeeSurface.cxx +++ b/Tracking/TrkDetDescr/TrkSurfaces/src/PerigeeSurface.cxx @@ -64,7 +64,6 @@ Trk::PerigeeSurface::PerigeeSurface(const PerigeeSurface& pesf, const Amg::Trans Surface::m_transform = std::make_unique<Amg::Transform3D>(shift * (*pesf.m_transform)); } -Trk::PerigeeSurface::~PerigeeSurface() = default; // assignment operator Trk::PerigeeSurface& @@ -97,7 +96,7 @@ Trk::PerigeeSurface::localToGlobal(const Trk::LocalParameters& locpars) const Amg::Vector3D loc3Dframe( -locpars[Trk::d0] * sin(locpars[Trk::phi0]), locpars[Trk::d0] * cos(locpars[Trk::phi0]), locpars[Trk::z0]); return new Amg::Vector3D(transform() * loc3Dframe); - } + } return new Amg::Vector3D(0., 0., locpars[Trk::z0] + (center().z())); } diff --git a/Tracking/TrkDetDescr/TrkSurfaces/src/PlaneSurface.cxx b/Tracking/TrkDetDescr/TrkSurfaces/src/PlaneSurface.cxx index 991f8f8f2e468b15e222d4299ccacab93bf9192e..2364d542b6c96e50c0013ddd2c03038c146fe45f 100644 --- a/Tracking/TrkDetDescr/TrkSurfaces/src/PlaneSurface.cxx +++ b/Tracking/TrkDetDescr/TrkSurfaces/src/PlaneSurface.cxx @@ -35,10 +35,6 @@ Trk::PlaneSurface::PlaneSurface() , m_bounds() {} -// copy constructor -Trk::PlaneSurface::PlaneSurface(const PlaneSurface& psf) - -= default; // copy constructor with shift Trk::PlaneSurface::PlaneSurface(const PlaneSurface& psf, const Amg::Transform3D& transf) @@ -153,20 +149,6 @@ Trk::PlaneSurface::PlaneSurface(Amg::Transform3D* htrans, Trk::SharedObject<cons , m_bounds(tbounds) {} -// destructor (will call destructor from base class which deletes objects) -Trk::PlaneSurface::~PlaneSurface() = default; - -Trk::PlaneSurface& -Trk::PlaneSurface::operator=(const Trk::PlaneSurface& psf) -{ - - if (this != &psf) { - Trk::Surface::operator=(psf); - m_bounds = psf.m_bounds; - } - return *this; -} - bool Trk::PlaneSurface::operator==(const Trk::Surface& sf) const { @@ -246,9 +228,9 @@ Trk::PlaneSurface::straightLineDistanceEstimate(const Amg::Vector3D& pos, const if (A == 0.) { // direction parallel to surface if (fabs(d) < tol) { return Trk::DistanceSolution(1, 0., true, 0.); - } + } return Trk::DistanceSolution(0, d, true, 0.); - + } return Trk::DistanceSolution(1, d, true, -d / A); diff --git a/Tracking/TrkDetDescr/TrkSurfaces/src/RotatedDiamondBounds.cxx b/Tracking/TrkDetDescr/TrkSurfaces/src/RotatedDiamondBounds.cxx index 01c44034acd06492efef7e2cf82016ba70f2fc7b..c30911421334b43adde7bca7b4b13847b273c2d4 100644 --- a/Tracking/TrkDetDescr/TrkSurfaces/src/RotatedDiamondBounds.cxx +++ b/Tracking/TrkDetDescr/TrkSurfaces/src/RotatedDiamondBounds.cxx @@ -42,28 +42,6 @@ Trk::RotatedDiamondBounds::RotatedDiamondBounds(double minhalex, initCache(); } -// copy constructor -Trk::RotatedDiamondBounds::RotatedDiamondBounds(const RotatedDiamondBounds& diabo) - : Trk::SurfaceBounds() - , m_boundValues(diabo.m_boundValues) - , m_alpha1(diabo.m_alpha1) - , m_alpha2(diabo.m_alpha2) -{} - -// destructor -Trk::RotatedDiamondBounds::~RotatedDiamondBounds() = default; - -Trk::RotatedDiamondBounds& -Trk::RotatedDiamondBounds::operator=(const RotatedDiamondBounds& diabo) -{ - if (this != &diabo) { - m_boundValues = diabo.m_boundValues; - m_alpha1 = diabo.m_alpha1; - m_alpha2 = diabo.m_alpha2; - } - return *this; -} - bool Trk::RotatedDiamondBounds::operator==(const Trk::SurfaceBounds& sbo) const { @@ -110,14 +88,14 @@ Trk::RotatedDiamondBounds::insideFull(const Amg::Vector2D& locpo, double tol1, d m_boundValues[RotatedDiamondBounds::bv_halfY1] : 0.; return (fabs(locpo[Trk::locY]) <= m_boundValues[RotatedDiamondBounds::bv_medHalfX] - k * fabs(locpo[Trk::locX])); - } + } double k = m_boundValues[RotatedDiamondBounds::bv_halfY2] > 0. ? (m_boundValues[RotatedDiamondBounds::bv_medHalfX] - m_boundValues[RotatedDiamondBounds::bv_maxHalfX]) / 2 / m_boundValues[RotatedDiamondBounds::bv_halfY2] : 0.; return (fabs(locpo[Trk::locY]) <= m_boundValues[RotatedDiamondBounds::bv_medHalfX] - k * fabs(locpo[Trk::locX])); - + } // opening angle in point A diff --git a/Tracking/TrkDetDescr/TrkSurfaces/src/RotatedTrapezoidBounds.cxx b/Tracking/TrkDetDescr/TrkSurfaces/src/RotatedTrapezoidBounds.cxx index 88f8fcc8718c99d30d24d65296db0a1e2f9fc086..16835e2e5f9e6fe6406c0ca4d8669439b36dd51f 100644 --- a/Tracking/TrkDetDescr/TrkSurfaces/src/RotatedTrapezoidBounds.cxx +++ b/Tracking/TrkDetDescr/TrkSurfaces/src/RotatedTrapezoidBounds.cxx @@ -38,27 +38,6 @@ Trk::RotatedTrapezoidBounds::RotatedTrapezoidBounds(double halex, double minhale initCache(); } -// copy constructor -Trk::RotatedTrapezoidBounds::RotatedTrapezoidBounds(const RotatedTrapezoidBounds& trabo) - : Trk::SurfaceBounds() - , m_boundValues(trabo.m_boundValues) - , m_kappa(trabo.m_kappa) - , m_delta(trabo.m_delta) -{} - -// destructor -Trk::RotatedTrapezoidBounds::~RotatedTrapezoidBounds() = default; - -Trk::RotatedTrapezoidBounds& -Trk::RotatedTrapezoidBounds::operator=(const RotatedTrapezoidBounds& trabo) -{ - if (this != &trabo) { - m_boundValues = trabo.m_boundValues; - m_kappa = trabo.m_kappa; - m_delta = trabo.m_delta; - } - return *this; -} bool Trk::RotatedTrapezoidBounds::operator==(const Trk::SurfaceBounds& sbo) const diff --git a/Tracking/TrkDetDescr/TrkSurfaces/src/StraightLineSurface.cxx b/Tracking/TrkDetDescr/TrkSurfaces/src/StraightLineSurface.cxx index c4197ffd073e7b5667e4ab342f8ba7aa9056757c..a6107d958f2aabb2ae81023ec2b4f6794ae38520 100644 --- a/Tracking/TrkDetDescr/TrkSurfaces/src/StraightLineSurface.cxx +++ b/Tracking/TrkDetDescr/TrkSurfaces/src/StraightLineSurface.cxx @@ -68,8 +68,6 @@ Trk::StraightLineSurface::StraightLineSurface(const StraightLineSurface& csf, co , m_bounds(csf.m_bounds) {} -// destructor (will call destructor from base class which deletes objects) -Trk::StraightLineSurface::~StraightLineSurface() = default; // assignment operator Trk::StraightLineSurface& diff --git a/Tracking/TrkDetDescr/TrkSurfaces/src/TrapezoidBounds.cxx b/Tracking/TrkDetDescr/TrkSurfaces/src/TrapezoidBounds.cxx index 9ecc1710caa2e856b53b31daab9162b39968c69e..7139f6532cbfe19ed99f8e4eef28894d11b2d7d4 100644 --- a/Tracking/TrkDetDescr/TrkSurfaces/src/TrapezoidBounds.cxx +++ b/Tracking/TrkDetDescr/TrkSurfaces/src/TrapezoidBounds.cxx @@ -48,27 +48,7 @@ Trk::TrapezoidBounds::TrapezoidBounds(double minhalex, double haley, double alph m_boundValues[TrapezoidBounds::bv_halfY] = fabs(haley); } -// copy constructor -Trk::TrapezoidBounds::TrapezoidBounds(const TrapezoidBounds& trabo) - : Trk::SurfaceBounds() - , m_boundValues(trabo.m_boundValues) - , m_alpha(trabo.m_alpha) - , m_beta(trabo.m_beta) -{} - -// destructor -Trk::TrapezoidBounds::~TrapezoidBounds() = default; -Trk::TrapezoidBounds& -Trk::TrapezoidBounds::operator=(const TrapezoidBounds& trabo) -{ - if (this != &trabo) { - m_boundValues = trabo.m_boundValues; - m_alpha = trabo.m_alpha; - m_beta = trabo.m_beta; - } - return *this; -} bool Trk::TrapezoidBounds::operator==(const Trk::SurfaceBounds& sbo) const diff --git a/Tracking/TrkDetDescr/TrkSurfaces/src/TriangleBounds.cxx b/Tracking/TrkDetDescr/TrkSurfaces/src/TriangleBounds.cxx index a61de0eb6bf6ada66d7bd99ce720c18bb9403d6e..ad7e73879e93697db04d940adf8340e698d04e01 100644 --- a/Tracking/TrkDetDescr/TrkSurfaces/src/TriangleBounds.cxx +++ b/Tracking/TrkDetDescr/TrkSurfaces/src/TriangleBounds.cxx @@ -59,23 +59,6 @@ Trk::TriangleBounds::TriangleBounds(const Amg::Vector2D& p1, const Amg::Vector2D m_boundValues[TriangleBounds::bv_y3] = p3.y(); } -// copy constructor -Trk::TriangleBounds::TriangleBounds(const TriangleBounds& tribo) - : Trk::SurfaceBounds() - , m_boundValues(tribo.m_boundValues) -{} - -// destructor -Trk::TriangleBounds::~TriangleBounds() = default; - -Trk::TriangleBounds& -Trk::TriangleBounds::operator=(const TriangleBounds& tribo) -{ - if (this != &tribo) - m_boundValues = tribo.m_boundValues; - return *this; -} - bool Trk::TriangleBounds::operator==(const Trk::SurfaceBounds& sbo) const {