Belle II Software development
SIGNCURVATUREXY_NAME< PointType > Class Template Reference

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

#include <SignCurvatureXY.h>

Inheritance diagram for SIGNCURVATUREXY_NAME< PointType >:
SelectionVariable< PointType, 3, int >

Public Types

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

Public Member Functions

 PUT_NAME_FUNCTION (SIGNCURVATUREXY_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.
 
static variableType value (const PointType &arg1, const PointType &arg2)
 Static method that return the variable associated to:
 

Static Public Attributes

static const size_t c_Nargs
 Number of arguments.
 

Detailed Description

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

calculates the sign of the curvature for three hits

Definition at line 28 of file SignCurvatureXY.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,constargumentType&>::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.

a positive value represents a left-oriented curvature, a negative value means having a right-oriented curvature. 0 means that it is exactly straight or that two hits are identical. first vector should be outer hit, second = center hit, third is inner hit.

Definition at line 38 of file SignCurvatureXY.h.

39 {
40 using boost::math::sign;
41 B2Vector3D ba(a.X() - b.X(), a.Y() - b.Y(), 0.0);
42 B2Vector3D bc(b.X() - c.X(), b.Y() - c.Y(), 0.0);
43 return sign(bc.Orthogonal() * ba); //normal vector of m_vecBC times segment of ba
44 }
B2Vector3< double > B2Vector3D
typedef for common usage with double
Definition: B2Vector3.h:516

◆ value() [2/2]

static variableType value ( const PointType &  arg1,
const PointType &  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.

Member Data Documentation

◆ c_Nargs

const size_t c_Nargs
staticinherited

Number of arguments.

Definition at line 91 of file SelectionVariable.h.


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