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

◆ Scalar

Definition at line 16 of file RKCartesianDistance.h.

◆ Vector

Definition at line 17 of file RKCartesianDistance.h.

Constructor & Destructor Documentation

◆ ~RKCartesianDistance()

RKCartesianDistance::~RKCartesianDistance ( )
inlineoverride

Definition at line 19 of file RKCartesianDistance.h.

19 {}

Member Function Documentation

◆ operator()()

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

Definition at line 21 of file RKCartesianDistance.h.

21  {
22  CartesianStateAdaptor a(rka), b(rkb);
23 
24  return (a.position() - b.position()).mag() + (a.momentum() - b.momentum()).mag() / b.momentum().mag();
25  }

References a, b, and mag().

b
double b
Definition: hdecay.h:118
a
double a
Definition: hdecay.h:119
CartesianStateAdaptor
Definition: CartesianStateAdaptor.h:8
mag
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
Definition: Basic3DVectorLD.h:127