1 #define BOOST_TEST_MODULE ( SurfYZTest ) 2 #include "boost/test/unit_test.hpp" 13 #include "cetlib_except/exception.h" 22 surf2(0., 0., 0., 0.),
23 surf3(1., 1., 1., 0.),
24 surf4(2., 2., 2., 1.) {}
58 double xyz1[3] = {1., 2., 3.};
63 for(
int i=0; i<3; ++i)
64 BOOST_TEST(xyz1[i] == xyz2[i],
tol);
81 return e.category() ==
"SurfYZLine";
98 BOOST_TEST(xyz[0] == -0.1*std::sin(2.),
tol);
99 BOOST_TEST(xyz[1] == 0.2,
tol);
100 BOOST_TEST(xyz[2] == 0.1*std::cos(2.),
tol);
102 BOOST_TEST(xyz[0] == 1. - 0.1*std::sin(2.),
tol);
103 BOOST_TEST(xyz[1] == 1.2,
tol);
104 BOOST_TEST(xyz[2] == 1. + 0.1*std::cos(2.),
tol);
106 BOOST_TEST(mom[0] == 2. * std::cos(2.) / std::cosh(1.),
tol);
107 BOOST_TEST(mom[1] == 2. * std::tanh(1.),
tol);
108 BOOST_TEST(mom[2] == 2. * std::sin(2.) / cosh(1.),
tol);
110 BOOST_TEST(mom[0] == 2. * std::cos(2.) / std::cosh(1.),
tol);
111 BOOST_TEST(mom[1] == 2. * std::tanh(1.),
tol);
112 BOOST_TEST(mom[2] == 2. * std::sin(2.) / cosh(1.),
tol);
114 BOOST_TEST(mom[0] == 2. * std::cos(2.) / std::cosh(1.),
tol);
115 BOOST_TEST(mom[1] == 2. * std::tanh(1.),
tol);
116 BOOST_TEST(mom[2] == 2. * std::sin(2.) / cosh(1.),
tol);
119 BOOST_AUTO_TEST_SUITE_END()
virtual void toGlobal(const double uvw[3], double xyz[3]) const
Transform local to global coordinates.
virtual bool isEqual(const Surface &surf) const
Test two surfaces for equality, within tolerance.
virtual void toLocal(const double xyz[3], double uvw[3]) const
Transform global to local coordinates.
virtual void getMomentum(const TrackVector &vec, double mom[3], TrackDirection dir=UNKNOWN) const
Get momentum vector of track.
virtual bool isParallel(const Surface &surf) const
Test whether two surfaces are parallel, within tolerance.
virtual double distanceTo(const Surface &surf) const
Find perpendicular distance to a parallel surface.
KVector< 5 >::type TrackVector
Track state vector, dimension 5.
Kalman filter linear algebra typedefs.
BOOST_AUTO_TEST_CASE(Equality)
Line surface perpendicular to x-axis.
virtual void getPosition(const TrackVector &vec, double xyz[3]) const
Get position of track.
cet::coded_exception< error, detail::translate > exception