Belle II Software development
SquaredDistance2Dxy Class Reference

a small filter illustrating the behavior of a distance2D-filter in XY More...

Inheritance diagram for SquaredDistance2Dxy:
SelectionVariable< spacePoint, 2, float >

Public Types

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

Static Public Member Functions

static const std::string name (void)
 return name of the class
 
static float value (const spacePoint &p1, const spacePoint &p2)
 value function does the actual calculation of this class.
 
static variableType value (const spacePoint &arg1, const spacePoint &arg2)
 Static method that return the variable associated to:
 

Static Public Attributes

static const size_t c_Nargs
 Number of arguments.
 

Detailed Description

a small filter illustrating the behavior of a distance2D-filter in XY

Definition at line 54 of file filters.cc.

Member Typedef Documentation

◆ argumentType

typedef spacePoint 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 float variableType
inherited

Type of the returned object.

Needed for SFINAE in Filter.hh

Definition at line 81 of file SelectionVariable.h.

Member Function Documentation

◆ name()

static const std::string name ( void  )
inlinestatic

return name of the class

Definition at line 57 of file filters.cc.

57{return "SquaredDistance2Dxy"; };

◆ value() [1/2]

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

◆ value() [2/2]

static float value ( const spacePoint p1,
const spacePoint p2 
)
inlinestatic

value function does the actual calculation of this class.

Definition at line 60 of file filters.cc.

61 {
62 return
63 pow(get<0>(p1) - get<0>(p2), 2) +
64 pow(get<1>(p1) - get<1>(p2), 2) ;
65 }

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: