CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
RKCylindricalDistance.h
Go to the documentation of this file.
1 #ifndef RKCylindricalDistance_H
2 #define RKCylindricalDistance_H
3 
5 #include "RKDistance.h"
6 #include "RKSmallVector.h"
7 #include "CylindricalState.h"
8 
9 template <typename T, int N>
11 public:
12 
13  typedef T Scalar;
15 
17 
18  virtual Scalar operator()( const Vector& a, const Vector& b, const Scalar& rho) const {
19  CylindricalState astate(rho,a,1.);
20  CylindricalState bstate(rho,b,1.);
21  return (astate.position()-bstate.position()).mag() +
22  (astate.momentum()-bstate.momentum()).mag() / bstate.momentum().mag();
23  }
24 
25 };
26 
27 #endif
const LocalPoint position() const
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
Definition: DDAxes.h:10
T mag() const
Definition: PV3DBase.h:66
#define dso_internal
Definition: Visibility.h:13
virtual Scalar operator()(const Vector &a, const Vector &b, const Scalar &rho) const
RKSmallVector< T, N > Vector
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121
const LocalVector momentum() const
long double T