Belle II Software development
ThreeHitFilters Class Reference

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

#include <ThreeHitFilters.h>

Public Member Functions

 ThreeHitFilters ()
 Empty constructor.
 
 ThreeHitFilters (const B2Vector3D &outerHit, const B2Vector3D &centerHit, const B2Vector3D &innerHit, const double magneticFieldStrength=1.5)
 Constructor.
 
 ~ThreeHitFilters ()
 Destructor.
 
void resetValues (const B2Vector3D &outerHit, const B2Vector3D &centerHit, const B2Vector3D &innerHit)
 Overrides Constructor-Setup.
 
void resetMagneticField (const double magneticFieldStrength=1.5)
 Overrides Constructor-Setup for magnetic field.
 
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.
 
double calcDeltaSlopeZOverS ()
 compares the "slopes" z over arc length.
 
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.
 
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.
 
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.
 

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.);
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.

45 :
47 m_radiusCalculated(false),
48 m_radius(0.),
50 m_hitB(centerHit),
51 m_hitC(innerHit),
52 m_vecAB(outerHit - centerHit),
53 m_vecBC(centerHit - innerHit)
54 {
55 m_x2 = m_vecAB[0] * m_vecBC[0];
56 m_y2 = m_vecAB[1] * m_vecBC[1];
57 m_z2 = m_vecAB[2] * m_vecBC[2];
58 resetMagneticField(magneticFieldStrength);
59 }
B2Vector3D outerHit(0, 0, 0)
testing out of range behavior

◆ ~ThreeHitFilters()

~ThreeHitFilters ( )
inline

Destructor.

Definition at line 63 of file ThreeHitFilters.h.

63{}

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.

265 {
266 double angle = ((vecA[0] * vecB[0] + vecA[1] * vecB[1]) / sqrt(vecA.Perp2() * vecB.Perp2()));
267 return filterNan(angle);
268 }
double filterNan(double value)
returns zero if value is nan or inf
double sqrt(double a)
sqrt for double
Definition: beamHelpers.h:28

◆ calcAngle3D()

double calcAngle3D ( )
inline

calculates the angle between the hits/vectors (3D), returning unit: none (calculation for degrees is incomplete, if you want readable numbers, use fullAngle3D instead)

Definition at line 104 of file ThreeHitFilters.h.

105 {
106 double angle = ((m_x2 + m_y2 + m_z2) / (m_vecAB.Mag2() *
107 m_vecBC.Mag2())); // fullCalc would be acos(m_vecAB.Dot(m_vecBC) / m_vecAB.Mag()*m_vecBC.Mag())
108 return filterNan(angle);
109 } // return unit: none (calculation for degrees is incomplete, if you want readable numbers, use fullAngle3D instead)
DataType Mag2() const
The magnitude squared (rho^2 in spherical coordinate system).
Definition: B2Vector3.h:157

◆ calcAngleRZ()

double calcAngleRZ ( )
inline

calculates the angle between the hits/vectors (RZ), returning unit: none (calculation for degrees is incomplete, if you want readable numbers, use fullAngleRZ instead)

Definition at line 143 of file ThreeHitFilters.h.

144 {
145 B2Vector3D rzVecAB(m_vecAB.Perp(), m_vecAB[2], 0.);
146 B2Vector3D rzVecBC(m_vecBC.Perp(), m_vecBC[2], 0.);
147 return calcAngle2D(rzVecAB, rzVecBC);
148 } // return unit: none (calculation for degrees is incomplete, if you want readable numbers, use fullAngleRZ instead)
DataType Perp() const
The transverse component (R in cylindrical coordinate system).
Definition: B2Vector3.h:200
double calcAngle2D(const B2Vector3D &vecA, const B2Vector3D &vecB)
calculates the angle between the hits/vectors (2D), generalized, returning unit: none.
B2Vector3< double > B2Vector3D
typedef for common usage with double
Definition: B2Vector3.h:516

◆ calcAngleXY()

double calcAngleXY ( )
inline

calculates the angle between the hits/vectors (XY), returning unit: none (calculation for degrees is incomplete, if you want readable numbers, use fullAngleXY instead)

