Rigidity to Energy Conversion

Most people find rigidity a difficult concept to visualize. Rigidity is
a canonical coordinate and the path of every particle having the same
rigidity (independent of the atomic number or atomic charge) is
identical. For this reason we have included a subroutine named AZRGEG
that will perform rigidity energy to conversion (and vice-versa) for any
element or isotope. The next two pages contain tables for rigidity to
energy conversion. These tables are followed by the documentation for
subroutine AZRGEG.

We have prepared two sample programs using this subroutine AZRGEG. The
program ERG_RIG is an illustration of rigidity to energy rigidity
conversion for a ^16^O~8~ nuclei. Almost all elements (other than
hydrogen) have a mass/charge ratio of approximately two. The program
RIG_ERG is an illustration of energy to rigidity conversion for protons.
We have entered the output files into a word processor and generated a
one-page printout for each program. Then the two FORTRAN demonstration
program listings follow.

^16^O~8~ nuclei

Rigidity Energy

\(MV\) (MeV/Nuc)

86.3 1.000

122.1 2.000

149.6 3.000

172.8 4.000

193.3 5.000

211.8 6.000

228.8 7.000

244.6 8.000

259.5 9.000

273.7 10.000

287.1 11.000

299.9 12.000

312.3 13.000

324.1 14.000

335.6 15.000

346.7 16.000

357.5 17.000

367.9 18.000

378.1 19.000

388.0 20.000

397.7 21.000

407.2 22.000

416.5 23.000

425.5 24.000

434.4 25.000

443.1 26.000

451.7 27.000

460.1 28.000

468.4 29.000

476.5 30.000

484.5 31.000

492.4 32.000

500.2 33.000

507.8 34.000

515.4 35.000

522.8 36.000

530.2 37.000

537.4 38.000

544.6 39.000

551.7 40.000

558.7 41.000

565.6 42.000

572.5 43.000

579.2 44.000

585.9 45.000

592.6 46.000

599.1 47.000

605.6 48.000

612.1 49.000

618.4 50.000

624.7 51.000

631.0 52.000

637.2 53.000

643.4 54.000

649.5 55.000

655.5 56.000

661.5 57.000

667.5 58.000

673.4 59.000

679.2 60.000

685.0 61.000

690.8 62.000

696.5 63.000

702.2 64.000

707.9 65.000

713.5 66.000

719.1 67.000

724.6 68.000

730.1 69.000

735.6 70.000

^16^O~8~ nuclei

Rigidity Energy

\(MV\) (MeV/Nuc)

741.0 71.000

746.4 72.000

751.7 73.000

757.1 74.000

762.4 75.000

767.6 76.000

772.9 77.000

778.1 78.000

783.2 79.000

788.4 80.000

793.5 81.000

798.6 82.000

803.6 83.000

808.7 84.000

813.7 85.000

818.7 86.000

823.6 87.000

828.6 88.000

833.5 89.000

838.3 90.000

843.2 91.000

848.0 92.000

852.9 93.000

857.6 94.000

862.4 95.000

867.2 96.000

871.9 97.000

876.6 98.000

881.3 99.000

886.0 100.000

931.6 110.000

975.4 120.000

1017.8 130.000

1058.9 140.000

1098.8 150.000

1137.7 160.000

1175.6 170.000

1212.6 180.000

1248.9 190.000

1284.5 200.000

1319.4 210.000

1353.7 220.000

1387.4 230.000

1420.6 240.000

1453.4 250.000

1485.7 260.000

1517.5 270.000

1549.0 280.000

1580.1 290.000

1610.8 300.000

1641.2 310.000

1671.3 320.000

1701.1 330.000

1730.6 340.000

1759.9 350.000

1788.9 360.000

1817.6 370.000

1846.1 380.000

1874.4 390.000

1902.5 400.000

1930.4 410.000

1958.1 420.000

1985.6 430.000

2013.0 440.000

2040.1 450.000

2067.1 460.000

2094.0 470.000

2120.7 480.000

2147.2 490.000

2173.6 500.000

^16^O~8~ nuclei

Rigidity Energy

\(MV\) (MeV/Nuc)

2199.9 510.000

2226.0 520.000

2252.0 530.000

2277.9 540.000

2303.7 550.000

2329.4 560.000

2354.9 570.000

2380.4 580.000

2405.7 590.000

2430.9 600.000

2456.1 610.000

2481.1 620.000

