#!/usr/bin/perl
#
# Figure out the speed of particles in CERN's Large Hadron Collider
#    assume particles are protons/anti-protons
#
#

$c = 299792458;
$e = 1.6022e-19;
$mp = 1.672623e-27;


$start_v = 0.999;
$end_v = 1.0;
$delta_v = 0.000001;

for ($v = $start_v; $v < $end_v; $v += $delta_v) {

  $gamma = 1.0/(sqrt(1.0 - $v*$v));

  $mom = $mp*$gamma*$v*$c;
  $vms = $v*$c;

  printf " %16.10e  %16.10e   %8.3f  %10.5e \n", $v, $vms, $gamma, $mom;

}


exit 0;
