Go to the documentation of this file.
14 #pragma implementation
17 #include "CLHEP/Vector/defs.h"
18 #include "CLHEP/Vector/LorentzVector.h"
19 #include "CLHEP/Vector/ZMxpv.h"
32 return vv.rotateX (
phi);
38 return vv.rotateY (
phi);
44 return vv.rotateZ (
phi);
56 double r2 = aaxis.
mag2();
59 "A zero vector used as axis defining a boost -- no boost done"));
62 double b2 = bbeta*bbeta;
65 "LorentzVector boosted with beta >= 1 (speed of light) -- \n"
69 register double ggamma = std::sqrt(1./(1.-b2));
70 register double betaDotV = u.
dot(pp)*bbeta;
71 register double tt =
ee;
73 ee = ggamma * (tt + betaDotV);
74 pp += ( ((ggamma-1)/b2)*betaDotV*bbeta + ggamma*bbeta*tt ) * u;
std::vector< SpaceVector > vv
HepLorentzVector rotationYOf(const HepLorentzVector &vec, double delta)
double dot(const Hep3Vector &) const
Signatures of Hep3Vector::rotate For equivalent ZOOM axis There is no harm in leaving this axis CLHEP has implemented a first forming an identity then rotating that by axis and I leave the CLHEP code alone people are of course free to use the ZOOM originated method with signature which I believe will be faster Return types for rotateZ CLHEP and PhysicsVectors each have these three and they are identical except that the ZOOM version returns a reference to while in CLHEP they return void Having methods that alter an object return a reference to that object is convenient for certain chained and costs nothing I don t wish to potentially break ZOOM user code for no good so I have made these CLHEP method conform to this convention There are a couple of other CLHEP rotate and which use the void return but since these methods or signatures don t appear in the original ZOOM this can t break any so I leave the void return type alone for those After discussion with A P and I have modified the return types of other CLHEP methods which return void and would by the same reasoning be better returning *this These include rotate and boost methods in LorentzVector h HepLorentzVector explicit and leads to division by zero if this vector has ee
we want to make it possible for the user to use the so we provide a few new for double double phi
HepLorentzVector & boost(double, double, double)
HepLorentzVector rotationXOf(const HepLorentzVector &vec, double delta)
it has advantages For I leave the ZMthrows but substitute I replaced ZMthrow with ZMthrowA in this package ZMthrowA
HepLorentzVector rotationZOf(const HepLorentzVector &vec, double delta)