Definition at line 124 of file ThreeHitFilters.h.

125 {
126 double angle = ((m_x2 + m_y2) / (m_vecAB.Perp2() * m_vecBC.Perp2())); // fullAngle:
127 return filterNan(angle);
128 } // return unit: none (calculation for degrees is incomplete, if you want readable numbers, use fullAngleXY instead)
DataType Perp2() const
The transverse component squared (R^2 in cylindrical coordinate system).
Definition: B2Vector3.h:196

◆ calcCircleCenter()

void calcCircleCenter ( const B2Vector3D a,
const B2Vector3D b,
const B2Vector3D c,
B2Vector3D circleCenter 
)
inline

calculates an estimation of circleCenter position, result is written into the 4th input-parameter

Definition at line 291 of file ThreeHitFilters.h.

292 {
293 // calculates the intersection point using Cramer's rule.
294 // x_1+s*n_1==x_2+t*n_2 --> n_1 *s - n_2 *t == x_2 - x_1 --> http://en.wikipedia.org/wiki/Cramer%27s_rule
295 double inX = b[0] - c[0]; // x value of the normal vector of the inner segment (b-c)
296 double inY = b[1] - c[1]; // y value of the normal vector of the inner segment (b-c)
297 double outX = a[0] - b[0]; // x value of the normal vector of the outer segment (a-b)
298 double outY = a[1] - b[1]; // y value of the normal vector of the outer segment (a-b)
299
300 //searching solution for Ax = b, aij are the matrix elements of A, bi are elements of b
301 double a11 = inY;
302 double a12 = -inX;
303 double a21 = -outY;
304 double a22 = outX;
305 double b1 = b[0] + outX * 0.5 - (c[0] + inX * 0.5);
306 double b2 = b[1] + outY * 0.5 - (c[1] + inY * 0.5);
307
308 if (a11 * a22 == a12 * a21) { throw FilterExceptions::Straight_Line(); }
309
310 double s = (b1 * a22 - b2 * a21) / (a11 * a22 - a12 * a21); //the determinant is zero iff the three hits are on a line in (x,y).
311
312 circleCenter.SetXYZ(c[0] + inX * 0.5 + s * inY, c[1] + inY * 0.5 - s * inX, 0.);
313 }

◆ calcCircleDist2IP()

double calcCircleDist2IP ( )
inline

calculates the distance of the point of closest approach of circle to the IP, returning unit: cm

Definition at line 165 of file ThreeHitFilters.h.

166 {
168
169 return (fabs(m_centerABC.Perp() - m_radius)); // distance of closest approach of circle to the IP
170 } // return unit: cm
B2Vector3D m_centerABC
center position of a circle in r-phi-plane formed by the 3 hits
void checkCalcRadius()
checks whether the calcRadius()-Member has been executed already and executes it if not

◆ calcDeltaSlopeRZ()

double calcDeltaSlopeRZ ( )
inline

calculates deviations in the slope of the inner segment and the outer segment, returning unit: none

Definition at line 195 of file ThreeHitFilters.h.

196 {
198 double slopeAB = m_twoHitFilter.calcSlopeRZ();
200 double slopeBC = m_twoHitFilter.calcSlopeRZ();
201
202 return filterNan(slopeBC - slopeAB);
203 } // return unit: none
TwoHitFilters m_twoHitFilter
instance of TwoHitFilters-class used for some internal calculations
double calcSlopeRZ() const
calculates the angle of the slope of the hits in RZ, returnValue = theta = atan(r/z)
Definition: TwoHitFilters.h:70
void resetValues(const B2Vector3D &outerHit, const B2Vector3D &innerHit)
Overrides Constructor-Setup.
Definition: TwoHitFilters.h:46

◆ 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.