2506.1 630.000

2531.0 640.000

2555.8 650.000

2580.5 660.000

2605.1 670.000

2629.6 680.000

2654.1 690.000

2678.5 700.000

2702.8 710.000

2727.1 720.000

2751.3 730.000

2775.4 740.000

2799.4 750.000

2823.4 760.000

2847.4 770.000

2871.2 780.000

2895.0 790.000

2918.8 800.000

2942.5 810.000

2966.1 820.000

2989.7 830.000

3013.2 840.000

3036.7 850.000

3060.2 860.000

3083.6 870.000

3106.9 880.000

3130.2 890.000

3153.4 900.000

3176.7 910.000

3199.8 920.000

3222.9 930.000

3246.0 940.000

3269.0 950.000

3292.0 960.000

3315.0 970.000

3337.9 980.000

3360.8 990.000

3383.7 1000.000

3610.3 1100.000

3833.9 1200.000

4055.1 1300.000

4274.2 1400.000

4491.5 1500.000

4707.3 1600.000

4921.7 1700.000

5135.0 1800.000

5347.3 1900.000

5558.6 2000.000

5769.2 2100.000

5979.0 2200.000

6188.1 2300.000

6396.7 2400.000

6604.8 2500.000

6812.3 2600.000

7019.4 2700.000

7226.2 2800.000

7432.5 2900.000

7638.5 3000.000

^16^O~8~ nuclei

Rigidity Energy

\(MV\) (MeV/Nuc)

7844.3 3100.000

8049.7 3200.000

8254.8 3300.000

8459.7 3400.000

8664.4 3500.000

8868.9 3600.000

9073.1 3700.000

9277.2 3800.000

9481.1 3900.000

9684.9 4000.000

9888.4 4100.000

10091.9 4200.000

10295.2 4300.000

10498.4 4400.000

10701.5 4500.000

10904.4 4600.000

11107.2 4700.000

11310.0 4800.000

11512.6 4900.000

11715.2 5000.000

11917.7 5100.000

12120.0 5200.000

12322.4 5300.000

12524.6 5400.000

12726.8 5500.000

12928.8 5600.000

13130.9 5700.000

13332.9 5800.000

13534.8 5900.000

13736.6 6000.000

13938.4 6100.000

14140.2 6200.000

14341.9 6300.000

14543.5 6400.000

14745.1 6500.000

14946.7 6600.000

15148.2 6700.000

15349.7 6800.000

15551.2 6900.000

15752.6 7000.000

15954.0 7100.000

16155.3 7200.000

16356.6 7300.000

16557.9 7400.000

16759.1 7500.000

16960.3 7600.000

17161.5 7700.000

17362.7 7800.000

17563.8 7900.000

17764.9 8000.000

17966.0 8100.000

18167.1 8200.000

18368.1 8300.000

18569.1 8400.000

18770.1 8500.000

18971.1 8600.000

19172.0 8700.000

19373.0 8800.000

19573.9 8900.000

19774.8 9000.000

19975.7 9100.000

20176.5 9200.000

20377.4 9300.000

20578.2 9400.000

20779.0 9500.000

20979.8 9600.000

21180.6 9700.000

21381.3 9800.000

21582.1 9900.000

21782.8 10000.000

PROTON

Rigidity Energy

\(MV\) (MeV)

1.0 0.001

2.0 0.002

3.0 0.005

4.0 0.009

5.0 0.013

6.0 0.019

7.0 0.026

8.0 0.034

9.0 0.043

10.0 0.053

11.0 0.064

12.0 0.077

13.0 0.090

14.0 0.104

15.0 0.120

16.0 0.136

17.0 0.154

18.0 0.173

19.0 0.192

20.0 0.213

21.0 0.235

22.0 0.258

23.0 0.282

24.0 0.307

25.0 0.333

26.0 0.360

27.0 0.388

28.0 0.417

29.0 0.448

30.0 0.479

31.0 0.512

32.0 0.545

33.0 0.580

34.0 0.616

35.0 0.652

36.0 0.690

37.0 0.729

38.0 0.769

39.0 0.810

40.0 0.852

41.0 0.895

42.0 0.939

43.0 0.984

44.0 1.031

45.0 1.078

46.0 1.126

47.0 1.176

48.0 1.226

49.0 1.278

50.0 1.331

51.0 1.384

52.0 1.439

53.0 1.495

54.0 1.552

