Skip to content
Snippets Groups Projects
Commit 7280b9e1 authored by Christos Anastopoulos's avatar Christos Anastopoulos
Browse files

Tracking add final where possible/applicable part 2

parent 3ce7b066
No related branches found
No related tags found
No related merge requests found
Showing
with 45 additions and 34 deletions
......@@ -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; }
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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,
......
......@@ -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,
......
......@@ -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;
......
......@@ -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;
......
......@@ -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
......
......@@ -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;
......
......@@ -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
......
......@@ -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;
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment