CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions
RKCurvilinearDistance< T, N > Class Template Reference

#include <RKCurvilinearDistance.h>

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

Public Types

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

Public Member Functions

Basic3DVector< Scalarmomentum (const Vector &v) const
 
virtual Scalar operator() (const Vector &a, const Vector &b, const Scalar &s) const
 
T sqr (const T &t) const
 
virtual ~RKCurvilinearDistance ()
 
- Public Member Functions inherited from RKDistance< T, N >
virtual ~RKDistance ()
 

Detailed Description

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

Definition at line 8 of file RKCurvilinearDistance.h.

Member Typedef Documentation

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

Definition at line 11 of file RKCurvilinearDistance.h.

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

Definition at line 12 of file RKCurvilinearDistance.h.

Constructor & Destructor Documentation

template<typename T, int N>
virtual RKCurvilinearDistance< T, N >::~RKCurvilinearDistance ( )
inlinevirtual

Definition at line 14 of file RKCurvilinearDistance.h.

14 {}

Member Function Documentation

template<typename T, int N>
Basic3DVector<Scalar> RKCurvilinearDistance< T, N >::momentum ( const Vector v) const
inline

Definition at line 23 of file RKCurvilinearDistance.h.

References abs, gen::k, L1TEmulatorMonitor_cff::p, RKCurvilinearDistance< T, N >::sqr(), mathSSE::sqrt(), and v.

Referenced by RKCurvilinearDistance< T, N >::operator()().

23  {
24  Scalar k = sqrt(1 + sqr(v(2)) + sqr(v(3)));
25  Scalar p = std::abs(1 / v(4));
26  Scalar pz = p/k;
27  return Basic3DVector<Scalar>( v(2)*pz, v(3)*pz, pz);
28  }
#define abs(x)
Definition: mlp_lapack.h:159
T sqrt(T t)
Definition: SSEVec.h:28
int k[5][pyjets_maxn]
T sqr(const T &t) const
mathSSE::Vec4< T > v
template<typename T, int N>
virtual Scalar RKCurvilinearDistance< T, N >::operator() ( const Vector a,
const Vector b,
const Scalar s 
) const
inlinevirtual

Implements RKDistance< T, N >.

Definition at line 16 of file RKCurvilinearDistance.h.

References a, b, Basic3DVector< T >::mag(), mag(), RKCurvilinearDistance< T, N >::momentum(), RKCurvilinearDistance< T, N >::sqr(), and mathSSE::sqrt().

16  {
19 
20  return sqrt( sqr(a(0)-b(0)) + sqr(a(1)-b(1))) + (amom - bmom).mag() / bmom.mag();
21  }
Basic3DVector< Scalar > momentum(const Vector &v) const
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
T sqrt(T t)
Definition: SSEVec.h:28
T sqr(const T &t) const
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121
template<typename T, int N>
T RKCurvilinearDistance< T, N >::sqr ( const T t) const
inline