55.0 1.610

56.0 1.669

57.0 1.729

58.0 1.790

59.0 1.852

60.0 1.916

61.0 1.980

62.0 2.045

63.0 2.112

64.0 2.179

65.0 2.248

66.0 2.317

67.0 2.388

68.0 2.460

69.0 2.532

70.0 2.606

PROTON

Rigidity Energy

\(MV\) (MeV)

71.0 2.681

72.0 2.757

73.0 2.834

74.0 2.912

75.0 2.991

76.0 3.071

77.0 3.153

78.0 3.235

79.0 3.318

80.0 3.403

81.0 3.488

82.0 3.575

83.0 3.662

84.0 3.751

85.0 3.840

86.0 3.931

87.0 4.023

88.0 4.116

89.0 4.210

90.0 4.304

91.0 4.400

92.0 4.497

93.0 4.596

94.0 4.695

95.0 4.795

96.0 4.896

97.0 4.998

98.0 5.102

99.0 5.206

100.0 5.311

110.0 6.423

120.0 7.639

130.0 8.959

140.0 10.382

150.0 11.909

160.0 13.538

170.0 15.269

180.0 17.102

190.0 19.035

200.0 21.069

210.0 23.203

220.0 25.435

230.0 27.766

240.0 30.194

250.0 32.720

260.0 35.341

270.0 38.058

280.0 40.869

290.0 43.774

300.0 46.772

310.0 49.862

320.0 53.043

330.0 56.315

340.0 59.676

350.0 63.126

360.0 66.663

370.0 70.287

380.0 73.996

390.0 77.791

400.0 81.669

410.0 85.631

420.0 89.674

430.0 93.798

440.0 98.003

450.0 102.286

460.0 106.648

470.0 111.087

480.0 115.602

490.0 120.192

500.0 124.856

PROTON

Rigidity Energy

\(MV\) (MeV)

510.0 129.594

520.0 134.403

530.0 139.285

550.0 149.257

560.0 154.346

570.0 159.503

580.0 164.726

590.0 170.015

600.0 175.369

610.0 180.786

620.0 186.266

630.0 191.808

640.0 197.411

650.0 203.074

660.0 208.796

670.0 214.577

680.0 220.415

690.0 226.309

700.0 232.259

710.0 238.265

720.0 244.324

730.0 250.436

740.0 256.601

750.0 262.818

760.0 269.085

770.0 275.402

780.0 281.769

790.0 288.184

800.0 294.646

810.0 301.156

820.0 307.712

830.0 314.313

840.0 320.959

850.0 327.650

860.0 334.383

870.0 341.160

880.0 347.978

890.0 354.838

900.0 361.738

910.0 368.679

920.0 375.659

930.0 382.677

940.0 389.734

950.0 396.829

960.0 403.961

970.0 411.128

980.0 418.332

990.0 425.571

1000.0 432.845

1100.0 507.375

1200.0 584.825

1300.0 664.773

1400.0 746.862

1500.0 830.796

1600.0 916.323

1700.0 1003.234

1800.0 1091.350

1900.0 1180.521

2000.0 1270.620

2100.0 1361.537

2200.0 1453.179

2300.0 1545.466

2400.0 1638.328

2500.0 1731.706

2600.0 1825.548

2700.0 1919.807

2800.0 2014.443

2900.0 2109.423

3000.0 2204.713

3100.0 2300.288

PROTON

Rigidity Energy

\(MV\) (MeV)

3200.0 2396.122

3300.0 2492.194

3400.0 2588.484

3500.0 2684.975

3600.0 2781.652

3700.0 2878.500

3800.0 2975.506

3900.0 3072.659

4000.0 3169.949

4100.0 3267.366

4200.0 3364.902

4300.0 3462.548

4400.0 3560.297

4500.0 3658.144

4600.0 3756.081

4700.0 3854.103

4800.0 3952.206

4900.0 4050.383

5000.0 4148.632

5100.0 4246.948

5200.0 4345.327

5300.0 4443.765

5400.0 4542.261

5500.0 4640.809

5600.0 4739.409

5700.0 4838.056

5800.0 4936.750

5900.0 5035.486

6000.0 5134.265

6100.0 5233.082

6200.0 5331.937

6300.0 5430.828

6400.0 5529.753

6500.0 5628.710

6600.0 5727.698

6700.0 5826.717

6800.0 5925.763

6900.0 6024.837

