9#include "CLHEP/Vector/defs.h"
10#include "CLHEP/Vector/Boost.h"
11#include "CLHEP/Vector/Rotation.h"
12#include "CLHEP/Vector/LorentzRotation.h"
13#include "CLHEP/Vector/ZMxpv.h"
23 double bp2 = bx*bx + by*by + bz*bz;
26 "Boost Vector supplied to set HepBoost represents speed >= c."));
28 double ggamma = 1.0 / std::sqrt(1.0 - bp2);
29 double bgamma = ggamma * ggamma / (1.0 + ggamma);
30 rep_.
xx_ = 1.0 + bgamma * bx * bx;
31 rep_.
yy_ = 1.0 + bgamma * by * by;
32 rep_.
zz_ = 1.0 + bgamma * bz * bz;
49 double length = ddirection.
mag();
52 "Direction supplied to set HepBoost is zero."));
56 set(bbeta*ddirection.
x()/length,
57 bbeta*ddirection.
y()/length,
58 bbeta*ddirection.
z()/length);
63 return set (bboost.
x(), bboost.
y(), bboost.
z());
98 double dr2 = r.
norm2();
107 double dr2 = r1.
norm2();
120 double db2 =
norm2();
121 if (db2 > epsilon*epsilon)
return false;
122 double dr2 = r.
norm2();
123 return (db2+dr2 <= epsilon*epsilon);
127 double epsilon)
const {
132 if (db2 > epsilon*epsilon)
return false;
133 double dr2 = r1.
norm2();
143 return bgx*bgx+bgy*bgy+bgz*bgz;
166 "Attempt to rectify a boost with non-positive gamma."));
171 if ( boost.
mag2() >= 1 ) {
172 boost /= ( boost.
mag() * ( 1.0 + 1.0e-16 ) );
250 os <<
"Lorentz Boost( IDENTITY )";
254 "\n{beta = " <<
beta() <<
" gamma = " <<
gamma() <<
"}\n";
HepBoost & set(double betaX, double betaY, double betaZ)
HepRep4x4Symmetric rep4x4Symmetric() const
void decompose(HepRotation &rotation, HepBoost &boost) const
HepLorentzRotation matrixMultiplication(const HepRep4x4 &m) const
bool isNear(const HepBoost &b, double epsilon=Hep4RotationInterface::tolerance) const
HepLorentzVector operator*(const HepLorentzVector &p) const
double howNear(const HepBoost &b) const
double distance2(const HepBoost &b) const
Hep3Vector boostVector() const
std::ostream & print(std::ostream &os) const
void decompose(Hep3Vector &boost, HepAxisAngle &rotation) const
double norm(const HepGenMatrix &m)