Go to the documentation of this file.
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);
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() );
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] ); }
129 C = M.getTranslation();
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 );
156 assert ( T.isNear(M,
DEL) );
159 assert ( !T.isNear(M) );
172 assert (vvv.
x() == nnn.
z());
173 assert (vvv.
y() == nnn.
y());
174 assert (vvv.
z() == nnn.
x());
Issues Concerning the PhysicsVectors CLHEP Vector Merge The merge of ZOOM PhysicsVdectors and the CLHEP Vector package is completed The purpose of this document is to list the major issues that affected the merge of these and where relevant describe the resolutions More detailed documents describe more minor issues General Approach As agreed at the June CLHEP the approach is to combine the features of each ZOOM class with the corresponding CLHEP class expanding the interface to create a single lingua franca of what a Hep3Vector(for example) means. We are not forming SpaceVector as an class derived from Hep3Vector and enhancing it in that way. Another rule imposed by the agreement is to avoid using the Exceptions package(even though that will later go into CLHEP for other uses). A desirable goal is to avoid cluttering the interface and enlarging the code linked in when ordinary CLHEP Vector functionallity is used. To this end
Application of Rotations and LorentzTransformations to containers of and as in Rotation R