11 #pragma implementation
14 #include "CLHEP/Vector/defs.h"
15 #include "CLHEP/Vector/RotationZ.h"
16 #include "CLHEP/Vector/AxisAngle.h"
17 #include "CLHEP/Vector/EulerAngles.h"
18 #include "CLHEP/Vector/LorentzRotation.h"
19 #include "CLHEP/Units/PhysicalConstants.h"
27 static inline double safe_acos (
double x) {
28 if (std::abs(x) <= 1.0)
return std::acos(x);
29 return ( (x>0) ? 0 : CLHEP::pi );
33 its_d(proper(dddelta)), its_s(std::sin(dddelta)), its_c(std::cos(dddelta))
68 return (
yx() == 0.0 &&
xx() == 0.0) ? 0.0 : std::atan2(
yx(),
xx());
73 return (
yy() == 0.0 &&
xy() == 0.0) ? 0.0 : std::atan2(
yy(),
xy());
77 return (
yz() == 0.0 &&
xz() == 0.0) ? 0.0 : std::atan2(
yz(),
xz());
82 return safe_acos(
zx());
87 return safe_acos(
zy());
92 return safe_acos(
zz());
103 rotation = axisAngle();
109 rotation = axisAngle();
126 return (answer >= 0) ? answer : 0;
130 double sum =
xx() * r.
xx() +
xy() * r.
xy()
133 double answer = 3.0 - sum;
134 return (answer >= 0 ) ? answer : 0;
141 double bet = b.
beta();
142 double bet2 = bet*bet;
164 return (
distance2(r) <= epsilon*epsilon);
167 return (
distance2(r) <= epsilon*epsilon);
170 return (
distance2(lt) <= epsilon*epsilon);
173 double epsilon)
const {
174 return (
distance2(lt) <= epsilon*epsilon);
178 return 2.0 - 2.0 *
its_c;
182 os <<
"\nRotation about Z (" <<
its_d <<
183 ") [cos d = " <<
its_c <<
" sin d = " <<
its_s <<
"]\n";