22static inline double safe_acos (
double x) {
23 if (std::abs(x) <= 1.0)
return std::acos(x);
24 return ( (x>0) ? 0 : CLHEP::pi );
28 its_d(proper(ddelta)), its_s(std::sin(ddelta)), its_c(std::cos(ddelta))
41 }
else if ( (
its_d < 0) || (
its_d == CLHEP::pi) ) {
42 return +CLHEP::halfpi;
44 return -CLHEP::halfpi;
49 return std::fabs(
its_d );
55 }
else if ( (
its_d < 0) || (
its_d == CLHEP::pi) ) {
56 return -CLHEP::halfpi;
58 return +CLHEP::halfpi;
75 return (
yx() == 0.0 &&
xx() == 0.0) ? 0.0 : std::atan2(
yx(),
xx());
80 return (
yy() == 0.0 &&
xy() == 0.0) ? 0.0 : std::atan2(
yy(),
xy());
85 return (
yz() == 0.0 &&
xz() == 0.0) ? 0.0 : std::atan2(
yz(),
xz());
90 return safe_acos(
zx());
94 return safe_acos(
zy());
99 return safe_acos(
zz());
133 return (answer >= 0) ? answer : 0;
137 double sum =
xx() * r.
xx() +
xz() * r.
xz()
140 double answer = 3.0 - sum;
141 return (answer >= 0 ) ? answer : 0;
148 double bet = b.
beta();
149 double bet2 = bet*bet;
185 return 2.0 - 2.0 *
its_c;
189 os <<
"\nRotation about Y (" <<
its_d <<
190 ") [cos d = " <<
its_c <<
" sin d = " <<
its_s <<
"]\n";
double epsilon(double density, double temperature)
void set(double x, double y, double z)
HepBoost & set(double betaX, double betaY, double betaZ)
void decompose(Hep3Vector &boost, HepAxisAngle &rotation) const
void setDelta(double delta)
static double proper(double delta)
bool isNear(const HepRotationY &r, double epsilon=Hep4RotationInterface::tolerance) const
double howNear(const HepRotationY &r) const
void decompose(HepAxisAngle &rotation, Hep3Vector &boost) const
HepRotationY & set(double delta)
HepAxisAngle axisAngle() const
double distance2(const HepRotationY &r) const
std::ostream & print(std::ostream &os) const
HepEulerAngles eulerAngles() const