CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
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