test
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
RKCartesianDistance Class Referencefinal

Estimator of the distance between two state vectors, e.g. for convergence test. More...

#include <RKCartesianDistance.h>

Inheritance diagram for RKCartesianDistance:
RKDistance< double, 6 >

Public Types

typedef double Scalar
 
typedef RKSmallVector< double, 6 > Vector
 
- Public Types inherited from RKDistance< double, 6 >
typedef double Scalar
 
typedef RKSmallVector< double, NVector
 

Public Member Functions

virtual Scalar operator() (const Vector &rka, const Vector &rkb, const Scalar &s) const
 
virtual ~RKCartesianDistance ()
 
- Public Member Functions inherited from RKDistance< double, 6 >
virtual Scalar operator() (const Vector &a, const Vector &b, const Scalar &s) const =0
 
virtual ~RKDistance ()
 

Detailed Description

Estimator of the distance between two state vectors, e.g. for convergence test.

Definition at line 13 of file RKCartesianDistance.h.

Member Typedef Documentation

Definition at line 16 of file RKCartesianDistance.h.

Definition at line 17 of file RKCartesianDistance.h.

Constructor & Destructor Documentation

virtual RKCartesianDistance::~RKCartesianDistance ( )
inlinevirtual

Definition at line 19 of file RKCartesianDistance.h.

19 {}

Member Function Documentation

virtual Scalar RKCartesianDistance::operator() ( const Vector rka,
const Vector rkb,
const Scalar s 
) const
inlinevirtual

Definition at line 21 of file RKCartesianDistance.h.

References a, b, Basic3DVector< T >::mag(), mag(), CartesianStateAdaptor::momentum(), and CartesianStateAdaptor::position().

21  {
22  CartesianStateAdaptor a(rka), b(rkb);
23 
24  return (a.position()-b.position()).mag() +
25  (a.momentum() - b.momentum()).mag() / b.momentum().mag();
26  }
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121