10 #pragma implementation
22 double bp2 = bx*bx + by*by + bz*bz;
27 double ggamma = 1.0 / std::sqrt(1.0 - bp2);
28 double bgamma = ggamma * ggamma / (1.0 + ggamma);
29 rep_.
xx_ = 1.0 + bgamma * bx * bx;
30 rep_.
yy_ = 1.0 + bgamma * by * by;
31 rep_.
zz_ = 1.0 + bgamma * bz * bz;
48 double length = ddirection.
mag();
50 std::cerr <<
"HepBoost::set() - "
51 <<
"Direction supplied to set HepBoost is zero." << std::endl;
55 set(bbeta*ddirection.
x()/length,
56 bbeta*ddirection.
y()/length,
57 bbeta*ddirection.
z()/length);
62 return set (bboost.
x(), bboost.
y(), bboost.
z());
97 double dr2 = r.
norm2();
106 double dr2 = r1.
norm2();
119 double db2 =
norm2();
120 if (db2 > epsilon*epsilon)
return false;
121 double dr2 = r.
norm2();
122 return (db2+dr2 <= epsilon*epsilon);
126 double epsilon)
const {
131 if (db2 > epsilon*epsilon)
return false;
132 double dr2 = r1.
norm2();
139 register double bgx =
rep_.
xt_;
140 register double bgy =
rep_.
yt_;
141 register double bgz =
rep_.
zt_;
142 return bgx*bgx+bgy*bgy+bgz*bgz;
163 std::cerr <<
"HepBoost::rectify() - "
164 <<
"Attempt to rectify a boost with non-positive gamma." << std::endl;
169 if ( boost.
mag2() >= 1 ) {
170 boost /= ( boost.
mag() * ( 1.0 + 1.0e-16 ) );
248 os <<
"Lorentz Boost( IDENTITY )";
252 "\n{beta = " <<
beta() <<
" gamma = " <<
gamma() <<
"}\n";