13 #pragma implementation
16 #include "CLHEP/Vector/defs.h"
17 #include "CLHEP/Vector/LorentzRotation.h"
18 #include "CLHEP/Vector/ZMxpv.h"
29 (
double bx,
double by,
double bz) {
30 double bp2 = bx*bx + by*by + bz*bz;
33 "Boost Vector supplied to set HepLorentzRotation represents speed >= c."));
35 double gamma = 1.0 / std::sqrt(1.0 - bp2);
36 double bgamma = gamma * gamma / (1.0 + gamma);
37 mxx = 1.0 + bgamma * bx * bx;
38 myy = 1.0 + bgamma * by * by;
39 mzz = 1.0 + bgamma * bz * bz;
40 mxy =
myx = bgamma * bx * by;
41 mxz =
mzx = bgamma * bx * bz;
42 myz =
mzy = bgamma * by * bz;
70 if (j == 0) {
return xx(); }
71 if (j == 1) {
return xy(); }
72 if (j == 2) {
return xz(); }
73 if (j == 3) {
return xt(); }
75 if (j == 0) {
return yx(); }
76 if (j == 1) {
return yy(); }
77 if (j == 2) {
return yz(); }
78 if (j == 3) {
return yt(); }
80 if (j == 0) {
return zx(); }
81 if (j == 1) {
return zy(); }
82 if (j == 2) {
return zz(); }
83 if (j == 3) {
return zt(); }
85 if (j == 0) {
return tx(); }
86 if (j == 1) {
return ty(); }
87 if (j == 2) {
return tz(); }
88 if (j == 3) {
return tt(); }
90 std::cerr <<
"HepLorentzRotation subscripting: bad indeces "
91 <<
"(" << i <<
"," << j <<
")\n";
101 if (
mtt<m1.
mtt)
return -1;
else if (
mtt>m1.
mtt)
return 1;
102 else if (
mtz<m1.
mtz)
return -1;
else if (
mtz>m1.
mtz)
return 1;
103 else if (
mty<m1.
mty)
return -1;
else if (
mty>m1.
mty)
return 1;
104 else if (
mtx<m1.
mtx)
return -1;
else if (
mtx>m1.
mtx)
return 1;
106 else if (
mzt<m1.
mzt)
return -1;
else if (
mzt>m1.
mzt)
return 1;
107 else if (
mzz<m1.
mzz)
return -1;
else if (
mzz>m1.
mzz)
return 1;
108 else if (
mzy<m1.
mzy)
return -1;
else if (
mzy>m1.
mzy)
return 1;
109 else if (
mzx<m1.
mzx)
return -1;
else if (
mzx>m1.
mzx)
return 1;
111 else if (
myt<m1.
myt)
return -1;
else if (
myt>m1.
myt)
return 1;
112 else if (
myz<m1.
myz)
return -1;
else if (
myz>m1.
myz)
return 1;
113 else if (
myy<m1.
myy)
return -1;
else if (
myy>m1.
myy)
return 1;
114 else if (
myx<m1.
myx)
return -1;
else if (
myx>m1.
myx)
return 1;
116 else if (
mxt<m1.
mxt)
return -1;
else if (
mxt>m1.
mxt)
return 1;
117 else if (
mxz<m1.
mxz)
return -1;
else if (
mxz>m1.
mxz)
return 1;
118 else if (
mxy<m1.
mxy)
return -1;
else if (
mxy>m1.
mxy)
return 1;
119 else if (
mxx<m1.
mxx)
return -1;
else if (
mxx>m1.
mxx)
return 1;
152 double c1 = std::cos (delta);
153 double s1 = std::sin (delta);
164 double c1 = std::cos (delta);
165 double s1 = std::sin (delta);
176 double c1 = std::cos (delta);
177 double s1 = std::sin (delta);
188 double b2 = beta*beta;
191 "Beta supplied to HepLorentzRotation::boostX represents speed >= c."));
193 double g1 = 1.0/std::sqrt(1.0-b2);
205 double b2 = beta*beta;
208 "Beta supplied to HepLorentzRotation::boostY represents speed >= c."));
210 double g1 = 1.0/std::sqrt(1.0-b2);
222 double b2 = beta*beta;
225 "Beta supplied to HepLorentzRotation::boostZ represents speed >= c."));
227 double g1 = 1.0/std::sqrt(1.0-b2);
240 std::setw(11) << std::setprecision(6) <<
xx() <<
" " <<
241 std::setw(11) << std::setprecision(6) <<
xy() <<
" " <<
242 std::setw(11) << std::setprecision(6) <<
xz() <<
" " <<
243 std::setw(11) << std::setprecision(6) <<
xt() <<
")\n"
245 std::setw(11) << std::setprecision(6) <<
yx() <<
" " <<
246 std::setw(11) << std::setprecision(6) <<
yy() <<
" " <<
247 std::setw(11) << std::setprecision(6) <<
yz() <<
" " <<
248 std::setw(11) << std::setprecision(6) <<
yt() <<
")\n"
250 std::setw(11) << std::setprecision(6) <<
zx() <<
" " <<
251 std::setw(11) << std::setprecision(6) <<
zy() <<
" " <<
252 std::setw(11) << std::setprecision(6) <<
zz() <<
" " <<
253 std::setw(11) << std::setprecision(6) <<
zt() <<
")\n"
255 std::setw(11) << std::setprecision(6) <<
tx() <<
" " <<
256 std::setw(11) << std::setprecision(6) <<
ty() <<
" " <<
257 std::setw(11) << std::setprecision(6) <<
tz() <<
" " <<
258 std::setw(11) << std::setprecision(6) <<
tt() <<
") ]\n";
double operator()(int, int) const
int compare(const HepLorentzRotation &m) const
HepLorentzRotation & boostZ(double beta)
HepLorentzVector row3() const
HepLorentzRotation & rotateY(double delta)
HepLorentzRotation matrixMultiplication(const HepRep4x4 &m) const
HepLorentzVector row1() const
static const HepLorentzRotation IDENTITY
HepLorentzRotation & boostY(double beta)
HepLorentzRotation & boostX(double beta)
HepLorentzRotation & rotateZ(double delta)
HepLorentzVector row2() const
std::ostream & print(std::ostream &os) const
HepLorentzVector row4() const
HepLorentzRotation & rotateX(double delta)
HepLorentzRotation & set(double bx, double by, double bz)
HepLorentzRotation operator*(const HepRotation &r, const HepLorentzRotation <)