44static void ZMpvEulerAnglesRep (
const HepEulerAngles & ex,
double array[] ) {
46 double sinPhi = std::sin( ex.phi() ) , cosPhi = std::cos( ex.phi() );
47 double sinTheta = std::sin( ex.theta() ), cosTheta = std::cos( ex.theta() );
48 double sinPsi = std::sin( ex.psi() ) , cosPsi = std::cos( ex.psi() );
50 array[0] = cosPsi * cosPhi - sinPsi * cosTheta * sinPhi;
51 array[1] = cosPsi * sinPhi + sinPsi * cosTheta * cosPhi;
52 array[2] = sinPsi * sinTheta;
54 array[3] = - sinPsi * cosPhi - cosPsi * cosTheta * sinPhi;
55 array[4] = - sinPsi * sinPhi + cosPsi * cosTheta * cosPhi;
56 array[5] = cosPsi * sinTheta;
58 array[6] = sinTheta * sinPhi;
59 array[7] = - sinTheta * cosPhi;
70 ZMpvEulerAnglesRep ( *
this, thisRep );
71 ZMpvEulerAnglesRep ( ex, exRep );
74 for (
int i = 0; i < 9; i++) {
75 sum += thisRep[i] * exRep[i];
79 return (d >= 0) ? d : 0;
103 os <<
"(" << ea.
phi() <<
", " << ea.
theta() <<
", " << ea.
psi() <<
")";
108 double & x,
double & y,
double & z );
115 ea.
set ( thePhi , theTheta , thePsi );
G4double epsilon(G4double density, G4double temperature)
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)
void ZMinput3doubles(std::istream &is, const char *type, double &x, double &y, double &z)
std::ostream & operator<<(std::ostream &os, const HepRandom &dist)