12#include "CLHEP/Vector/defs.h"
13#include "CLHEP/Vector/LorentzRotation.h"
14#include "CLHEP/Vector/ZMxpv.h"
26 (
double bx,
double by,
double bz) {
27 double bp2 = bx*bx + by*by + bz*bz;
30 "Boost Vector supplied to set HepLorentzRotation represents speed >= c."));
32 double gamma = 1.0 / std::sqrt(1.0 - bp2);
33 double bgamma = gamma * gamma / (1.0 + gamma);
34 mxx = 1.0 + bgamma * bx * bx;
35 myy = 1.0 + bgamma * by * by;
36 mzz = 1.0 + bgamma * bz * bz;
37 mxy =
myx = bgamma * bx * by;
38 mxz =
mzx = bgamma * bx * bz;
39 myz =
mzy = bgamma * by * bz;
67 if (j == 0) {
return xx(); }
68 if (j == 1) {
return xy(); }
69 if (j == 2) {
return xz(); }
70 if (j == 3) {
return xt(); }
72 if (j == 0) {
return yx(); }
73 if (j == 1) {
return yy(); }
74 if (j == 2) {
return yz(); }
75 if (j == 3) {
return yt(); }
77 if (j == 0) {
return zx(); }
78 if (j == 1) {
return zy(); }
79 if (j == 2) {
return zz(); }
80 if (j == 3) {
return zt(); }
82 if (j == 0) {
return tx(); }
83 if (j == 1) {
return ty(); }
84 if (j == 2) {
return tz(); }
85 if (j == 3) {
return tt(); }
87 std::cerr <<
"HepLorentzRotation subscripting: bad indeces "
88 <<
"(" << i <<
"," << j <<
")\n";
98 if (
mtt<m1.
mtt)
return -1;
else if (
mtt>m1.
mtt)
return 1;
99 else if (
mtz<m1.
mtz)
return -1;
else if (
mtz>m1.
mtz)
return 1;
100 else if (
mty<m1.
mty)
return -1;
else if (
mty>m1.
mty)
return 1;
101 else if (
mtx<m1.
mtx)
return -1;
else if (
mtx>m1.
mtx)
return 1;
103 else if (
mzt<m1.
mzt)
return -1;
else if (
mzt>m1.
mzt)
return 1;
104 else if (
mzz<m1.
mzz)
return -1;
else if (
mzz>m1.
mzz)
return 1;
105 else if (
mzy<m1.
mzy)
return -1;
else if (
mzy>m1.
mzy)
return 1;
106 else if (
mzx<m1.
mzx)
return -1;
else if (
mzx>m1.
mzx)
return 1;
108 else if (
myt<m1.
myt)
return -1;
else if (
myt>m1.
myt)
return 1;
109 else if (
myz<m1.
myz)
return -1;
else if (
myz>m1.
myz)
return 1;
110 else if (
myy<m1.
myy)
return -1;
else if (
myy>m1.
myy)
return 1;
111 else if (
myx<m1.
myx)
return -1;
else if (
myx>m1.
myx)
return 1;
113 else if (
mxt<m1.
mxt)
return -1;
else if (
mxt>m1.
mxt)
return 1;
114 else if (
mxz<m1.
mxz)
return -1;
else if (
mxz>m1.
mxz)
return 1;
115 else if (
mxy<m1.
mxy)
return -1;
else if (
mxy>m1.
mxy)
return 1;
116 else if (
mxx<m1.
mxx)
return -1;
else if (
mxx>m1.
mxx)
return 1;
149 double c1 = std::cos (delta);
150 double s1 = std::sin (delta);
161 double c1 = std::cos (delta);
162 double s1 = std::sin (delta);
173 double c1 = std::cos (delta);
174 double s1 = std::sin (delta);
185 double b2 = beta*beta;
188 "Beta supplied to HepLorentzRotation::boostX represents speed >= c."));
190 double g1 = 1.0/std::sqrt(1.0-b2);
202 double b2 = beta*beta;
205 "Beta supplied to HepLorentzRotation::boostY represents speed >= c."));
207 double g1 = 1.0/std::sqrt(1.0-b2);
219 double b2 = beta*beta;
222 "Beta supplied to HepLorentzRotation::boostZ represents speed >= c."));
224 double g1 = 1.0/std::sqrt(1.0-b2);
237 std::setw(11) << std::setprecision(6) <<
xx() <<
" " <<
238 std::setw(11) << std::setprecision(6) <<
xy() <<
" " <<
239 std::setw(11) << std::setprecision(6) <<
xz() <<
" " <<
240 std::setw(11) << std::setprecision(6) <<
xt() <<
")\n"
242 std::setw(11) << std::setprecision(6) <<
yx() <<
" " <<
243 std::setw(11) << std::setprecision(6) <<
yy() <<
" " <<
244 std::setw(11) << std::setprecision(6) <<
yz() <<
" " <<
245 std::setw(11) << std::setprecision(6) <<
yt() <<
")\n"
247 std::setw(11) << std::setprecision(6) <<
zx() <<
" " <<
248 std::setw(11) << std::setprecision(6) <<
zy() <<
" " <<
249 std::setw(11) << std::setprecision(6) <<
zz() <<
" " <<
250 std::setw(11) << std::setprecision(6) <<
zt() <<
")\n"
252 std::setw(11) << std::setprecision(6) <<
tx() <<
" " <<
253 std::setw(11) << std::setprecision(6) <<
ty() <<
" " <<
254 std::setw(11) << std::setprecision(6) <<
tz() <<
" " <<
255 std::setw(11) << std::setprecision(6) <<
tt() <<
") ]\n";
double operator()(int, int) const
static const HepLorentzRotation IDENTITY
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
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)
HepMatrix operator*(const HepMatrix &hm1, const HepDiagMatrix &hm2)