26 double r1 = axis.
mag();
28 std::cerr <<
"Hep3Vector::rotate() - "
29 <<
"Attempt to rotate around a zero vector axis! " << std::endl;
33 double ux = scale*axis.
getX();
34 double uy = scale*axis.
getY();
35 double uz = scale*axis.
getZ();
36 double cd = std::cos(ddelta);
37 double sd = std::sin(ddelta);
43 {
double ocdux = ocd * ux;
44 rx =
x() * ( cd + ocdux * ux ) +
45 y() * ( ocdux * uy - sd * uz ) +
46 z() * ( ocdux * uz + sd * uy ) ;
49 {
double ocduy = ocd * uy;
50 ry =
y() * ( cd + ocduy * uy ) +
51 z() * ( ocduy * uz - sd * ux ) +
52 x() * ( ocduy * ux + sd * uz ) ;
55 {
double ocduz = ocd * uz;
56 rz =
z() * ( cd + ocduz * uz ) +
57 x() * ( ocduz * ux - sd * uy ) +
58 y() * ( ocduz * uy + sd * ux ) ;
79 double sinPhi = std::sin( phi1 ), cosPhi = std::cos( phi1 );
80 double sinTheta = std::sin( theta1 ), cosTheta1 = std::cos( theta1 );
81 double sinPsi = std::sin( psi1 ), cosPsi = std::cos( psi1 );
83 rx = (cosPsi * cosPhi - cosTheta1 * sinPsi * sinPhi) *
x() +
84 (cosPsi * sinPhi + cosTheta1 * sinPsi * cosPhi) *
y() +
85 (sinPsi * sinTheta) *
z() ;
87 ry = (- sinPsi * cosPhi - cosTheta1 * cosPsi * sinPhi) *
x() +
88 (- sinPsi * sinPhi + cosTheta1 * cosPsi * cosPhi) *
y() +
89 (cosPsi * sinTheta) *
z() ;
91 rz = (sinTheta * sinPhi) *
x() +
92 (- sinTheta * cosPhi) *
y() +