11#include "CLHEP/Vector/defs.h"
12#include "CLHEP/Vector/ThreeVector.h"
13#include "CLHEP/Vector/AxisAngle.h"
14#include "CLHEP/Vector/EulerAngles.h"
15#include "CLHEP/Vector/ZMxpv.h"
28 double r1 = axis.
mag();
31 "Attempt to rotate around a zero vector axis! "));
35 double ux = scale*axis.
getX();
36 double uy = scale*axis.
getY();
37 double uz = scale*axis.
getZ();
38 double cd = std::cos(ddelta);
39 double sd = std::sin(ddelta);
45 {
double ocdux = ocd * ux;
46 rx =
x() * ( cd + ocdux * ux ) +
47 y() * ( ocdux * uy - sd * uz ) +
48 z() * ( ocdux * uz + sd * uy ) ;
51 {
double ocduy = ocd * uy;
52 ry =
y() * ( cd + ocduy * uy ) +
53 z() * ( ocduy * uz - sd * ux ) +
54 x() * ( ocduy * ux + sd * uz ) ;
57 {
double ocduz = ocd * uz;
58 rz =
z() * ( cd + ocduz * uz ) +
59 x() * ( ocduz * ux - sd * uy ) +
60 y() * ( ocduz * uy + sd * ux ) ;
81 double sinPhi = std::sin( phi1 ), cosPhi = std::cos( phi1 );
82 double sinTheta = std::sin( theta1 ), cosTheta1 = std::cos( theta1 );
83 double sinPsi = std::sin( psi1 ), cosPsi = std::cos( psi1 );
85 rx = (cosPsi * cosPhi - cosTheta1 * sinPsi * sinPhi) *
x() +
86 (cosPsi * sinPhi + cosTheta1 * sinPsi * cosPhi) *
y() +
87 (sinPsi * sinTheta) *
z() ;
89 ry = (- sinPsi * cosPhi - cosTheta1 * cosPsi * sinPhi) *
x() +
90 (- sinPsi * sinPhi + cosTheta1 * cosPsi * cosPhi) *
y() +
91 (cosPsi * sinTheta) *
z() ;
93 rz = (sinTheta * sinPhi) *
x() +
94 (- sinTheta * cosPhi) *
y() +
132 return vv.
rotate(axis, ddelta);
141 double phi,
double theta,
double psi) {
143 return vv.
rotate(phi, theta, psi);
Hep3Vector & rotateY(double)
Hep3Vector & rotateX(double)
Hep3Vector & rotateZ(double)
void set(double x, double y, double z)
Hep3Vector & rotate(double, const Hep3Vector &)
Hep3Vector getAxis() const
HepLorentzVector rotationZOf(const HepLorentzVector &vec, double phi)
HepLorentzVector rotationOf(const HepLorentzVector &vec, const Hep3Vector &aaxis, double ddelta)
HepLorentzVector rotationYOf(const HepLorentzVector &vec, double phi)
HepLorentzVector rotationXOf(const HepLorentzVector &vec, double phi)