11 #pragma implementation
14 #include "CLHEP/Vector/defs.h"
15 #include "CLHEP/Vector/LorentzRotation.h"
16 #include "CLHEP/Vector/LorentzVector.h"
17 #include "CLHEP/Vector/ZMxpv.h"
34 if ( ccol4.
getT() < 0 ) {
35 ZMthrowC (ZMxpvImproperTransformation(
36 "column 4 supplied to define transformation has negative T component"));
41 double u1u1 = ccol1.
dot(ccol1);
42 double f11 = std::fabs(u1u1 + 1.0);
45 "column 1 supplied for HepLorentzRotation has w*w != -1"));
47 double u2u2 = ccol2.
dot(ccol2);
48 double f22 = std::fabs(u2u2 + 1.0);
51 "column 2 supplied for HepLorentzRotation has w*w != -1"));
53 double u3u3 = ccol3.
dot(ccol3);
54 double f33 = std::fabs(u3u3 + 1.0);
57 "column 3 supplied for HepLorentzRotation has w*w != -1"));
59 double u4u4 = ccol4.
dot(ccol4);
60 double f44 = std::fabs(u4u4 - 1.0);
63 "column 4 supplied for HepLorentzRotation has w*w != +1"));
66 double u1u2 = ccol1.
dot(ccol2);
67 double f12 = std::fabs(u1u2);
70 "columns 1 and 2 supplied for HepLorentzRotation have non-zero dot"));
72 double u1u3 = ccol1.
dot(ccol3);
73 double f13 = std::fabs(u1u3);
77 "columns 1 and 3 supplied for HepLorentzRotation have non-zero dot"));
79 double u1u4 = ccol1.
dot(ccol4);
80 double f14 = std::fabs(u1u4);
83 "columns 1 and 4 supplied for HepLorentzRotation have non-zero dot"));
85 double u2u3 = ccol2.
dot(ccol3);
86 double f23 = std::fabs(u2u3);
89 "columns 2 and 3 supplied for HepLorentzRotation have non-zero dot"));
91 double u2u4 = ccol2.
dot(ccol4);
92 double f24 = std::fabs(u2u4);
95 "columns 2 and 4 supplied for HepLorentzRotation have non-zero dot"));
97 double u3u4 = ccol3.
dot(ccol4);
98 double f34 = std::fabs(u3u4);
101 "columns 3 and 4 supplied for HepLorentzRotation have non-zero dot"));
113 bool isLorentzTransformation =
true;
119 isLorentzTransformation =
false;
128 c = ccol3 - ccol3.
dot(d) * d;
131 isLorentzTransformation =
false;
139 b = ccol2 + ccol2.
dot(c) * c - ccol2.
dot(d) * d;
142 isLorentzTransformation =
false;
150 a = ccol1 + ccol1.
dot(b) * b + ccol1.
dot(c) * c - ccol1.
dot(d) * d;
153 isLorentzTransformation =
false;
161 if ( !isLorentzTransformation ) {
162 ZMthrowC (ZMxpvImproperTransformation(
163 "cols 1-4 supplied to define transformation form either \n"
164 " a boosted reflection or a tachyonic transformation -- \n"
165 " transformation will be set to Identity "));
171 if ( isLorentzTransformation ) {
189 set (rrow1, rrow2, rrow3, rrow4);
191 register double q1, q2, q3;
192 q1 = mxy; q2 = mxz; q3 = mxt;
193 mxy = myx; mxz = mzx; mxt = mtx;
194 myx = q1; mzx = q2; mtx = q3;
195 q1 = myz; q2 = myt; q3 = mzt;
196 myz = mzy; myt = mty; mzt = mtz;
197 mzy = q1; mty = q2; mtz = q3;
206 set ( ccol1, ccol2, ccol3, ccol4 );
HepLorentzRotation & setRows(const HepLorentzVector &row1, const HepLorentzVector &row2, const HepLorentzVector &row3, const HepLorentzVector &row4)
double norm(const HepGenMatrix &m)
static ZMpvMetric_t setMetric(ZMpvMetric_t a1)
HepLorentzRotation & set(double bx, double by, double bz)
double dot(const HepLorentzVector &) const