Belle II Software  release-08-01-10
ThreeHitFilters Class Reference

The class 'ThreeHitFilters' bundles filter methods using 3 hits which are stored in B2Vector3Ds. More...

#include <ThreeHitFilters.h>

Collaboration diagram for ThreeHitFilters:

Public Member Functions

 ThreeHitFilters ()
 Empty constructor. More...
 
 ThreeHitFilters (const B2Vector3D &outerHit, const B2Vector3D &centerHit, const B2Vector3D &innerHit, const double magneticFieldStrength=1.5)
 Constructor. More...
 
 ~ThreeHitFilters ()
 Destructor.
 
void resetValues (const B2Vector3D &outerHit, const B2Vector3D &centerHit, const B2Vector3D &innerHit)
 Overrides Constructor-Setup. More...
 
void resetMagneticField (const double magneticFieldStrength=1.5)
 Overrides Constructor-Setup for magnetic field. More...
 
double getMagneticField ()
 returns the set value of the magnetic field in Tesla
 
double filterNan (double value)
 returns zero if value is nan or inf
 
double calcAngle3D ()
 calculates the angle between the hits/vectors (3D), returning unit: none (calculation for degrees is incomplete, if you want readable numbers, use fullAngle3D instead)
 
double fullAngle3D ()
 calculates the angle between the hits/vectors (3D), returning unit: angle in degrees
 
double calcAngleXY ()
 calculates the angle between the hits/vectors (XY), returning unit: none (calculation for degrees is incomplete, if you want readable numbers, use fullAngleXY instead)
 
double fullAngleXY ()
 calculates the angle between the hits/vectors (XY), returning unit: angle in degrees
 
double calcAngleRZ ()
 calculates the angle between the hits/vectors (RZ), returning unit: none (calculation for degrees is incomplete, if you want readable numbers, use fullAngleRZ instead)
 
double fullAngleRZ ()
 calculates the angle between the hits/vectors (RZ), returning unit: angle in degrees
 
double calcCircleDist2IP ()
 calculates the distance of the point of closest approach of circle to the IP, returning unit: cm
 
double calcPt ()
 calculates the estimation of the transverse momentum of the 3-hit-tracklet, returning unit: GeV/c
 
double calcPt (double radius)
 calculates the estimation of the transverse momentum of given radius using defined strength of magnetic field, returning unit: GeV/c
 
double calcDeltaSlopeRZ ()
 calculates deviations in the slope of the inner segment and the outer segment, returning unit: none
 
double calcDeltaSOverZ ()
 calculates the helixparameter describing the deviation in arc length per unit in z. More...
 
double calcDeltaSlopeZOverS ()
 compares the "slopes" z over arc length. More...
 
double calcHelixParameterFit ()
 calculates the helixparameter describing the deviation in z per unit angle, returning unit: none
 
double calcHelixFit ()
 reverse compatibility, calls calcHelixParameterFit
 
double calcAngle2D (const B2Vector3D &vecA, const B2Vector3D &vecB)
 calculates the angle between the hits/vectors (2D), generalized, returning unit: none. More...
 
double fullAngle2D (const B2Vector3D &vecA, const B2Vector3D &vecB)
 calculates the angle between the hits/vectors (2D), generalized, returning unit: angle in radians WARNING it is radians, which is incompatible to fullAngle3D (°))
 
double calcRadius (const B2Vector3D &a, const B2Vector3D &b, const B2Vector3D &c, const B2Vector3D &circleCenter)
 calculates an estimation of the radius of given hits and existing estimation of circleCenter, returning unit: radius in [cm] (positive value)
 
void calcCircleCenter (const B2Vector3D &a, const B2Vector3D &b, const B2Vector3D &c, B2Vector3D &circleCenter)
 calculates an estimation of circleCenter position, result is written into the 4th input-parameter
 
int calcSign (const B2Vector3D &a, const B2Vector3D &b, const B2Vector3D &c)
 calculates calculates the sign of the curvature of given 3-hit-tracklet. More...
 
