Four-Vectors
The Vec4
class gives an implementation of four-vectors.
The member function names are based on the assumption that these
represent momentum vectors. Thus one can get or set
px()
, py()
, pz()
and
()e
, but not x, y, z or t. (When
production vertices are defined in the particle class, this is
partly circumvented by new methods that hide a Vec4
.)
Derived quantities like the pT()
, the pAbs()
,
and the theta()
and phi()
angles
may be read out. The names should be self-explanatory, so we refer
to the header class.
A set of overloaded operators are defined for four-vectors, so that
one may naturally add, subtract, multiply or divide four-vectors with
each other or with double numbers, for all the cases that are
meaningful.
The Particle
object contains a Vec4 p
that
stores the particle four-momentum, and another Vec4 vProd
for the production vertex. Therefore a user would not normally access the
Vec4
class directly, but by using the similarly-named methods
of the Particle
class. (The latter also stores the particle mass
separately, offering an element of redundancy, helpful in avoiding some
roundoff errors.) However, for simple analysis tasks it may be convenient
to use Vec4
, e.g., to define the four-vector sum of a set of
particles.
Simple rotations and boosts of the four-vectors are easily obtained
with member functions. For a longer sequence of rotations and boosts,
and where several Vec4
are involved for the same set of
operations, a more efficient approach is to define a
RotBstMatrix
, which forms a separate auxiliary class.
This matrix can be built up from the successive set of operations to be
performed and, once defined, it can be applied on as many
Vec4
as required.