7000.0 6123.938

7100.0 6223.063

7200.0 6322.212

7300.0 6421.384

7400.0 6520.578

7500.0 6619.793

7600.0 6719.029

7700.0 6818.285

7800.0 6917.559

7900.0 7016.852

8000.0 7116.162

8100.0 7215.489

8200.0 7314.832

8300.0 7414.191

8400.0 7513.565

8500.0 7612.953

8600.0 7712.356

8700.0 7811.772

8800.0 7911.202

8900.0 8010.644

9000.0 8110.098

9100.0 8209.565

9200.0 8309.042

9300.0 8408.531

9400.0 8508.031

9500.0 8607.541

9600.0 8707.062

9700.0 8806.592

9800.0 8906.132

9900.0 9005.680

10000.0 9105.238

Subroutine AZRGEG (NA, NZ, PAMU, RIGIN, EPN, BETA)

This is a subroutine for rigidity to energy conversion and vice-versa

Input arguments:

NA Integer atomic number

NZ Integer atomic charge

PAMU Physical mass unit of element (or isotope)

Utility arguments

RIGIN Rigidity in MV

EPN Energy per nucleon in MeV

Return Arguments

BETA Particle speed as a fraction of light speed (v/c)

Labeled Common arguments: none

Dimensioned Variables none

Data files: none

Operation:

When the subroutine is called it can do either a rigidity-to-energy
conversion or an energy-to-rigidity conversion. If the variable RIGIN is
positive, then the conversion is rigidity-to-energy and the output
energy is in the variable EPN. If the variable RIGIN is initially set to
zero or a negative value, then the conversion is energy-to-rigidity. The
value RIGIN is replaced with the appropriate rigidity value for the
energy specified in the variable EPN. The subroutine will work for any
element or isotope. It is necessary to specify the atomic number, the
atomic charge and the atomic mass in physical mass units. If these
values are not specifically provided, the program will default to the
values appropriate for protons. The variable RIGIN must be in the
rigidity unit MV. The variable EPN (energy per nucleon) will be in MeV.

When called with the proper arguments, the software first tests the
value of the variable RIGIN to determine which conversion to perform.
The total kinetic energy of the particle is computed. The next step is
to compute the relativistic gamma. (The relativistic gamma factor is a
\"natural unit\" used in high-energy physics that is the ratio of the
particle kinetic energy to rest mass energy.) From the relativistic
gamma factor, either energy or rigidity can be computed. The particle
speed BETA can also be computed from the relativistic gamma factor. The
particle speed BETA is returned as an argument since it is useful in
many conversions such as differential flux in terms of energy or
rigidity.

program ERG_RIG

c\...\.....+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+..

c Energy to Rigidity conversion example

c\...\.....+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+..

c \\/ Example of the use of the Energy to Rigidity conversion program

c Convert geomagnetic cutoff rigidity to proton cutoff energy

c need to define proton atomic number, charge and mass

c rigidity in often used in units of GV;

c Subroutine azrgeg needs rigidity in units of MV

c Subroutine azrgeg returns energy in units of MeV per nucleon

c\...\.....+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+..

c Programmed by Don F. Smart (sssrc@msn.com)

c Note - programming adheres to convention that variables beginning

c with i, j, k, l, m, n are integer values,

c variables beginning with c are character variables

c all other variables are real\*8

c\...\.....+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+..

c

implicit integer (i-n)

implicit REAl\*8 (a-b)

implicit REAl\*8 (d-h)

implicit REAl\*8 (o-z)

c

c\...\.....+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+..

