10#include "CLHEP/Geometry/Transform3D.h"
11#include "CLHEP/Vector/Rotation.h"
12#include "CLHEP/Vector/ThreeVector.h"
13#include "CLHEP/Units/PhysicalConstants.h"
39 assert ( M[i][k] == E[i][k] );
47 double angA=CLHEP::pi/3, angB=CLHEP::pi/4, angC=CLHEP::pi/6;
49 R.rotateX(angA); R.rotateY(angB); R.rotateZ(angC);
50 const Hep3Vector
D(1, 2, 3);
54 for (k=0; k<3; k++) { assert ( M[i][k] == R[i][k] ); }
56 assert ( M(0,3) ==
D.x() );
57 assert ( M(1,3) ==
D.y() );
58 assert ( M(2,3) ==
D.z() );
62 const Point p0(1,1,1);
67 Point p2 = R*Hep3Vector(1,1,1) +
D;
68 assert( std::abs(p1.
x()-p2.
x()) <
DEL );
69 assert( std::abs(p1.
y()-p2.
y()) <
DEL );
70 assert( std::abs(p1.
z()-p2.
z()) <
DEL );
74 assert( std::abs(v1.
x()-n1.
x()) <
DEL );
75 assert( std::abs(v1.
y()-n1.
y()) <
DEL );
76 assert( std::abs(v1.
z()-n1.
z()) <
DEL );
80 p1 =
Point(M[0][0]+
D.x(), M[1][0]+
D.y(), M[2][0]+
D.z());
81 p2 =
Point(M[0][1]+
D.x(), M[1][1]+
D.y(), M[2][1]+
D.z());
82 Transformation T(
Point(0,0,0),
Point(1,0,0),
Point(0,1,0),
D, p1, p2);
85 for (k=0; k<4; k++) { assert ( std::abs(M[i][k] - T[i][k]) <
DEL ); }
92 for (k=0; k<4; k++) { assert ( T[i][k] == E[i][k] ); }
100 for (k=0; k<4; k++) { assert ( T(i,k) == M[i][k] ); }
108 for (i=0; i<4; i++) {
109 for (k=0; k<4; k++) { assert ( std::abs(T[i][k] - E[i][k]) <
DEL ); }
114 for (i=0; i<4; i++) {
115 for (k=0; k<4; k++) { assert ( std::abs(T[i][k] - E[i][k]) <
DEL ); }
122 for (i=0; i<3; i++) {
123 for (k=0; k<3; k++) { assert ( R[i][k] == Q[i][k] ); }
130 assert ( C.x() ==
D.x() );
131 assert ( C.y() ==
D.y() );
132 assert ( C.z() ==
D.z() );
147 for (i=0; i<4; i++) {
148 for (k=0; k<4; k++) {
149 assert ( std::abs(S[i][k] - SS[i][k]) <
DEL );
150 assert ( std::abs(M[i][k] - T[i][k]) <
DEL );
163 Hep3Vector www(1,2,3);
172 assert (vvv.
x() == nnn.
z());
173 assert (vvv.
y() == nnn.
y());
174 assert (vvv.
z() == nnn.
x());
177 www = Hep3Vector(vvv);