CMS 3D CMS Logo

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

Scalar operator() (const Vector &rka, const Vector &rkb, const Scalar &s) const override
 
 ~RKCartesianDistance () override
 
- 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 14 of file RKCartesianDistance.h.

Member Typedef Documentation

Definition at line 17 of file RKCartesianDistance.h.

Definition at line 18 of file RKCartesianDistance.h.

Constructor & Destructor Documentation

RKCartesianDistance::~RKCartesianDistance ( )
inlineoverride

Definition at line 20 of file RKCartesianDistance.h.

20 {}

Member Function Documentation

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

Definition at line 22 of file RKCartesianDistance.h.

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

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