open (7,file=\'erg-rig.txt\', status=\'unknown\')

c\...\.....+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+..

c

c Define atomic number, atomic change and rest mass for oxygen16

c (Note, any element or isotope can be specified)

c\...\.....+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+..

c

na = 16

nz = 8

pamu = 16.00

c

c\...\.....+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+..

c \\/ First demonstration does Energy to Rigidity from 1 to 100 MeV

c\...\.....+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+..

c

Do 100 i=1,100

rpmv = 0.0

epnmev = float (i)

call azrgeg (na,nz,pamu,rpmv,epnmev,beta)

write (7, 1070) rpmv,epnmev

100 continue

c

c\...\.....+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+..

c \\/ Second demonstration does Energy to Rigidity

c from 100 to 1000 MeV in 10 MeV increments

c\...\.....+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+..

c

Do 110 i=100,1000,10

rpmv = 0.0

epnmev = float (i)

call azrgeg (na,nz,pamu,rpmv,epnmev,beta)

write (7, 1070) rpmv,epnmev

110 continue

c

c\...\.....+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+..

c \\/ Second demonstration does Energy to Rigidity

c from 1000 to 10000 MeV in 100 MeV increments

c\...\.....+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+..

c

Do 120 i=1000,10000,100

rpmv = 0.0

epnmev = float (i)

call azrgeg (na,nz,pamu,rpmv,epnmev,beta)

write (7, 1070) rpmv,epnmev

120 continue

1070 format (1f10.1, 1f10.3)

stop

end

subroutine azrgeg (na,nz,pamu,rigin,epn,beta)

c

c\...\.....+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+..

c subroutine to convert rigidity to energy and visa versa

cLast mod 17 March 94

c\...\.....+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+..

c Programmed by Don F. Smart (sssrc@msn.com)

c Note - programming adheres to convention that variables beginning

c with i, j, k, l, m, n are integer values,

c variables beginning with c are character variables

c all other variables are real\*4

c\...\.....+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+..

c

implicit integer (i-n)

implicit REAl\*8 (a-b)

implicit REAl\*8 (d-h)

implicit REAl\*8 (o-z)

c

c\...\.....+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+..

c

c write (\*,6010) na,nz,pamu,rigin,epn ! diag

c6010 format (\' azrgeg1 \',2i5,3f15.3) ! diag

c

c\...\.....+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+..

c Check, if na, nz, or pamu not specified, put in default for protons

c epamu is rest mass energy per atomic mass unit

c\...\.....+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+..

c

if (pamu.le.0.0) pamu = 1.0081451

if (na.le.0) na = 1

if (nz.le.0) nz = 1

c

epamu = 931.141

c

anuc = na

zcharg = nz

rsmspn = (pamu/anuc)\*epamu

c

trig = rigin

c

c\...\.....+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+..

c \\/ if trig .le. 0.0 do energy to rigidity conversion

c if trig .gt. 0.0 do rigidity to energy conversion

c\...\.....+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+..

c

if (trig.le.0.0) then

c Energy to Rigidity conversion

gmaeg = (anuc\*epn+anuc\*rsmspn)/(anuc\*rsmspn)

gmaegg = (epn+rsmspn)/rsmspn

rigin = dsqrt(gmaeg\*gmaeg-1.0)\*rsmspn\*anuc/zcharg

relgma = gmaeg

else

c Rigidity to Energy conversion

gmarg = dsqrt(((rigin\*zcharg)/(rsmspn\*anuc))\*\*2+1.0)

epn = (gmarg-1.0)\*rsmspn

relgma = gmarg

endif

c

c write (\*,6020) anuc,zcharg,rsmspn,rigin,epn,gmaeg,gmaegg,gmarg ! diag

c write (\*,6030) na,nz,pamu,rigin,epn ! diag

c6020 format (\' azrgeg2 \',8f10.3) ! diag

c6030 format (\' azrgeg3 \',2i5,3f15.5) ! diag

c

beta = dsqrt(1.0-1.0/(relgma\*relgma))

c

return

c

c beta is v/c (speed as fraction of light speed)

c energy in MeV

c epamu is mass-energy conversion = 931.141 MeV per amu

c epn is kinetic energy per nucleon

c na is atomic number

c nz is charge

c pamu is rest mass in physical atomic mass units

c relgam is relativistic factor \'gamma\'

c rigidity in mv

c rsmspn is rest mass per nucleon in MeV

c

end

program RIG_ERG

c\...\.....+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+..

c Rigidity to energy conversion example

c\...\.....+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+..

c \\/ Example of the use of the Rigidity to Energy conversion program

c Convert geomagnetic cutoff rigidity to proton cutoff energy

c need to define proton atomic number, charge and mass

c rigidity in often used in units of GV;

c Subroutine azrgeg needs rigidity in units of MV

c Subroutine azrgeg returns energy in units of MeV per nucleon

c\...\.....+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+..

c Programmed by Don F. Smart (sssrc@msn.com)

c Note - programming adheres to convention that variables beginning

c with i, j, k, l, m, n are integer values,

c variables beginning with c are character variables

c all other variables are real\*8

c\...\.....+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+..

c

implicit integer (i-n)

implicit REAl\*8 (a-b)

implicit REAl\*8 (d-h)

implicit REAl\*8 (o-z)

c

c\...\.....+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+..

open (7,file=\'rig-err.txt\', status=\'unknown\')

c\...\.....+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+..

c

c Define atomic number, atomic change and rest mass for proton

c\...\.....+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+..

c

na = 1

nz = 1

pamu = 1.0081451

c

c\...\.....+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+..

c \\/ First demonstration does Rigidity to Energy from 1 to 100 MV

c\...\.....+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+..

c

Do 100 i=1,100

rpmv = float (i)

call azrgeg (na,nz,pamu,rpmv,epnmev,beta) !sub20

write (7, 1070) rpmv,epnmev

100 continue

c

c\...\.....+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+..

c \\/ Second demonstration does Rigidity to Energy

c from 100 to 1000 MV in 10 MV increments

c\...\.....+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+..

c

Do 110 i=100,1000,10

rpmv = float (i)

call azrgeg (na,nz,pamu,rpmv,epnmev,beta)

write (7, 1070) rpmv,epnmev

110 continue

c

c\...\.....+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+..

c \\/ Third demonstration does Rigidity to Energy

c from 1000 to 10000 MV in 100 MV increments

c\...\.....+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+..

c

Do 120 i=1000,10000,100

rpmv = float (i)

call azrgeg (na,nz,pamu,rpmv,epnmev,beta)

write (7, 1070) rpmv,epnmev

120 continue

1070 format (1f10.1, 1f10.3)

stop

end

subroutine azrgeg (na,nz,pamu,rigin,epn,beta)

c

c\...\.....+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+..

c subroutine to convert rigidity to energy and visa versa

cLast mod 17 March 94

c\...\.....+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+..

c Programmed by Don F. Smart (sssrc@msn.com)

c Note - programming adheres to convention that variables beginning

c with i, j, k, l, m, n are integer values,

c variables beginning with c are character variables

c all other variables are real\*4

c\...\.....+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+..

c

implicit integer (i-n)

implicit REAl\*8 (a-b)

implicit REAl\*8 (d-h)

implicit REAl\*8 (o-z)

c

c\...\.....+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+..

c

c write (\*,6010) na,nz,pamu,rigin,epn ! diag

c6010 format (\' azrgeg1 \',2i5,3f15.3) ! diag

c

c\...\.....+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+..

c Check, if na, nz, or pamu not specified, put in default for protons

c epamu is rest mass energy per atomic mass unit

c\...\.....+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+..

c

if (pamu.le.0.0) pamu = 1.0081451

if (na.le.0) na = 1

if (nz.le.0) nz = 1

c

epamu = 931.141

c

anuc = na

zcharg = nz

rsmspn = (pamu/anuc)\*epamu

c

trig = rigin

c

c\...\.....+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+..

c \\/ if trig .le. 0.0 do energy to rigidity conversion

c if trig .gt. 0.0 do rigidity to energy conversion

c\...\.....+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+\...\...\...+..

c

if (trig.le.0.0) then

c Energy to Rigidity conversion

gmaeg = (anuc\*epn+anuc\*rsmspn)/(anuc\*rsmspn)

gmaegg = (epn+rsmspn)/rsmspn

rigin = dsqrt(gmaeg\*gmaeg-1.0)\*rsmspn\*anuc/zcharg

relgma = gmaeg

else

c Rigidity to Energy conversion

gmarg = dsqrt(((rigin\*zcharg)/(rsmspn\*anuc))\*\*2+1.0)

epn = (gmarg-1.0)\*rsmspn

relgma = gmarg

endif

c

c write (\*,6020) anuc,zcharg,rsmspn,rigin,epn,gmaeg,gmaegg,gmarg ! diag

c write (\*,6030) na,nz,pamu,rigin,epn ! diag

c6020 format (\' azrgeg2 \',8f10.3) ! diag

c6030 format (\' azrgeg3 \',2i5,3f15.5) ! diag

c

beta = dsqrt(1.0-1.0/(relgma\*relgma))

c

return

c

c beta is v/c (speed as fraction of light speed)

c energy in MeV

c epamu is mass-energy conversion = 931.141 MeV per amu

c epn is kinetic energy per nucleon

c na is atomic number

c nz is charge

c pamu is rest mass in physical atomic mass units

c relgam is relativistic factor \'gamma\'

c rigidity in mv

c rsmspn is rest mass per nucleon in MeV

c

end