lorentz (version 1.0-2)

4mom: Four momentum

Description

Create and test for four-momentum

Usage

# S3 method for 4mom
Ops(e1, e2)
# S3 method for 4mom
sum(..., na.rm=FALSE)
vel_to_4mom(U,m=1)
p_to_4mom(p,E=1)
as.4mom(x)
is.4mom(x)
fourmom_mult(P,n)
fourmom_add(e1,e2)

Arguments

x,P,e1,e2

Four-momentum

p

Three-momentum

E

Scalar; energy

U

Object coerced to four-velocity

m

Scalar; rest mass

n

Multiplying factor

...,na.rm

Arguments sent to sum()

Details

Four-momentum is a relativistic generalization of three-momentum, with the object's energy as the first element. It can be defined as \(mU\), where \(m\) is the rest mass and \(U\), the four-velocity (use vel_to_4mom()), or \((E/c,p_x,p_y,p_z)\) where \(E\) is the energy and \((p_x,p_y,p_z)\) the three-momentum (p_to_4mom()).

The function Ops.4mom() passes unary and binary arithmetic operators “+”, “-” and “*” to the appropriate specialist function.

The package is designed so that natural R idiom may be used for physically meaningful operations such as combining momenta of different objects, using the conservation of four-momentum.

For the four-momentum of a photon, use as.photon().

See Also

boost,as.photon

Examples

Run this code
# NOT RUN {

o <- r4vel(5)

vel_to_4mom(o)         # five objects, random velocities, all unit mass
vel_to_4mom(o,   1:5)  # five objects with identical 4vel, masses 1..5
vel_to_4mom(o[1],1:5)  # five objects with random velocities, masses 1..5


p3 <- r3vel(5)
p_to_4mom(p3,E=1)
p_to_4mom(p3,E=10)   # slower
p_to_4mom(p3,E=100)  # even slower

P <- vel_to_4mom(as.3vel(c(0.8,0,0)) + r3vel(7,0.01))

reflect(P)
reflect(P,c(1,1,1))

sum(P)

# }

Run the code above in your browser using DataCamp Workspace