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

calculates the sign of the curvature for three hits More...

#include <SignCurvatureXYError.h>

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

Public Types

typedef int 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 (SIGNCURVATUREXYERROR_NAME)
 is replaced by "static const std:string name(void)" frunction which returns name of the Class
 

Static Public Member Functions

static int value (const PointType &a, const PointType &b, const PointType &c)
 calculates calculates the sign of the curvature of given 3-hit-tracklet. More...
 
static variableType value (const PointType &arg1, const PointType &arg2)
 Static method that return the variable associated to: More...
 

Static Public Attributes

static const size_t c_Nargs
 Number of arguments.
 

Detailed Description

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

calculates the sign of the curvature for three hits

Definition at line 28 of file SignCurvatureXYError.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 int 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() [1/2]

static int value ( const PointType &  a,
const PointType &  b,
const PointType &  c 
)
inlinestatic

calculates calculates the sign of the curvature of given 3-hit-tracklet.

+1 represents a left-oriented curvature, -1 means having a right-oriented curvature. 0 means it is approximately straight. first vector should be outer hit, second = center hit, third is inner hit.

Definition at line 38 of file SignCurvatureXYError.h.

39  {
40  B2Vector3<double> sigma_a = a.getPositionError();
41  B2Vector3<double> sigma_b = b.getPositionError();
42  B2Vector3<double> sigma_c = c.getPositionError();
43 
44  B2Vector3<double> c2b(b.X() - c.X(), b.Y() - c.Y(), 0.0);
45  B2Vector3<double> b2a(a.X() - b.X(), a.Y() - b.Y(), 0.0);
46  //TODO: check if acos of the dot product is better (faster)
47  double angle = atan2(b2a[0], b2a[1]) - atan2(c2b[0], c2b[1]);
48  //TODO 1/3...mean of the sigmas. Possible improvement: Use a parameter instead, and determine with simulated events.
49  double sigmaan = (sigma_a.Mag() + sigma_b.Mag() + sigma_c.Mag()) / (3.*(c2b.Mag() + b2a.Mag()));
50  if (angle < (-sigmaan)) { return -1; }
51  else if (angle > sigmaan) {return 1; }
52  else { return 0; }
53  }

◆ value() [2/2]

static variableType value ( const templateArgumentType &  arg1,
const templateArgumentType &  arg2 
)
inlinestaticinherited

Static method that return the variable associated to:

Parameters
arg1first object of the pair
arg2second object of the pair

N.B. this method must be static.


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