How to use 


Put files in some directory

SetDirectory[<<that-directory>>]

<<Range`

this will give you access to all range routines
if you want direct access to all materials data do 

<<ReadData`



Range has following functions: most used will be DeDx and 
Rangecm 

DeDxRaw::usage="DeDxRaw[z,mass,za,momemtum,ion,delta] calculates dedx in MeV/gm/cm2 for
	     particle of mass, charge z, and momentum, material parameters are
             Z/A, mean ionization energy ion in eV, and Sternheimer's delta.
	     currently delta is set to 0. mass is in MeV"
GiveTe::usage="GiveTe[p,M]  returns  the kinetic energy"
GiveE::usage="GiveE[p,M] returns the total energy"
GivePte::usage="GivePte[t,M] returns  the momentum from kinetic energy" 
GiveBeta::usage="GiveBeta[p, m] calculates beta from momentum and mass"
GiveGamma::usage="GiveGamma[b] calculates gamma from beta"
GammaBeta::usage="GammaBeta[b] calculates gamma*beta from beta" 
Tmax::usage="Tmax[p,M] calculates Tmax"

DeDx::usage="DeDx[izm,zm,p,m] gives DeDx in MeV/cm in real material. izm =1 means
             element, izm=/=1 means it is a mixture. zm is the atomic
             number or mixture 
             number, p is momentum in MeV, and m is mass in MeV. charge of the 
             particle is assumed to be +-1. "
Rangecm::usage="Rangecm[izm,zm,p,M] calculates Range in cm of particle of mass M
              and momentum p in MeV/c,
              in material zm (Atomic number if izm=1, else material number) "

ReadData has following stuff


AllZ::usage = "Table of z, name, z/a, ioniz, density values for 92 elements at room temp"
NameZ::usage = "Namez[z] gives name of element z"
ZAratioZ::usage ="ZAratioz[z] gives Z/A for element z"
IonZ::usage ="IonZ[z] gives mean Ionization energy in eV"
DensityZ::usage="DensityZ[z] gives density in gm/cc"

AllMix::usage = "Table of index, name, z/a, ioniz, density, elements, values for 18 substances"
AllStf::usage ="For each mixture, a table of elementals and fraction by mass"
NameM::usage = "NameM[m] gives name of element z"
ZAratioM::usage ="ZAratioM[m] gives Z/A for element z"
IonM::usage ="IonM[m] gives mean Ionization energy in eV"
DensityM::usage="DensityM[m] gives density in gm/cc"
StuffM::usage="StuffM[m] gives the elemental composition of material m"



Notes:   My ranges are slightly shorter than PDG for two reasons 
1) I believe PDG is using restricted energy loss formula; don't understand why ?
2) I have not yet implemented Stermheimer's correction.

Nevertheless, the answers should be good to few percent for 
momentum between 10 MeV and 10 GeV. 

You can calculate mometum from range by doing the following 
FindRoot[<<range>>==Rangecm[...],{p,<<p0>>}] 
It will complain about numerical integrals, but give you 
the correct answer.  