229 {
231
232 B2Vector3D points2hitA = m_hitA - m_centerABC;
233 B2Vector3D points2hitB = m_hitB - m_centerABC;
234 B2Vector3D points2hitC = m_hitC - m_centerABC;
235 double alfaABr = fullAngle2D(points2hitA, points2hitB) * m_radius;
236 double alfaBCr = fullAngle2D(points2hitB, points2hitC) * m_radius;
237
238 return filterNan((asin(m_vecAB[2] / alfaABr)) - asin(m_vecBC[2] / alfaBCr)); // Beware of z>r!
239 }
double fullAngle2D(const B2Vector3D &vecA, const B2Vector3D &vecB)
calculates the angle between the hits/vectors (2D), generalized, returning unit: angle in radians WAR...

◆ 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.

212 {
214
215 B2Vector3D points2hitA = m_hitA - m_centerABC;
216 B2Vector3D points2hitB = m_hitB - m_centerABC;
217 B2Vector3D points2hitC = m_hitC - m_centerABC;
218 double alfaAB = fullAngle2D(points2hitA, points2hitB);
219 double alfaBC = fullAngle2D(points2hitB, points2hitC);
220 //return filterNan( (alfaAB * m_vecBC[2]) - (alfaBC *m_vecAB[2]) );
221 return (alfaAB * m_vecBC[2]) - (alfaBC *
222 m_vecAB[2]); // equals to alfaAB/dZAB and alfaBC/dZBC, but this solution here can not produce a division by zero
223 } // return unit: radians*cm
void checkCalcCircleCenter()
checks whether the calcCircleCenter()-Member has been executed already and executes it if not

◆ calcHelixFit()

double calcHelixFit ( )
inline

reverse compatibility, calls calcHelixParameterFit

Definition at line 259 of file ThreeHitFilters.h.

259{ return calcHelixParameterFit(); }
double calcHelixParameterFit()
calculates the helixparameter describing the deviation in z per unit angle, returning unit: none

◆ calcHelixParameterFit()

double calcHelixParameterFit ( )
inline

calculates the helixparameter describing the deviation in z per unit angle, returning unit: none

Definition at line 244 of file ThreeHitFilters.h.

245 {
247 B2Vector3D points2hitA = m_hitA - m_centerABC;
248 B2Vector3D points2hitB = m_hitB - m_centerABC;
249 B2Vector3D points2hitC = m_hitC - m_centerABC;
250 double alfaAB = calcAngle2D(points2hitA, points2hitB);
251 double alfaBC = calcAngle2D(points2hitB, points2hitC);
252 // real calculation: ratio is (m_vecij[2] = deltaZ): alfaAB/deltaZab : alfaBC/deltaZbc, the following equation saves two times '/'
253 return filterNan((alfaAB * m_vecBC[2]) / (alfaBC * m_vecAB[2]));
254 } // return unit: none

◆ calcPt() [1/2]

double calcPt ( )
inline

calculates the estimation of the transverse momentum of the 3-hit-tracklet, returning unit: GeV/c

Definition at line 175 of file ThreeHitFilters.h.

176 {
178
179 return calcPt(m_radius);
180 } // return unit: GeV/c
double calcPt()
calculates the estimation of the transverse momentum of the 3-hit-tracklet, returning unit: GeV/c

◆ calcPt() [2/2]

double calcPt ( double  radius)
inline

calculates the estimation of the transverse momentum of given radius using defined strength of magnetic field, returning unit: GeV/c

Definition at line 185 of file ThreeHitFilters.h.

186 {
187 sanityCheckRadius(radius);
188
189 return (m_magneticFieldFactor * radius);
190 } // return unit: GeV/c
void sanityCheckRadius(double radius)
check Radius for bad values and throw exception if the value is bad
double m_magneticFieldFactor
is factor containing speed of light (c), the magnetic field (b) and the scaling factor s for conversi...

◆ calcRadius()

double calcRadius ( const B2Vector3D a,
const B2Vector3D b,
const B2Vector3D c,
const B2Vector3D circleCenter 
)
inline

calculates an estimation of the radius of given hits and existing estimation of circleCenter, returning unit: radius in [cm] (positive value)

Definition at line 282 of file ThreeHitFilters.h.

283 {
284 return ((circleCenter - a).Perp() + (circleCenter - b).Perp() + (circleCenter - c).Perp()) /
285 3.; // = radius in [cm], sign here not needed. normally: signKappaAB/normAB1
286 } // used by calcPt() and calcCircleDist2IP()

