Belle II Software  release-08-01-10
DISTANCE3DNORMED_NAME< PointType > Class Template Reference

This is the specialization for SpacePoints with returning floats, where value calculates the normed distance between two hits in 3D. More...

#include <Distance3DNormed.h>

Inheritance diagram for DISTANCE3DNORMED_NAME< PointType >:
Collaboration diagram for DISTANCE3DNORMED_NAME< PointType >:

Public Types

typedef double variableType
 Type of the returned object. More...
 
typedef PointType argumentType
 Type of the argument object. More...
 
typedef FunctionOf< Nargs, variableType, const argumentType & >::functionType functionType
 Type of the function returning the value. More...
 

Public Member Functions

 PUT_NAME_FUNCTION (DISTANCE3DNORMED_NAME)
 is replaced by "static const std:string name(void)" frunction which returns name of the Class
 

Static Public Member Functions

static double value (const PointType &outerHit, const PointType &innerHit)
 calculates the normed distance between the hits (3D), returning unit: none. More...
 

Static Public Attributes

static const size_t c_Nargs
 Number of arguments.
 

Detailed Description

template<typename PointType>
class Belle2::DISTANCE3DNORMED_NAME< PointType >

This is the specialization for SpacePoints with returning floats, where value calculates the normed distance between two hits in 3D.

Definition at line 23 of file Distance3DNormed.h.

Member Typedef Documentation

◆ argumentType

typedef PointType argumentType
inherited

Type of the argument object.

Needed for SFINAE in Filter.hh

Definition at line 84 of file SelectionVariable.h.

◆ functionType

typedef FunctionOf<Nargs, variableType, const argumentType&>::functionType functionType
inherited

Type of the function returning the value.

Needed for the automated training

Definition at line 88 of file SelectionVariable.h.

◆ variableType

typedef double variableType
inherited

Type of the returned object.

Needed for SFINAE in Filter.hh

Definition at line 81 of file SelectionVariable.h.

Member Function Documentation

◆ value()

static double value ( const PointType &  outerHit,
const PointType &  innerHit 
)
inlinestatic

calculates the normed distance between the hits (3D), returning unit: none.

Value is defined between 0-1, which is 1, if there is no distance in r^2 and is 1 if there is no distance in z

ATTENTION: returns 0 if inf or nan is provoked (this is the behavior of the old code)

Definition at line 37 of file Distance3DNormed.h.

38  {
39 
40  double result =
41  (std::pow(outerHit.X() - innerHit.X(), 2)
42  + std::pow(outerHit.Y() - innerHit.Y(), 2))
43  /
44  (std::pow(outerHit.X() - innerHit.X(), 2)
45  + std::pow(outerHit.Y() - innerHit.Y(), 2)
46  + std::pow(outerHit.Z() - innerHit.Z(), 2));
47 
48  return
49  (std::isnan(result) || std::isinf(result)) ? 0 : result;
50  }

The documentation for this class was generated from the following file: