CMS 3D CMS Logo

RKCylindricalDistance.h
Go to the documentation of this file.
1 #ifndef RKCylindricalDistance_H
2 #define RKCylindricalDistance_H
4 
5 #include "RKDistance.h"
6 #include "RKSmallVector.h"
7 #include "CylindricalState.h"
8 
9 template <typename T, int N>
10 class dso_internal RKCylindricalDistance final : public RKDistance<T, N> {
11 public:
12  typedef T Scalar;
14 
15  ~RKCylindricalDistance() override {}
16 
17  Scalar operator()(const Vector& a, const Vector& b, const Scalar& rho) const override {
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 #endif
ROOT::Math::SVector< T, N > RKSmallVector
Definition: RKSmallVector.h:13
RKSmallVector< T, N > Vector
const LocalPoint position() const
T mag() const
Definition: PV3DBase.h:64
#define dso_internal
Definition: Visibility.h:13
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
double b
Definition: hdecay.h:120
const LocalVector momentum() const
double a
Definition: hdecay.h:121
long double T
Scalar operator()(const Vector &a, const Vector &b, const Scalar &rho) const override