◆ 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}
B2Vector3< DataType > Orthogonal() const
Vector orthogonal to this one.
Definition: B2Vector3.h:277
void SetZ(DataType z)
set Z/3rd-coordinate
Definition: B2Vector3.h:461

◆ 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.

325 {
326 B2Vector3D c2b = b - c; c2b.SetZ(0.);
327 B2Vector3D b2a = a - b; b2a.SetZ(0.);
328 double angle = atan2(b2a[0], b2a[1]) - atan2(c2b[0], c2b[1]);
329 double sigmaan = (sigma_a.Mag() + sigma_b.Mag() + sigma_c.Mag()) / (3.*(c2b.Mag() +
330 b2a.Mag())); //TODO 1/3...mean of the sigmas. Possible improvement: Use a parameter instead, and determine with simulated events.
331 if (angle < (-sigmaan)) { return -1; }
332 else if (angle > sigmaan) {return 1; }
333 else { return 0; }
334 }

◆ checkCalcCircleCenter()

void checkCalcCircleCenter ( )
inlineprotected

checks whether the calcCircleCenter()-Member has been executed already and executes it if not

Definition at line 342 of file ThreeHitFilters.h.

343 {
344 if (m_circleCenterCalculated == false) {
347 }
348 }
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

◆ checkCalcRadius()

void checkCalcRadius ( )
inlineprotected

checks whether the calcRadius()-Member has been executed already and executes it if not

Definition at line 352 of file ThreeHitFilters.h.

353 {
355 if (m_radiusCalculated == false) {
358 m_radiusCalculated = true;
359 }
360 }
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,...

◆ filterNan()

double filterNan ( double  value)
inline

returns zero if value is nan or inf

Definition at line 99 of file ThreeHitFilters.h.

99{ return m_twoHitFilter.filterNan(value); }
double filterNan(double value) const
nice little nanChecker returns 0 if value was nan or inf, else returns value itself

◆ fullAngle2D()

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

calculates the angle between the hits/vectors (2D), generalized, returning unit: angle in radians WARNING it is radians, which is incompatible to fullAngle3D (°))

Definition at line 273 of file ThreeHitFilters.h.

274 {
275 return acos(calcAngle2D(vecA, vecB));
276 //return filterNan(angle);
277 }

◆ fullAngle3D()

double fullAngle3D ( )
inline

calculates the angle between the hits/vectors (3D), returning unit: angle in degrees

Definition at line 114 of file ThreeHitFilters.h.

115 {
116 double angle = acos(m_vecAB.Dot(m_vecBC) / (m_vecAB.Mag() * m_vecBC.Mag())); // 0-pi
117 angle = (angle * (180. / M_PI));
118 return filterNan(angle);
119 } // return unit: ° (0 - 180°)
DataType Mag() const
The magnitude (rho in spherical coordinate system).
Definition: B2Vector3.h:159
DataType Dot(const B2Vector3< DataType > &p) const
Scalar product.
Definition: B2Vector3.h:290

◆ fullAngleRZ()

double fullAngleRZ ( )
inline

calculates the angle between the hits/vectors (RZ), returning unit: angle in degrees

Definition at line 153 of file ThreeHitFilters.h.

154 {
155 B2Vector3D rzVecAB(m_vecAB.Perp(), m_vecAB[2], 0.);
156 B2Vector3D rzVecBC(m_vecBC.Perp(), m_vecBC[2], 0.);
157 double angle = fullAngle2D(rzVecAB, rzVecBC); // 0-pi
158 angle = (angle * (180. / M_PI));
159 return filterNan(angle);
160 } // return unit: ° (0 - 180°)

◆ fullAngleXY()

double fullAngleXY ( )
inline

calculates the angle between the hits/vectors (XY), returning unit: angle in degrees

Definition at line 133 of file ThreeHitFilters.h.

134 {
135 double angle = fullAngle2D(m_vecAB, m_vecBC); // 0-pi
136 angle = (angle * (180. / M_PI));
137 return filterNan(angle);
138 } // return unit: ° (0 - 180°)

