12 #pragma implementation
27 double r1 = axis.
mag();
29 std::cerr <<
"Hep3Vector::rotate() - "
30 <<
"Attempt to rotate around a zero vector axis! " << std::endl;
34 double ux = scale*axis.
getX();
35 double uy = scale*axis.
getY();
36 double uz = scale*axis.
getZ();
37 double cd = std::cos(ddelta);
38 double sd = std::sin(ddelta);
44 {
double ocdux = ocd * ux;
45 rx =
dx * ( cd + ocdux * ux ) +
46 dy * ( ocdux * uy - sd * uz ) +
47 dz * ( ocdux * uz + sd * uy ) ;
50 {
double ocduy = ocd * uy;
51 ry =
dy * ( cd + ocduy * uy ) +
52 dz * ( ocduy * uz - sd * ux ) +
53 dx * ( ocduy * ux + sd * uz ) ;
56 {
double ocduz = ocd * uz;
57 rz =
dz * ( cd + ocduz * uz ) +
58 dx * ( ocduz * ux - sd * uy ) +
59 dy * ( ocduz * uy + sd * ux ) ;
82 double sinPhi = std::sin( phi1 ), cosPhi = std::cos( phi1 );
83 double sinTheta = std::sin( theta1 ), cosTheta1 = std::cos( theta1 );
84 double sinPsi = std::sin( psi1 ), cosPsi = std::cos( psi1 );
86 rx = (cosPsi * cosPhi - cosTheta1 * sinPsi * sinPhi) *
dx +
87 (cosPsi * sinPhi + cosTheta1 * sinPsi * cosPhi) *
dy +
88 (sinPsi * sinTheta) *
dz ;
90 ry = (- sinPsi * cosPhi - cosTheta1 * cosPsi * sinPhi) *
dx +
91 (- sinPsi * sinPhi + cosTheta1 * cosPsi * cosPhi) *
dy +
92 (cosPsi * sinTheta) *
dz ;
94 rz = (sinTheta * sinPhi) *
dx +
95 (- sinTheta * cosPhi) *
dy +
135 return vv.
rotate(axis, ddelta);
144 double phi,
double theta,
double psi) {
146 return vv.
rotate(phi, theta, psi);
Hep3Vector & rotateX(double)
HepLorentzVector rotationXOf(const HepLorentzVector &vec, double delta)
HepLorentzVector rotationYOf(const HepLorentzVector &vec, double delta)
HepLorentzVector rotationZOf(const HepLorentzVector &vec, double delta)
Hep3Vector & rotate(double, const Hep3Vector &)
HepLorentzVector rotationOf(const HepLorentzVector &vec, const Hep3Vector &axis, double delta)
Hep3Vector & rotateZ(double)
Hep3Vector getAxis() const
Hep3Vector & rotateY(double)