diff --git a/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/ConeSurface.h b/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/ConeSurface.h index 23d711589b1811c96e1c580b8c1bc8697895d366..3e4098af45c61445c4de9adeeb24f35ae3618bbe 100644 --- a/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/ConeSurface.h +++ b/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/ConeSurface.h @@ -46,6 +46,9 @@ class ConeSurface : public Surface { public: + /** The surface type static constexpr */ + static constexpr SurfaceType staticType = Surface::Cone; + /**Default Constructor*/ ConeSurface(); @@ -142,9 +145,6 @@ public: /** Return the surface type */ virtual SurfaceType type() const override final; - /** Return the surface type static constexpr */ - static constexpr SurfaceType staticType() ; - /** Return the measurement frame - this is needed for alignment, in particular for StraightLine and Perigee Surface - the default implementation is the the RotationMatrix3D of the transform */ diff --git a/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/ConeSurface.icc b/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/ConeSurface.icc index 442da77d2e7be7e8ffc1d47c652cdac99c766eae..140bd00c53143def72ec5ac24cfd5fde7a816274 100644 --- a/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/ConeSurface.icc +++ b/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/ConeSurface.icc @@ -8,14 +8,7 @@ namespace Trk { inline Surface::SurfaceType ConeSurface::type() const { - return Surface::Cone; -} - -/** Return the surface type static constexpr */ -inline constexpr Surface::SurfaceType -ConeSurface::staticType() -{ - return Surface::Cone; + return ConeSurface::staticType; } /** Use the Surface as a ParametersBase constructor, from local parameters - diff --git a/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/CylinderSurface.h b/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/CylinderSurface.h index 8ddd5bb0d8afa02b43cda96b8973894742b26c46..7ddd1d4d2738fb357391697a2ddd7e011087050d 100644 --- a/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/CylinderSurface.h +++ b/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/CylinderSurface.h @@ -51,6 +51,9 @@ class CylinderSurface : public Surface { public: + /** The surface type static constexpr */ + static constexpr SurfaceType staticType = Surface::Cylinder; + /**Default Constructor*/ CylinderSurface(); @@ -167,10 +170,7 @@ public: /** Return the surface type */ virtual SurfaceType type() const override final; - /** Return the surface type static constexpr */ - static constexpr SurfaceType staticType() ; - - /** Returns a global reference point: + /** Returns a global reference point: For the Cylinder this is @f$ (R*cos(\phi), R*sin(\phi),0)*transform() @f$ Where @f$ \phi @f$ denotes the averagePhi() of the cylinderBounds. */ diff --git a/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/CylinderSurface.icc b/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/CylinderSurface.icc index 70d71810390fe3e598bd18d6bb49d73214031bf4..66eeb816c8a4e8756eb5d8a25e3f61e4bfa17fed 100644 --- a/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/CylinderSurface.icc +++ b/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/CylinderSurface.icc @@ -8,15 +8,9 @@ namespace Trk { inline Surface::SurfaceType CylinderSurface::type() const { - return Surface::Cylinder; + return CylinderSurface::staticType; } -/** Return the surface type static constexpr */ -inline constexpr Surface::SurfaceType -CylinderSurface::staticType() -{ - return Surface::Cylinder; -} /** Use the Surface as a ParametersBase constructor, from local parameters - diff --git a/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/DiscSurface.h b/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/DiscSurface.h index 42d683b16de5fe97ef92031d3d6e82e6fca6a3f4..4c42a89311fb69818b3ce9770c782bd083b38825 100644 --- a/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/DiscSurface.h +++ b/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/DiscSurface.h @@ -48,6 +48,7 @@ class DiscSurface : public Surface { public: + static constexpr SurfaceType staticType = Surface::Disc; /**Default Constructor*/ DiscSurface(); @@ -162,10 +163,7 @@ public: /** Return the surface type */ virtual SurfaceType type() const override final; - /** Return the surface type */ - static constexpr SurfaceType staticType(); - - /** Returns a global reference point: + /** Returns a global reference point: For the Disc this is @f$ (R*cos(\phi), R*sin(\phi),0)*transform() @f$ Where @f$ r, \phi @f$ denote the r(), averagePhi() of the Bounds. */ diff --git a/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/DiscSurface.icc b/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/DiscSurface.icc index 8449298c6fd695f46e142e672a674354f5757575..b20240a2e5e59f9bff6e573cff454bf8b7c09fab 100644 --- a/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/DiscSurface.icc +++ b/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/DiscSurface.icc @@ -7,14 +7,7 @@ namespace Trk { inline Surface::SurfaceType DiscSurface::type() const { - return Surface::Disc; -} - -/** Return the surface type static constexpr */ -inline constexpr Surface::SurfaceType -DiscSurface::staticType() -{ - return Surface::Disc; + return DiscSurface::staticType; } /* Use the Surface as a ParametersBase constructor, from local parameters - diff --git a/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/PerigeeSurface.h b/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/PerigeeSurface.h index 0c74ae462332c0f7b4760adeeb7a543e91bee786..89463c2c30f5436edf232458c0c85c65016ae081 100644 --- a/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/PerigeeSurface.h +++ b/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/PerigeeSurface.h @@ -40,6 +40,9 @@ class PerigeeSurface : public Surface { public: + /** The surface type static constexpr */ + static constexpr SurfaceType staticType = Surface::Perigee; + /**Default Constructor - needed for persistency*/ PerigeeSurface(); @@ -128,10 +131,6 @@ public: /** Return the surface type */ virtual SurfaceType type() const override final; - /** Return the surface type static constexpr */ - static constexpr SurfaceType staticType() ; - - /**Return method for transfromation, overwrites the transform() form base * class*/ virtual const Amg::Transform3D& transform() const override; diff --git a/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/PerigeeSurface.icc b/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/PerigeeSurface.icc index 1ec96a413a9d52b098cbc4e2136020c38f6b5e93..b77ef81b8d5bbe1bffdbbc534c2bb064f9b76d77 100644 --- a/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/PerigeeSurface.icc +++ b/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/PerigeeSurface.icc @@ -85,14 +85,7 @@ PerigeeSurface::createParameters(const Amg::Vector3D& position, inline Surface::SurfaceType PerigeeSurface::type() const { - return Surface::Perigee; -} - -/** Return the surface type static constexpr */ -inline constexpr Surface::SurfaceType -PerigeeSurface::staticType() -{ - return Surface::Perigee; + return PerigeeSurface::staticType; } inline PerigeeSurface* diff --git a/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/PlaneSurface.h b/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/PlaneSurface.h index 917177da3dfa45c6661a020e9950f3f571d9dd5f..2bd1c76c467b511ed4e5cbe15931031083065d87 100644 --- a/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/PlaneSurface.h +++ b/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/PlaneSurface.h @@ -59,6 +59,10 @@ class ParametersT; class PlaneSurface : public Surface { public: + + /** The surface type static constexpr */ + static constexpr SurfaceType staticType = Surface::Plane; + /** Default Constructor - needed for persistency*/ PlaneSurface(); @@ -143,9 +147,6 @@ public: /** Return the surface type */ virtual SurfaceType type() const override final; - /** Return the surface type static constexpr */ - static constexpr SurfaceType staticType() ; - /** Use the Surface as a ParametersBase constructor, from local parameters - * charged */ virtual ParametersT<5, Charged, PlaneSurface>* createTrackParameters( diff --git a/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/PlaneSurface.icc b/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/PlaneSurface.icc index 5c6de97bc6c203d74dc69f0a9f3aacd635c111c2..c93b4bfd659324b9acce7a1073fded282b0f51dd 100644 --- a/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/PlaneSurface.icc +++ b/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/PlaneSurface.icc @@ -7,14 +7,7 @@ namespace Trk { inline Surface::SurfaceType PlaneSurface::type() const { - return Surface::Plane; -} - -/** Return the surface type static constexpr */ -inline constexpr Surface::SurfaceType -PlaneSurface::staticType() -{ - return Surface::Plane; + return PlaneSurface::staticType; } /** Use the Surface as a ParametersBase constructor, from local parameters - diff --git a/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/StraightLineSurface.h b/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/StraightLineSurface.h index 84ccf2153c683d83bfda45928aeb0f55739f6b02..1a24cf335da35d14b8c78c708298464bd120dbdf 100644 --- a/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/StraightLineSurface.h +++ b/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/StraightLineSurface.h @@ -45,6 +45,7 @@ class StraightLineSurface : public Surface { public: + static constexpr SurfaceType staticType = Surface::Line; /**Default Constructor - needed for persistency*/ StraightLineSurface(); @@ -145,8 +146,6 @@ public: /** Return the surface type */ virtual SurfaceType type() const override final; - /** Return the surface type static constexpr */ - static constexpr SurfaceType staticType() ; /** Specified for StraightLineSurface: LocalToGlobal method without dynamic * memory allocation */ diff --git a/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/StraightLineSurface.icc b/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/StraightLineSurface.icc index 7887b07f5c41cf6146653177d4f90cbef08bef92..a148487d6f5e55c7a33d01e8107ef0e0e07ace59 100644 --- a/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/StraightLineSurface.icc +++ b/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/StraightLineSurface.icc @@ -7,14 +7,7 @@ namespace Trk { inline Surface::SurfaceType StraightLineSurface::type() const { - return Surface::Line; -} - -/** Return the surface type static constexpr */ -inline constexpr Surface::SurfaceType -StraightLineSurface::staticType() -{ - return Surface::Line; + return StraightLineSurface::staticType; } /** Use the Surface as a ParametersBase constructor, from local parameters - diff --git a/Tracking/TrkEvent/TrkParametersBase/TrkParametersBase/CurvilinearParametersT.icc b/Tracking/TrkEvent/TrkParametersBase/TrkParametersBase/CurvilinearParametersT.icc index ca7c8b4c262b2894a877071f57a86545f1a940eb..5fb9b4e780b5d6d6e435963f5587ca933e8f81eb 100644 --- a/Tracking/TrkEvent/TrkParametersBase/TrkParametersBase/CurvilinearParametersT.icc +++ b/Tracking/TrkEvent/TrkParametersBase/TrkParametersBase/CurvilinearParametersT.icc @@ -254,7 +254,7 @@ template<int DIM, class T, class S> int CurvilinearParametersT<DIM, T, S>::surfaceType() const { - return S::staticType(); + return S::staticType; } diff --git a/Tracking/TrkEvent/TrkParametersBase/TrkParametersBase/ParametersT.icc b/Tracking/TrkEvent/TrkParametersBase/TrkParametersBase/ParametersT.icc index a67a3a5665aa101691c28b7d639ada27654858cf..cc6c53d923b105cb60628693d11647438049d769 100644 --- a/Tracking/TrkEvent/TrkParametersBase/TrkParametersBase/ParametersT.icc +++ b/Tracking/TrkEvent/TrkParametersBase/TrkParametersBase/ParametersT.icc @@ -260,7 +260,7 @@ template<int DIM, class T, class S> int ParametersT<DIM, T, S>::surfaceType() const { - return S::staticType(); + return S::staticType; } // return the measurementFrame @@ -288,10 +288,8 @@ ParametersT<DIM, T, S>::updateParametersHelper(const AmgVector(DIM) & (updatedParameters[Trk::theta] != m_parameters[Trk::theta]) || (updatedParameters[qOverP] != m_parameters[qOverP]); - if constexpr ( - S::staticType() == Trk::Surface::Line || - S::staticType() == Trk::Surface::Perigee - ) { + if constexpr (S::staticType == Trk::Surface::Line || + S::staticType == Trk::Surface::Perigee) { updatePosition |= updateMomentum; }