◆ getMagneticField()

double getMagneticField ( )
inline

returns the set value of the magnetic field in Tesla

Definition at line 94 of file ThreeHitFilters.h.

94{ return m_magneticFieldFactor / 0.00299710; }

◆ 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.

89{ m_magneticFieldFactor = magneticFieldStrength * 0.00299710; }

◆ 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.

67 {
68 m_radiusCalculated = false;
70 m_radius = 0.;
72 m_hitB = centerHit;
73 m_hitC = innerHit;
74 m_vecAB = outerHit - centerHit;
75 m_vecBC = centerHit - innerHit;
76
77 m_x2 = m_vecAB[0] * m_vecBC[0];
78 m_y2 = m_vecAB[1] * m_vecBC[1];
79 m_z2 = m_vecAB[2] * m_vecBC[2];
80 }

◆ sanityCheckRadius()

void sanityCheckRadius ( double  radius)
inlineprotected

check Radius for bad values and throw exception if the value is bad

Definition at line 364 of file ThreeHitFilters.h.

365 {
366 if (fabs(radius) <
367 0.0000001) { // WARNING hardcoded value, is there a quasi-global value for such cases (this case, minimal accepted radius)
368 m_radiusCalculated = false;
370 m_radius = 0.;
371 B2ERROR("sanityCheckRadius: given radius is " << radius << ", which is below threshold of " << 0.0000001 << ", throwing exception");
372 throw FilterExceptions::Circle_too_small();
373 }
374 }

Member Data Documentation

◆ m_centerABC

B2Vector3D m_centerABC
protected

center position of a circle in r-phi-plane formed by the 3 hits

Definition at line 387 of file ThreeHitFilters.h.

◆ m_circleCenterCalculated

bool m_circleCenterCalculated
protected

initially set to false, will be set true if calcCircleCenter() is used at least once

Definition at line 380 of file ThreeHitFilters.h.

◆ m_hitA

B2Vector3D m_hitA
protected

outer hit (position relevant for useful filter calculation) used for the filter calculation

Definition at line 388 of file ThreeHitFilters.h.

◆ m_hitB

B2Vector3D m_hitB
protected

center hit (position relevant for useful filter calculation) used for the filter calculation

Definition at line 389 of file ThreeHitFilters.h.

◆ m_hitC

B2Vector3D m_hitC
protected

inner hit (position relevant for useful filter calculation) used for the filter calculation

Definition at line 390 of file ThreeHitFilters.h.

◆ m_magneticFieldFactor

double m_magneticFieldFactor
protected

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

Definition at line 386 of file ThreeHitFilters.h.

◆ m_radius

double m_radius
protected

radius[cm] of a circle in r-phi-plane formed by the 3 hits

Definition at line 382 of file ThreeHitFilters.h.

◆ m_radiusCalculated

bool m_radiusCalculated
protected

initially set to false, will be set true if calcInvCurvature() is used at least once

Definition at line 381 of file ThreeHitFilters.h.

◆ m_twoHitFilter

TwoHitFilters m_twoHitFilter
protected

instance of TwoHitFilters-class used for some internal calculations

Definition at line 378 of file ThreeHitFilters.h.

◆ m_vecAB

B2Vector3D m_vecAB
protected

vector pointing from center hit to outer hit (outer segment)

Definition at line 391 of file ThreeHitFilters.h.

◆ m_vecBC

B2Vector3D m_vecBC
protected

vector pointing from inner hit to center hit (inner segment)

Definition at line 392 of file ThreeHitFilters.h.

◆ m_x2

double m_x2
protected

internal intermediate value storing x^2, no enduser-relevance

Definition at line 383 of file ThreeHitFilters.h.

◆ m_y2

double m_y2
protected

internal intermediate value storing y^2, no enduser-relevance

Definition at line 384 of file ThreeHitFilters.h.

◆ m_z2

double m_z2
protected

internal intermediate value storing z^2, no enduser-relevance

Definition at line 385 of file ThreeHitFilters.h.


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