24#include "CLHEP/Vector/defs.h"
25#include "CLHEP/Vector/EulerAngles.h"
27#include "CLHEP/Vector/ThreeVector.h"
45static void ZMpvEulerAnglesRep (
const HepEulerAngles & ex,
double array[] ) {
47 double sinPhi = std::sin( ex.phi() ) , cosPhi = std::cos( ex.phi() );
48 double sinTheta = std::sin( ex.theta() ), cosTheta = std::cos( ex.theta() );
49 double sinPsi = std::sin( ex.psi() ) , cosPsi = std::cos( ex.psi() );
51 array[0] = cosPsi * cosPhi - sinPsi * cosTheta * sinPhi;
52 array[1] = cosPsi * sinPhi + sinPsi * cosTheta * cosPhi;
53 array[2] = sinPsi * sinTheta;
55 array[3] = - sinPsi * cosPhi - cosPsi * cosTheta * sinPhi;
56 array[4] = - sinPsi * sinPhi + cosPsi * cosTheta * cosPhi;
57 array[5] = cosPsi * sinTheta;
59 array[6] = sinTheta * sinPhi;
60 array[7] = - sinTheta * cosPhi;
71 ZMpvEulerAnglesRep ( *
this, thisRep );
72 ZMpvEulerAnglesRep ( ex, exRep );
75 for (
int i = 0; i < 9; i++) {
76 sum += thisRep[i] * exRep[i];
80 return (d >= 0) ? d : 0;
87 return distance( ex ) <= epsilon*epsilon ;
104 os <<
"(" << ea.
phi() <<
", " << ea.
theta() <<
", " << ea.
psi() <<
")";
109 double & x,
double & y,
double & z );
116 ea.
set ( thePhi , theTheta , thePsi );
static const int ToleranceTicks
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)
std::ostream & operator<<(std::ostream &s, const HepDiagMatrix &q)
void ZMinput3doubles(std::istream &is, const char *type, double &x, double &y, double &z)