10#include "CLHEP/Vector/defs.h"
11#include "CLHEP/Vector/RotationX.h"
12#include "CLHEP/Vector/AxisAngle.h"
13#include "CLHEP/Vector/EulerAngles.h"
14#include "CLHEP/Vector/LorentzRotation.h"
15#include "CLHEP/Units/PhysicalConstants.h"
23static inline double safe_acos (
double x) {
24 if (std::abs(x) <= 1.0)
return std::acos(x);
25 return ( (x>0) ? 0 : CLHEP::pi );
29 its_d(proper(ddelta)), its_s(std::sin(ddelta)), its_c(std::cos(ddelta))
48 return std::fabs(
its_d );
72 return (
yx() == 0.0 &&
xx() == 0.0) ? 0.0 : std::atan2(
yx(),
xx());
77 return (
yy() == 0.0 &&
xy() == 0.0) ? 0.0 : std::atan2(
yy(),
xy());
82 return (
yz() == 0.0 &&
xz() == 0.0) ? 0.0 : std::atan2(
yz(),
xz());
87 return safe_acos(
zx());
92 return safe_acos(
zy());
96 return safe_acos(
zz());
130 return (answer >= 0) ? answer : 0;
134 double sum = r.
xx() +
137 double answer = 3.0 - sum;
138 return (answer >= 0 ) ? answer : 0;
145 double bet = b.
beta();
146 double bet2 = bet*bet;
168 return (
distance2(r) <= epsilon*epsilon);
171 return (
distance2(r) <= epsilon*epsilon);
174 return (
distance2(lt) <= epsilon*epsilon);
178 double epsilon )
const {
179 return (
distance2(lt) <= epsilon*epsilon);
183 return 2.0 - 2.0 *
its_c;
187 os <<
"\nRotation about X (" <<
its_d <<
188 ") [cos d = " <<
its_c <<
" sin d = " <<
its_s <<
"]\n";
void set(double x, double y, double z)
HepBoost & set(double betaX, double betaY, double betaZ)
void decompose(Hep3Vector &boost, HepAxisAngle &rotation) const
static double proper(double delta)
HepRotationX & set(double delta)
HepEulerAngles eulerAngles() const
double howNear(const HepRotationX &r) const
void setDelta(double delta)
void decompose(HepAxisAngle &rotation, Hep3Vector &boost) const
HepAxisAngle axisAngle() const
std::ostream & print(std::ostream &os) const
bool isNear(const HepRotationX &r, double epsilon=Hep4RotationInterface::tolerance) const
double distance2(const HepRotationX &r) const