Belle II Software development
SquaredDistance3D Class Reference

a small filter illustrating the behavior of a distance3D-filter More...

Inheritance diagram for SquaredDistance3D:
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 distance3D-filter

Definition at line 37 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 40 of file filters.cc.

40{return "SquaredDistance3D"; };

◆ 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 43 of file filters.cc.

44 {
45 return
46 pow(get<0>(p1) - get<0>(p2), 2) +
47 pow(get<1>(p1) - get<1>(p2), 2) +
48 pow(get<2>(p1) - get<2>(p2), 2) ;
49 }

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: