CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
RKCartesianDistance.h
Go to the documentation of this file.
1 #ifndef RKCartesianDistance_H
2 #define RKCartesianDistance_H
3 
5 #include "RKDistance.h"
6 #include "RKSmallVector.h"
8 
9 #include <cmath>
10 
12 
13 class dso_internal RKCartesianDistance GCC11_FINAL : public RKDistance<double,6> {
14 public:
15 
16  typedef double Scalar;
18 
19  virtual ~RKCartesianDistance() {}
20 
21  virtual Scalar operator()( const Vector& rka, const Vector& rkb, const Scalar& s) const {
22  CartesianStateAdaptor a(rka), b(rkb);
23 
24  return (a.position()-b.position()).mag() +
25  (a.momentum() - b.momentum()).mag() / b.momentum().mag();
26  }
27 
28 };
29 
30 #endif
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
Base::Vector Vector
virtual ~RKCartesianDistance()
ROOT::Math::SVector< T, N > RKSmallVector
Definition: RKSmallVector.h:12
Base::Scalar Scalar
RKSmallVector< double, 6 > Vector
const Vector3D & momentum() const
#define dso_internal
Definition: Visibility.h:13
double b
Definition: hdecay.h:120
virtual Scalar operator()(const Vector &rka, const Vector &rkb, const Scalar &s) const
double a
Definition: hdecay.h:121
const Vector3D & position() const
Unlimited (trivial) bounds.