diff --git a/Tracking/TrkDetDescr/TrkDetDescrUtils/TrkDetDescrUtils/BinUtility.h b/Tracking/TrkDetDescr/TrkDetDescrUtils/TrkDetDescrUtils/BinUtility.h index 8e9d6e5f64455b4252e4171663a80222f90aed9c..748ebb573085bb5252067b855d57128000e31cf4 100644 --- a/Tracking/TrkDetDescr/TrkDetDescrUtils/TrkDetDescrUtils/BinUtility.h +++ b/Tracking/TrkDetDescr/TrkDetDescrUtils/TrkDetDescrUtils/BinUtility.h @@ -35,7 +35,7 @@ namespace Trk { @author Andreas.Salzburger@cern.ch */ -class BinUtility +class BinUtility final { public: @@ -123,11 +123,11 @@ public: return (*this); } - /** Virtual Destructor */ - virtual ~BinUtility() {} + /** Destructor */ + ~BinUtility() {} /** Implizit Constructor */ - virtual BinUtility* clone() const { return new BinUtility(*this); } + BinUtility* clone() const { return new BinUtility(*this); } /** return the binning data */ const std::vector<BinningData>& binningData() const { return m_binningData; } diff --git a/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/AnnulusBounds.h b/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/AnnulusBounds.h index 26bb21aedeca83ac965d36454cbeb142c00f003c..65e7b4ba24d32ddf115133ccdb66dcefc11ab00e 100644 --- a/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/AnnulusBounds.h +++ b/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/AnnulusBounds.h @@ -128,24 +128,24 @@ public: <br> where @f$ \kappa_{I} = - \kappa_{II} = 2 \frac{y_{H}}{x_{max} - x_{min}} @f$ <br> and @f$ \delta_{I} = \delta_{II} = - \frac{1}{2}\kappa_{I}(x_{max} + x_{min}) @f$ */ - virtual bool inside(const Amg::Vector2D& locpo, double tol1 = 0., double tol2 = 0.) const override; - virtual bool inside(const Amg::Vector2D& locpo, const BoundaryCheck& bchk) const override; + virtual bool inside(const Amg::Vector2D& locpo, double tol1 = 0., double tol2 = 0.) const override final; + virtual bool inside(const Amg::Vector2D& locpo, const BoundaryCheck& bchk) const override final; /** This method checks inside bounds in loc1 - loc1/loc2 correspond to the natural coordinates of the surface - As loc1/loc2 are correlated the single check doesn't make sense : -> check is done on enclosing Rectangle ! */ - virtual bool insideLoc1(const Amg::Vector2D& locpo, double tol1 = 0.) const override; + virtual bool insideLoc1(const Amg::Vector2D& locpo, double tol1 = 0.) const override final; /** This method checks inside bounds in loc2 - loc1/loc2 correspond to the natural coordinates of the surface - As loc1/loc2 are correlated the single check doesn't make sense : -> check is done on enclosing Rectangle ! */ - virtual bool insideLoc2(const Amg::Vector2D& locpo, double tol2 = 0.) const override; + virtual bool insideLoc2(const Amg::Vector2D& locpo, double tol2 = 0.) const override final; /** Minimal distance to boundary ( > 0 if outside and <=0 if inside) */ - virtual double minDistance(const Amg::Vector2D& pos) const override; + virtual double minDistance(const Amg::Vector2D& pos) const override final; /** Output Method for MsgStream*/ virtual MsgStream& dump(MsgStream& sl) const override; diff --git a/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/ConeBounds.h b/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/ConeBounds.h index b83ea854ec34e1310a55c2196bb717b5a86abdcf..f31f39431d448d177401a4ea18da1b294bcf8b91 100644 --- a/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/ConeBounds.h +++ b/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/ConeBounds.h @@ -84,21 +84,21 @@ public: virtual BoundsType type() const override { return SurfaceBounds::Cone; } /**This method checks if a LocalPosition is inside z bounds and rphi value- interface method */ - virtual bool inside(const Amg::Vector2D& locpo, double tol1, double tol2) const override; - virtual bool inside(const Amg::Vector2D& locpo, const BoundaryCheck& bchk = true) const override; + virtual bool inside(const Amg::Vector2D& locpo, double tol1, double tol2) const override final; + virtual bool inside(const Amg::Vector2D& locpo, const BoundaryCheck& bchk = true) const override final; /**This method checks if a GlobalPosition is inside the Cylinder - not an interface method, assumes that GlobalPosition is in the right frame*/ - virtual bool inside(const Amg::Vector3D& gp, double tol1 = 0., double tol2 = 0.) const; - virtual bool inside(const Amg::Vector3D& locpo, const BoundaryCheck& bchk) const; + virtual bool inside(const Amg::Vector3D& gp, double tol1 = 0., double tol2 = 0.) const final; + virtual bool inside(const Amg::Vector3D& locpo, const BoundaryCheck& bchk) const final; /** This method checks inside bounds in loc1 - loc1/loc2 correspond to the natural coordinates of the surface */ - virtual bool insideLoc1(const Amg::Vector2D& locpo, double tol1 = 0.) const override; + virtual bool insideLoc1(const Amg::Vector2D& locpo, double tol1 = 0.) const override final; /** This method checks inside bounds in loc1 - loc1/loc2 correspond to the natural coordinates of the surface */ - virtual bool insideLoc2(const Amg::Vector2D& locpo, double tol2 = 0.) const override; + virtual bool insideLoc2(const Amg::Vector2D& locpo, double tol2 = 0.) const override final; /** Minimal distance to boundary ( > 0 if outside and <=0 if inside) */ virtual double minDistance(const Amg::Vector2D& pos) const override; diff --git a/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/CylinderSurface.h b/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/CylinderSurface.h index 7ddd1d4d2738fb357391697a2ddd7e011087050d..8c9cf5a353e0926deb5eaefc75c1b745e59d6cb8 100644 --- a/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/CylinderSurface.h +++ b/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/CylinderSurface.h @@ -191,7 +191,7 @@ public: /**This method returns the CylinderBounds by reference (NoBounds is not possible for cylinder)*/ - virtual const CylinderBounds& bounds() const override; + virtual const CylinderBounds& bounds() const override final; bool hasBounds() const; diff --git a/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/DiscSurface.h b/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/DiscSurface.h index ea90f5c6f94208571f86022b593470f6db08615e..67830a4e4a25b93a5e95b317c03de36719983765 100644 --- a/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/DiscSurface.h +++ b/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/DiscSurface.h @@ -170,7 +170,7 @@ public: virtual const Amg::Vector3D& globalReferencePoint() const override final; /**This method returns the bounds by reference*/ - const SurfaceBounds& bounds() const override; + const SurfaceBounds& bounds() const override final; /**This method calls the inside method of the bounds*/ virtual bool insideBounds(const Amg::Vector2D& locpos, diff --git a/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/PlaneSurface.h b/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/PlaneSurface.h index 345d1099b7db13155f711ef18165f241cfcac123..3ccd6cf2d7e752f5cb764d6a04ec777409074c2a 100644 --- a/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/PlaneSurface.h +++ b/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/PlaneSurface.h @@ -203,7 +203,7 @@ public: /**This method returns the bounds by reference, static NoBounds in case of no * boundaries*/ - virtual const SurfaceBounds& bounds() const override; + virtual const SurfaceBounds& bounds() const override final; /**This method calls the inside() method of the Bounds*/ virtual bool insideBounds(const Amg::Vector2D& locpos, diff --git a/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h b/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h index 90f8916be5f0ccd68e3eb20a6e974ede6c9ed612..757c7b73691b2b9fe8323e1d6924f27ea0497aee 100644 --- a/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h +++ b/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h @@ -130,7 +130,7 @@ public: virtual bool operator==(const Surface& sf) const = 0; /**Non-equality operator*/ - virtual bool operator!=(const Surface& sf) const; + bool operator!=(const Surface& sf) const ; /**Implicit constructor - uses the copy constructor */ virtual Surface* clone() const = 0; diff --git a/Tracking/TrkEvent/TrkParametersBase/TrkParametersBase/CurvilinearParametersT.h b/Tracking/TrkEvent/TrkParametersBase/TrkParametersBase/CurvilinearParametersT.h index 39fae85d410e833b544ac7fc97e2cf467de07060..e363d9a6741bde5ebb82173a905d9fbe68606543 100644 --- a/Tracking/TrkEvent/TrkParametersBase/TrkParametersBase/CurvilinearParametersT.h +++ b/Tracking/TrkEvent/TrkParametersBase/TrkParametersBase/CurvilinearParametersT.h @@ -96,13 +96,15 @@ public: void setcIdentifier(unsigned int cIdentifier); + /** Returns the charge */ + virtual double charge() const override final; + /** Access method for the position */ virtual const Amg::Vector3D& position() const override final; /** Access method for the momentum */ virtual const Amg::Vector3D& momentum() const override final; - /** Test to see if there's a surface there. */ virtual bool hasSurface() const override final; @@ -143,8 +145,8 @@ protected: using ParametersBase<DIM, T>::m_parameters; using ParametersBase<DIM, T>::m_covariance; using ParametersBase<DIM, T>::m_chargeDef; - Amg::Vector3D m_position; //!< point on track - Amg::Vector3D m_momentum; //!< momentum at this point on track + Amg::Vector3D m_position; //!< point on track + Amg::Vector3D m_momentum; //!< momentum at this point on track SurfaceUniquePtrT<const S> m_surface; //!< surface template /** the curvilinear parameters identifier */ unsigned int m_cIdentifier = 0; diff --git a/Tracking/TrkEvent/TrkParametersBase/TrkParametersBase/CurvilinearParametersT.icc b/Tracking/TrkEvent/TrkParametersBase/TrkParametersBase/CurvilinearParametersT.icc index acb1250dc09c82529cd69d2dbaa6325d2bdc9c8c..c7a2aaa58c08c22e93084443fba894fb8317ae24 100644 --- a/Tracking/TrkEvent/TrkParametersBase/TrkParametersBase/CurvilinearParametersT.icc +++ b/Tracking/TrkEvent/TrkParametersBase/TrkParametersBase/CurvilinearParametersT.icc @@ -116,9 +116,7 @@ CurvilinearParametersT<DIM, T, S>::CurvilinearParametersT( template<int DIM, class T, class S> CurvilinearParametersT<DIM, T, S>::CurvilinearParametersT( const CurvilinearParametersT<DIM, T, S>& rhs) - : ParametersBase<DIM, T>(rhs.parameters(), - nullptr, - rhs.charge()) + : ParametersBase<DIM, T>(rhs.parameters(), nullptr, rhs.charge()) , m_position(rhs.position()) , m_momentum(rhs.momentum()) @@ -169,6 +167,13 @@ CurvilinearParametersT<DIM, T, S>::setcIdentifier(unsigned int cIdentifier) m_cIdentifier = cIdentifier; } +template<int DIM, class T, class S> +double +CurvilinearParametersT<DIM, T, S>::charge() const +{ + return m_chargeDef.charge(); +} + template<int DIM, class T, class S> const Amg::Vector3D& CurvilinearParametersT<DIM, T, S>::position() const diff --git a/Tracking/TrkEvent/TrkParametersBase/TrkParametersBase/ParametersBase.h b/Tracking/TrkEvent/TrkParametersBase/TrkParametersBase/ParametersBase.h index 7de00bea332196c4d95cd5e01aebaf4c43c02101..59f6816e1f42ff77492220e7bc5f63a0c10c064b 100644 --- a/Tracking/TrkEvent/TrkParametersBase/TrkParametersBase/ParametersBase.h +++ b/Tracking/TrkEvent/TrkParametersBase/TrkParametersBase/ParametersBase.h @@ -112,9 +112,9 @@ public: * implementation via updateParametersHelper */ void updateParameters(const AmgVector(DIM) &, const AmgSymMatrix(DIM) &); - /** Returns the charge - * */ - virtual double charge() const; + + /** Returns the charge */ + virtual double charge() const = 0; /** Access method for the position */ virtual const Amg::Vector3D& position() const = 0; diff --git a/Tracking/TrkEvent/TrkParametersBase/TrkParametersBase/ParametersBase.icc b/Tracking/TrkEvent/TrkParametersBase/TrkParametersBase/ParametersBase.icc index 9830476ac8243954690e46c605bffc53ca21d436..9521d9e9b3535aad263d2a6558e51a9d9e310689 100644 --- a/Tracking/TrkEvent/TrkParametersBase/TrkParametersBase/ParametersBase.icc +++ b/Tracking/TrkEvent/TrkParametersBase/TrkParametersBase/ParametersBase.icc @@ -89,12 +89,6 @@ ParametersBase<DIM, T>::isCharged() const } } -template<int DIM, class T> -double -ParametersBase<DIM, T>::charge() const -{ - return m_chargeDef.charge(); -} template<int DIM, class T> Amg::Vector2D diff --git a/Tracking/TrkEvent/TrkParametersBase/TrkParametersBase/ParametersT.h b/Tracking/TrkEvent/TrkParametersBase/TrkParametersBase/ParametersT.h index 89558075417698375401edf8eaf7f94acc2efb4d..19b38245dfae88af6bce46134e4089fa0bc78c3b 100644 --- a/Tracking/TrkEvent/TrkParametersBase/TrkParametersBase/ParametersT.h +++ b/Tracking/TrkEvent/TrkParametersBase/TrkParametersBase/ParametersT.h @@ -108,6 +108,9 @@ public: //** Destructor */ virtual ~ParametersT() = default; + /** Returns the charge */ + virtual double charge() const override final; + /** Access method for the position */ virtual const Amg::Vector3D& position() const override final; diff --git a/Tracking/TrkEvent/TrkParametersBase/TrkParametersBase/ParametersT.icc b/Tracking/TrkEvent/TrkParametersBase/TrkParametersBase/ParametersT.icc index 3a224c1f5b674603b29db9352c25f24f0074f6d7..d9a8fbed89285a3852a11273b2b4dcb24f215b31 100644 --- a/Tracking/TrkEvent/TrkParametersBase/TrkParametersBase/ParametersT.icc +++ b/Tracking/TrkEvent/TrkParametersBase/TrkParametersBase/ParametersT.icc @@ -193,6 +193,13 @@ ParametersT<DIM, T, S>::operator=(const ParametersT<DIM, T, S>& rhs) return *this; } +template<int DIM, class T, class S> +double +ParametersT<DIM, T, S>::charge() const +{ + return m_chargeDef.charge(); +} + template<int DIM, class T, class S> const Amg::Vector3D& ParametersT<DIM, T, S>::position() const