int calcSign (const B2Vector3D &a, const B2Vector3D &b, const B2Vector3D &c, const B2Vector3D &sigma_a, const B2Vector3D &sigma_b, const B2Vector3D &sigma_c)
 calculates calculates the sign of the curvature of given 3-hit-tracklet. More...
 

Protected Member Functions

void checkCalcCircleCenter ()
 checks whether the calcCircleCenter()-Member has been executed already and executes it if not
 
void checkCalcRadius ()
 checks whether the calcRadius()-Member has been executed already and executes it if not
 
void sanityCheckRadius (double radius)
 check Radius for bad values and throw exception if the value is bad
 

Protected Attributes

TwoHitFilters m_twoHitFilter
 instance of TwoHitFilters-class used for some internal calculations
 
bool m_circleCenterCalculated
 initially set to false, will be set true if calcCircleCenter() is used at least once
 
bool m_radiusCalculated
 initially set to false, will be set true if calcInvCurvature() is used at least once
 
double m_radius
 radius[cm] of a circle in r-phi-plane formed by the 3 hits
 
double m_x2
 internal intermediate value storing x^2, no enduser-relevance
 
double m_y2
 internal intermediate value storing y^2, no enduser-relevance
 
double m_z2
 internal intermediate value storing z^2, no enduser-relevance
 
double m_magneticFieldFactor
 is factor containing speed of light (c), the magnetic field (b) and the scaling factor s for conversion of meter in cm : c*b/100 = c*b*s
 
B2Vector3D m_centerABC
 center position of a circle in r-phi-plane formed by the 3 hits
 
B2Vector3D m_hitA
 outer hit (position relevant for useful filter calculation) used for the filter calculation
 
B2Vector3D m_hitB
 center hit (position relevant for useful filter calculation) used for the filter calculation
 
B2Vector3D m_hitC
 inner hit (position relevant for useful filter calculation) used for the filter calculation
 
B2Vector3D m_vecAB
 vector pointing from center hit to outer hit (outer segment)
 
B2Vector3D m_vecBC
 vector pointing from inner hit to center hit (inner segment)
 

Detailed Description

The class 'ThreeHitFilters' bundles filter methods using 3 hits which are stored in B2Vector3Ds.

Definition at line 23 of file ThreeHitFilters.h.

Constructor & Destructor Documentation

◆ ThreeHitFilters() [1/2]

ThreeHitFilters ( )
inline

Empty constructor.

For initialisation only, an object generated this way is useless unless resetValues(a, b) is called at least once

Definition at line 27 of file ThreeHitFilters.h.

27  :
29  m_radiusCalculated(false),
30  m_radius(0.),
31  m_x2(0.),
32  m_y2(0.),
33  m_z2(0.)
34  {
35  m_hitA.SetXYZ(0., 0., 0.);
36  m_hitB.SetXYZ(0., 0., 0.);
37  m_hitC.SetXYZ(0., 0., 0.);
38  m_vecAB.SetXYZ(0., 0., 0.);
39  m_vecBC.SetXYZ(0., 0., 0.);
40  resetMagneticField(1.5);
41  }
void SetXYZ(DataType x, DataType y, DataType z)
set all coordinates using data type
Definition: B2Vector3.h:464
bool m_circleCenterCalculated
initially set to false, will be set true if calcCircleCenter() is used at least once
double m_radius
radius[cm] of a circle in r-phi-plane formed by the 3 hits
double m_x2
internal intermediate value storing x^2, no enduser-relevance
bool m_radiusCalculated
initially set to false, will be set true if calcInvCurvature() is used at least once
B2Vector3D m_vecAB
vector pointing from center hit to outer hit (outer segment)
B2Vector3D m_hitB
center hit (position relevant for useful filter calculation) used for the filter calculation
B2Vector3D m_vecBC
vector pointing from inner hit to center hit (inner segment)
double m_y2
internal intermediate value storing y^2, no enduser-relevance
void resetMagneticField(const double magneticFieldStrength=1.5)
Overrides Constructor-Setup for magnetic field.
double m_z2
internal intermediate value storing z^2, no enduser-relevance
B2Vector3D m_hitC
inner hit (position relevant for useful filter calculation) used for the filter calculation
B2Vector3D m_hitA
outer hit (position relevant for useful filter calculation) used for the filter calculation

