11 #include "CLHEP/Units/GlobalSystemOfUnits.h"
12 #include "CLHEP/Units/GlobalPhysicalConstants.h"
13 #include "CLHEP/Vector/ThreeVector.h"
14 #include "CLHEP/Vector/TwoVector.h"
15 #include "CLHEP/Vector/Rotation.h"
21 using namespace CLHEP;
28 return bool( std::abs(
a-
b) < eps );
62 std::cin >> d0;
if ( !
test(d0, 1.1, 2.2, 3.3,
DEPS) )
exit(1);
63 std::cin >> f0;
if ( !
test(f0, 3.0, 2.0, 1.0,
FEPS) )
exit(1);
64 std::cout << d0 << std::endl;
65 std::cout << f0 << std::endl;
76 d4 = d1 + d2;
if ( !
test(d4, 2.0, 1.0, 0.0,
DEPS) )
exit(3);
82 f4 = d1 + d2;
if ( !
test(f4, 2.0, 1.0, 0.0,
FEPS) )
exit(3);
95 d4 = d1 - d2;
if ( !
test(d4, 0.0, -1.0, 0.0,
DEPS) )
exit(4);
99 f4 = d1 - d2;
if ( !
test(f4, 0.0, -1.0, 0.0,
FEPS) )
exit(4);
209 if ( !
test(d4, std::sqrt(0.5), 0.0, std::sqrt(0.5),
DEPS) )
exit(10);
217 if ( !
test(f4, std::sqrt(0.5), 0.0, std::sqrt(0.5),
FEPS) )
exit(10);
265 if ( !
test(d4, d3.x(), d3.y(), d3.z(),
DEPS) )
exit(11);
266 r0.
rotate(0.10, d1.cross(d3));