Skip to contents

Create and test for four-momentum

Usage

# S3 method for class '4mom'
Ops(e1, e2)
# S3 method for class '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. Equivalently, one can define four-momentum as \((E/c,p_x,p_y,p_z)\) where \(E\) is the energy and \((p_x,p_y,p_z)\) the three-momentum.

Function vel_to_4mom() converts three-velocity to four-momentum, and function p_to_4mom()) converts a three-momentum to a four-momentum.

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().

Author

Robin K. S. Hankin

See also

Examples


# Define 5 random three velocities:
v <- r3vel(5)

# convert to four-velocity:
as.4vel(v)
#> A vector of four-velocities (speed of light = 1)
#>             t           x          y          z
#> [1,] 1.835939 -1.23707712  0.2450404 -0.8833272
#> [2,] 2.441118  1.76291811 -0.4318849 -1.2902149
#> [3,] 2.981295 -0.77210997  0.7755905 -2.5865857
#> [4,] 2.460798  0.98503180 -0.2912194  2.0001081
#> [5,] 1.504822 -0.09993543  0.9619885 -0.5736542

# Now convert 'v' to four-momentum, specifying rest mass:
vel_to_4mom(v)         # 4mom of five objects with 3vel v, all unit mass
#>             E         p_x        p_y        p_z
#> [1,] 1.835939 -1.23707712  0.2450404 -0.8833272
#> [2,] 2.441118  1.76291811 -0.4318849 -1.2902149
#> [3,] 2.981295 -0.77210997  0.7755905 -2.5865857
#> [4,] 2.460798  0.98503180 -0.2912194  2.0001081
#> [5,] 1.504822 -0.09993543  0.9619885 -0.5736542
vel_to_4mom(v,   1:5)  # 4mom of five objects with 3vel v, masses 1-5
#>             E        p_x        p_y        p_z
#> [1,] 1.835939 -1.2370771  0.2450404 -0.8833272
#> [2,] 4.882237  3.5258362 -0.8637699 -2.5804297
#> [3,] 8.943885 -2.3163299  2.3267714 -7.7597570
#> [4,] 9.843194  3.9401272 -1.1648777  8.0004322
#> [5,] 7.524108 -0.4996771  4.8099427 -2.8682711
vel_to_4mom(v[1],1:5)  # 4mom of five objects with same 3vel, masses 1..5
#>             E       p_x       p_y        p_z
#> [1,] 1.835939 -1.237077 0.2450404 -0.8833272
#> [2,] 3.671878 -2.474154 0.4900808 -1.7666543
#> [3,] 5.507817 -3.711231 0.7351212 -2.6499815
#> [4,] 7.343755 -4.948308 0.9801616 -3.5333086
#> [5,] 9.179694 -6.185386 1.2252021 -4.4166358

# Now convert 'v' to four-momentum, specifying energy E:
p_to_4mom(v,E=1)
#>      E         p_x        p_y        p_z
#> [1,] 1 -0.67381172  0.1334687 -0.4811310
#> [2,] 1  0.72217639 -0.1769209 -0.5285343
#> [3,] 1 -0.25898476  0.2601522 -0.8676047
#> [4,] 1  0.40028952 -0.1183435  0.8127883
#> [5,] 1 -0.06641015  0.6392708 -0.3812108
p_to_4mom(v,E=10)   # slower
#>       E         p_x        p_y        p_z
#> [1,] 10 -0.67381172  0.1334687 -0.4811310
#> [2,] 10  0.72217639 -0.1769209 -0.5285343
#> [3,] 10 -0.25898476  0.2601522 -0.8676047
#> [4,] 10  0.40028952 -0.1183435  0.8127883
#> [5,] 10 -0.06641015  0.6392708 -0.3812108
p_to_4mom(v,E=100)  # even slower
#>        E         p_x        p_y        p_z
#> [1,] 100 -0.67381172  0.1334687 -0.4811310
#> [2,] 100  0.72217639 -0.1769209 -0.5285343
#> [3,] 100 -0.25898476  0.2601522 -0.8676047
#> [4,] 100  0.40028952 -0.1183435  0.8127883
#> [5,] 100 -0.06641015  0.6392708 -0.3812108

# Four-momentum of objects moving closely parallel to the x-axis:
P <- vel_to_4mom(as.3vel(c(0.8,0,0)) + r3vel(7,0.01))

reflect(P)
#>             E       p_x          p_y          p_z
#> [1,] 1.657769 -1.322174  0.001497294  0.007238865
#> [2,] 1.661534 -1.326880 -0.003797467  0.008383520
#> [3,] 1.665422 -1.331740 -0.009449051 -0.003119809
#> [4,] 1.679550 -1.349400 -0.001921251 -0.002040179
#> [5,] 1.655872 -1.319803  0.004857322 -0.003140074
#> [6,] 1.674765 -1.343419  0.007226212  0.003413827
#> [7,] 1.667829 -1.334749 -0.002717993 -0.009589964
reflect(P,c(1,1,1))
#>             E       p_x        p_y        p_z
#> [1,] 1.657769 0.4465488 -0.8771226 -0.8828642
#> [2,] 1.661534 0.4453506 -0.8777315 -0.8899125
#> [3,] 1.665422 0.4355340 -0.8867567 -0.8930860
#> [4,] 1.679550 0.4471589 -0.9003195 -0.9002006
#> [5,] 1.655872 0.4410792 -0.8835812 -0.8755838
#> [6,] 1.674765 0.4548997 -0.8957456 -0.8919332
#> [7,] 1.667829 0.4367110 -0.8953200 -0.8884480

sum(P)
#>             E      p_x         p_y          p_z
#> [1,] 11.66274 9.328164 0.004304934 -0.001146187