◆ ThreeHitFilters() [2/2]

ThreeHitFilters ( const B2Vector3D outerHit,
const B2Vector3D centerHit,
const B2Vector3D innerHit,
const double  magneticFieldStrength = 1.5 
)
inline

Constructor.

needs the first parameter is outer hit, second is center hit, third is inner hit. Parameters in B2Vector3D-format, Optional parameter is the strength of the magnetic field in Tesla

x-part of m_vecAB.Dot(m_vecBC)

y-part of m_vecAB.Dot(m_vecBC)

z-part of m_vecAB.Dot(m_vecBC)

Definition at line 44 of file ThreeHitFilters.h.

Member Function Documentation

◆ calcAngle2D()

double calcAngle2D ( const B2Vector3D vecA,
const B2Vector3D vecB 
)
inline

calculates the angle between the hits/vectors (2D), generalized, returning unit: none.

used by calcAngleRZ and calcHelixFit (angleXY could use it too, but this one profits from other optimizations instead)

Definition at line 264 of file ThreeHitFilters.h.

◆ calcDeltaSlopeZOverS()

double calcDeltaSlopeZOverS ( )
inline

compares the "slopes" z over arc length.

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

Definition at line 228 of file ThreeHitFilters.h.

◆ calcDeltaSOverZ()

double calcDeltaSOverZ ( )
inline

calculates the helixparameter describing the deviation in arc length per unit in z.

returning unit: radians*cm

Definition at line 211 of file ThreeHitFilters.h.

◆ calcSign() [1/2]

int calcSign ( const B2Vector3D a,
const B2Vector3D b,
const B2Vector3D c 
)

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. first vector should be outer hit, second = center hit, third is inner hit

Definition at line 18 of file ThreeHitFilters.cc.

19 {
20  B2Vector3D ba = a - b; ba.SetZ(0.);
21  B2Vector3D bc = b - c; bc.SetZ(0.);
22  return sign(bc.Orthogonal() * ba); //normal vector of m_vecBC times segment of ba
23 }
void SetZ(DataType z)
set Z/3rd-coordinate
Definition: B2Vector3.h:461
B2Vector3< DataType > Orthogonal() const
Vector orthogonal to this one.
Definition: B2Vector3.h:277

◆ calcSign() [2/2]

int calcSign ( const B2Vector3D a,
const B2Vector3D b,
const B2Vector3D c,
const B2Vector3D sigma_a,
const B2Vector3D sigma_b,
const B2Vector3D sigma_c 
)
inline

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 323 of file ThreeHitFilters.h.

◆ resetMagneticField()

void resetMagneticField ( const double  magneticFieldStrength = 1.5)
inline

Overrides Constructor-Setup for magnetic field.

If no value is given, magnetic field is assumed to be Belle2-Detector standard of 1.5T. pT[GeV/c] = 0.299710*B[T]*r[m] = 0.299710*B[T]*r[cm]/100 = 0.00299710B[T]*r[cm]

Definition at line 89 of file ThreeHitFilters.h.

◆ resetValues()

void resetValues ( const B2Vector3D outerHit,
const B2Vector3D centerHit,
const B2Vector3D innerHit 
)
inline

Overrides Constructor-Setup.

Needed if you want to reuse the instance instead of recreating one

x-part of m_vecAB.Dot(m_vecBC)

y-part of m_vecAB.Dot(m_vecBC)

z-part of m_vecAB.Dot(m_vecBC)

Definition at line 66 of file ThreeHitFilters.h.


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