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  typedef T Scalar;
13 
14  ~RKCylindricalDistance() override {}
15 
16  Scalar operator()(const Vector& a, const Vector& b, const Scalar& rho) const override {
17  CylindricalState astate(rho, a, 1.);
18  CylindricalState bstate(rho, b, 1.);
19  return (astate.position() - bstate.position()).mag() +
20  (astate.momentum() - bstate.momentum()).mag() / bstate.momentum().mag();
21  }
22 };
23 
24 #endif
const LocalPoint position() const
ROOT::Math::SVector< T, N > RKSmallVector
Definition: RKSmallVector.h:13
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
RKSmallVector< T, N > Vector
T mag() const
Definition: PV3DBase.h:64
#define dso_internal
Definition: Visibility.h:13
double b
Definition: hdecay.h:118
double a
Definition: hdecay.h:119
const LocalVector momentum() const
long double T
Scalar operator()(const Vector &a, const Vector &b, const Scalar &rho) const override