8 #include <tracking/vxdCaTracking/TwoHitFilters.h>
9 #include <gtest/gtest.h>
35 EXPECT_DOUBLE_EQ(0., aFilter.
calcDistZ());
41 EXPECT_DOUBLE_EQ(42., aFilter.
filterNan(42.));
43 EXPECT_DOUBLE_EQ(42, aFilter.
filterNan(42));
45 EXPECT_DOUBLE_EQ(42., aFilter.
filterNan(42));
47 EXPECT_DOUBLE_EQ(0., aFilter.
filterNan(1. / 0.));
67 EXPECT_DOUBLE_EQ(1., aFilter.
calcDistZ());
107 EXPECT_DOUBLE_EQ(1e300, aFilter.
calcDist3D());
125 EXPECT_DOUBLE_EQ(innerHit * innerHit, aFilter.
calcDist3D());
131 TestOutOfRangeNormedDistFilter)
135 double correctResult = 1. / 2.;
136 double wrongResult = 0.;
Set up a few arrays and objects in the datastore.
The class 'TwoHitFilters' bundles filter methods using 2 hits which are stored in B2Vector3Ds.
double calcNormedDist3D() const
calculates the normed distance between the hits (3D), return unit: none
double calcDist3D() const
calculates the distance between the hits (3D), returning unit: cm^2 for speed optimization
double calcDistXY() const
calculates the distance between the hits (XY), returning unit: cm^2 for speed optimization
double fullDistXY() const
calculates the real distance between the hits (XY), returning unit: cm
double filterNan(double value) const
nice little nanChecker returns 0 if value was nan or inf, else returns value itself
double calcSlopeRZ() const
calculates the angle of the slope of the hits in RZ, returnValue = theta = atan(r/z)
double fullDist3D() const
calculates the real distance between the hits (3D), returning unit: cm
double calcDistZ() const
calculates the distance between the hits (Z only), returning unit: cm
void resetValues(const B2Vector3D &outerHit, const B2Vector3D &innerHit)
Overrides Constructor-Setup.
TEST_F(GlobalLabelTest, LargeNumberOfTimeDependentParameters)
Test large number of time-dep params for registration and retrieval.
double sqrt(double a)
sqrt for double
double atan(double a)
atan for double
Abstract base class for different kinds of events.