CMS 3D CMS Logo

RKCylindricalDistance.h
Go to the documentation of this file.
1 #ifndef RKCylindricalDistance_H
2 #define RKCylindricalDistance_H
3 
4 #include "RKDistance.h"
5 #include "RKSmallVector.h"
6 #include "CylindricalState.h"
7 
8 template <typename T, int N>
9 class dso_internal RKCylindricalDistance final : public RKDistance<T,N> {
10 public:
11 
12  typedef T Scalar;
14 
16 
17  virtual Scalar operator()( const Vector& a, const Vector& b, const Scalar& rho) const {
18  CylindricalState astate(rho,a,1.);
19  CylindricalState bstate(rho,b,1.);
20  return (astate.position()-bstate.position()).mag() +
21  (astate.momentum()-bstate.momentum()).mag() / bstate.momentum().mag();
22  }
23 
24 };
25 
26 #endif
const LocalPoint position() const
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
ROOT::Math::SVector< T, N > RKSmallVector
Definition: RKSmallVector.h:13
T mag() const
Definition: PV3DBase.h:67
virtual Scalar operator()(const Vector &a, const Vector &b, const Scalar &rho) const
RKSmallVector< T, N > Vector
double b
Definition: hdecay.h:120
#define dso_internal
double a
Definition: hdecay.h:121
const LocalVector momentum() const
long double T