CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions
RKCylindricalDistance< T, N > Class Template Referencefinal

#include <RKCylindricalDistance.h>

Inheritance diagram for RKCylindricalDistance< T, N >:
RKDistance< T, N >

Public Types

typedef T Scalar
 
typedef RKSmallVector< T, NVector
 
- Public Types inherited from RKDistance< T, N >
typedef T Scalar
 
typedef RKSmallVector< T, NVector
 

Public Member Functions

Scalar operator() (const Vector &a, const Vector &b, const Scalar &rho) const override
 
 ~RKCylindricalDistance () override
 
- Public Member Functions inherited from RKDistance< T, N >
virtual ~RKDistance ()
 

Detailed Description

template<typename T, int N>
class RKCylindricalDistance< T, N >

Definition at line 10 of file RKCylindricalDistance.h.

Member Typedef Documentation

◆ Scalar

template<typename T, int N>
typedef T RKCylindricalDistance< T, N >::Scalar

Definition at line 12 of file RKCylindricalDistance.h.

◆ Vector

template<typename T, int N>
typedef RKSmallVector<T, N> RKCylindricalDistance< T, N >::Vector

Definition at line 13 of file RKCylindricalDistance.h.

Constructor & Destructor Documentation

◆ ~RKCylindricalDistance()

template<typename T, int N>
RKCylindricalDistance< T, N >::~RKCylindricalDistance ( )
inlineoverride

Definition at line 15 of file RKCylindricalDistance.h.

15 {}

Member Function Documentation

◆ operator()()

template<typename T, int N>
Scalar RKCylindricalDistance< T, N >::operator() ( const Vector a,
const Vector b,
const Scalar rho 
) const
inlineoverridevirtual

Implements RKDistance< T, N >.

Definition at line 17 of file RKCylindricalDistance.h.

References a, b, PV3DBase< T, PVType, FrameType >::mag(), mag(), CylindricalState::momentum(), CylindricalState::position(), and rho.

17  {
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  }
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
double b
Definition: hdecay.h:118
double a
Definition: hdecay.h:119