24static void ZMpvAxisAngleRep(
const HepAxisAngle & aa,
double array[] ) {
26 double sinDelta = std::sin( aa.delta() );
27 double cosDelta = std::cos( aa.delta() );
28 double oneMinusCosDelta = 1.0 - cosDelta;
30 double uX = aa.getAxis().getX();
31 double uY = aa.getAxis().getY();
32 double uZ = aa.getAxis().getZ();
34 array[0] = oneMinusCosDelta * uX * uX + cosDelta;
35 array[1] = oneMinusCosDelta * uX * uY - sinDelta * uZ;
36 array[2] = oneMinusCosDelta * uX * uZ + sinDelta * uY;
38 array[3] = oneMinusCosDelta * uY * uX + sinDelta * uZ;
39 array[4] = oneMinusCosDelta * uY * uY + cosDelta;
40 array[5] = oneMinusCosDelta * uY * uZ - sinDelta * uX;
42 array[6] = oneMinusCosDelta * uZ * uX - sinDelta * uY;
43 array[7] = oneMinusCosDelta * uZ * uY + sinDelta * uX;
44 array[8] = oneMinusCosDelta * uZ * uZ + cosDelta;
54 ZMpvAxisAngleRep( *
this, thisRep );
55 ZMpvAxisAngleRep( aa, aaRep );
58 for (
int i = 0; i < 9; i++ ) {
59 sum += thisRep[i] * aaRep[i];
63 return (d >= 0) ? d : 0;
90 os <<
'(' << aa.
axis() <<
", " << aa.
delta() <<
')';
96 double & x,
double & y,
double & z,
105 aa.
set ( axis, delta );
double epsilon(double density, double temperature)
void set(double x, double y, double z)
bool isNear(const AA &aa, Scalar epsilon=tolerance) const
double distance(const HepAxisAngle &aa) const
double howNear(const AA &aa) const
AA & set(const Hep3Vector axis, Scalar delta)
std::istream & operator>>(std::istream &is, HepRandom &dist)
void ZMinputAxisAngle(std::istream &is, double &x, double &y, double &z, double &delta)
std::ostream & operator<<(std::ostream &os, const HepRandom &dist)