10 #pragma implementation
13 #include "CLHEP/Vector/defs.h"
14 #include "CLHEP/Vector/Boost.h"
15 #include "CLHEP/Vector/Rotation.h"
16 #include "CLHEP/Vector/LorentzRotation.h"
17 #include "CLHEP/Vector/ZMxpv.h"
24 double bp2 = bx*bx + by*by + bz*bz;
27 "Boost Vector supplied to set HepBoost represents speed >= c."));
29 double ggamma = 1.0 / std::sqrt(1.0 - bp2);
30 double bgamma = ggamma * ggamma / (1.0 + ggamma);
31 rep_.
xx_ = 1.0 + bgamma * bx * bx;
32 rep_.
yy_ = 1.0 + bgamma * by * by;
33 rep_.
zz_ = 1.0 + bgamma * bz * bz;
50 double length = ddirection.
mag();
53 "Direction supplied to set HepBoost is zero."));
57 set(bbeta*ddirection.
x()/length,
58 bbeta*ddirection.
y()/length,
59 bbeta*ddirection.
z()/length);
64 return set (bboost.
x(), bboost.
y(), bboost.
z());
99 double dr2 = r.
norm2();
108 double dr2 = r1.
norm2();
121 double db2 =
norm2();
122 if (db2 > epsilon*epsilon)
return false;
123 double dr2 = r.
norm2();
124 return (db2+dr2 <= epsilon*epsilon);
128 double epsilon)
const {
133 if (db2 > epsilon*epsilon)
return false;
134 double dr2 = r1.
norm2();
141 register double bgx =
rep_.
xt_;
142 register double bgy =
rep_.
yt_;
143 register double bgz =
rep_.
zt_;
144 return bgx*bgx+bgy*bgy+bgz*bgz;
167 "Attempt to rectify a boost with non-positive gamma."));
172 if ( boost.
mag2() >= 1 ) {
173 boost /= ( boost.
mag() * ( 1.0 + 1.0e-16 ) );
251 os <<
"Lorentz Boost( IDENTITY )";
255 "\n{beta = " <<
beta() <<
" gamma = " <<
gamma() <<
"}\n";
Hep3Vector boostVector() const
double norm(const HepGenMatrix &m)
void decompose(HepRotation &rotation, HepBoost &boost) const
HepBoost & set(double betaX, double betaY, double betaZ)
std::ostream & print(std::ostream &os) const
bool isNear(const HepBoost &b, double epsilon=Hep4RotationInterface::tolerance) const
HepLorentzVector operator*(const HepLorentzVector &p) const
double distance2(const HepBoost &b) const
HepRep4x4Symmetric rep4x4Symmetric() const
void decompose(Hep3Vector &boost, HepAxisAngle &rotation) const
double howNear(const HepBoost &b) const
HepLorentzRotation matrixMultiplication(const HepRep4x4 &m) const