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

compares the "slopes" z over arc length. More...

#include <DeltaSlopeZoverS.h>

Inheritance diagram for DELTASLOPEZOVERS_NAME< PointType >:
Collaboration diagram for DELTASLOPEZOVERS_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 (DELTASLOPEZOVERS_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 &centerHit, const PointType &innerHit)
 compares the "slopes" z over arc length. 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::DELTASLOPEZOVERS_NAME< PointType >

compares the "slopes" z over arc length.

calcDeltaSlopeZOverS is invariant under rotations in the r-z plane.

WARNING: this filter returns 0 if no valid value could be found!

Definition at line 31 of file DeltaSlopeZoverS.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() [1/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.

◆ value() [2/2]

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

compares the "slopes" z over arc length.

calcDeltaSlopeZOverS is invariant under rotations in the r-z plane.

Definition at line 38 of file DeltaSlopeZoverS.h.

39  {
40 
41  B2Vector3D cCenter = CircleCenterXY<PointType>::value(outerHit, centerHit, innerHit);
42  double circleRadius = CircleRadius<PointType>::calcAvgDistanceXY(outerHit, centerHit, innerHit, cCenter);
43  B2Vector3D vecOuter2cC((outerHit.X() - cCenter.X()),
44  (outerHit.Y() - cCenter.Y()),
45  (outerHit.Z() - cCenter.Z()));
46  B2Vector3D vecCenter2cC((centerHit.X() - cCenter.X()),
47  (centerHit.Y() - cCenter.Y()),
48  (centerHit.Z() - cCenter.Z()));
49  B2Vector3D vecInner2cC((innerHit.X() - cCenter.X()),
50  (innerHit.Y() - cCenter.Y()),
51  (innerHit.Z() - cCenter.Z()));
52 
53  // WARNING: this is only approximately S (valid in the limit of small angles) but might be OK for this use!!!
54  // want to replace id with 2*sin ( alfa ) * circleRadius
55  double alfaOCr = acos(CosDirectionXY<B2Vector3D>::value(vecOuter2cC, vecCenter2cC)) * circleRadius ;
56  double alfaCIr = acos(CosDirectionXY<B2Vector3D>::value(vecCenter2cC, vecInner2cC)) * circleRadius ;
57 
58  // Beware of z>r!:
59  double result = (asin(double(outerHit.Z() - centerHit.Z()) / alfaOCr)) - asin(double(centerHit.Z() - innerHit.Z()) / alfaCIr);
60 
61  return (std::isnan(result) || std::isinf(result)) ? double(0) : result;
62  }
B2Vector3< double > B2Vector3D
typedef for common usage with double
Definition: B2Vector3.h:516

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