43static void ZMpvEulerAnglesRep (
const HepEulerAngles & ex,
double array[] ) {
45 register double sinPhi = std::sin( ex.phi() ) , cosPhi = std::cos( ex.phi() );
46 register double sinTheta = std::sin( ex.theta() ), cosTheta = std::cos( ex.theta() );
47 register double sinPsi = std::sin( ex.psi() ) , cosPsi = std::cos( ex.psi() );
49 array[0] = cosPsi * cosPhi - sinPsi * cosTheta * sinPhi;
50 array[1] = cosPsi * sinPhi + sinPsi * cosTheta * cosPhi;
51 array[2] = sinPsi * sinTheta;
53 array[3] = - sinPsi * cosPhi - cosPsi * cosTheta * sinPhi;
54 array[4] = - sinPsi * sinPhi + cosPsi * cosTheta * cosPhi;
55 array[5] = cosPsi * sinTheta;
57 array[6] = sinTheta * sinPhi;
58 array[7] = - sinTheta * cosPhi;
69 ZMpvEulerAnglesRep ( *
this, thisRep );
70 ZMpvEulerAnglesRep ( ex, exRep );
73 for (
int i = 0; i < 9; i++) {
74 sum += thisRep[i] * exRep[i];
78 return (d >= 0) ? d : 0;
85 return distance( ex ) <= epsilon*epsilon ;
102 os <<
"(" << ea.
phi() <<
", " << ea.
theta() <<
", " << ea.
psi() <<
")";
107 double & x,
double & y,
double & z );
114 ea.
set ( thePhi , theTheta , thePsi );
double distance(const HepEulerAngles &ex) const
EA & set(double phi, double theta, double psi)
double howNear(const EA &ea) const
bool isNear(const EA &ea, double epsilon=tolerance) const
std::istream & operator>>(std::istream &is, HepRandom &dist)
void ZMinput3doubles(std::istream &is, const char *type, double &x, double &y, double &z)
std::ostream & operator<<(std::ostream &os, const HepRandom &dist)