BETHE-BLOCH V1.2 RANGE & ENERGY LOSS LIBRARY (Particle/Nuclear Physics) by Tony Ambardar (c) 1995 =========== DESCRIPTION: The ionization energy loss of particles -- aside from electrons -- passing through matter can be described using the Bethe-Bloch equation. BETHE-BLOCH V1.2 allows the user to easily define various particles and media, and then quickly calculate a range and energy loss. It is written in ~50/50 SYSRPL/ASSEMBLY for speed. LIBRARY #: 1600 SIZE: 5214 bytes CHECKSUM: # 9409 d COMPATIBILITY: S(X) and G(X). Note: BETHE-BLOCH makes use of two unsupported entry points, which are not version dependent according to documentation I have. It definitely works on a GX Rev-P. But be safe: backup your HP48 before testing this software. DISCLAIMER: This software is provided AS IS; the author assumes NO responibility for the results of its use. Sale, commercial distribution, or modification of this software is NOT allowed without prior written permission of the author. INSTALLATION: Transfer file BETHE.SGX to HP48. Recall library to stack. Store in favourite port. Turn calc off, then on. Also transfer data files BBMED and BBPAR to HP48, and store where accessible by the library. Once installation is complete, file BETHE.SGX may be deleted. If you use this software and have comments, questions, or suggestions for improvement, please drop me a line: Tony Ambardar E-Mail: bird@triumf.ca Display Layout ============== Medium: (current medium) Particle: (current particle) Energy: (current particle energy) -dE/dx: (energy loss per unit distance) dX: (medium thickness) dE: (total energy loss through distance dX) Range: (particle range in medium) _=_____=________________________ |MEDIA|PRTCL|ENRG|dX|INFO?|QUIT| -------------------------------- NOTE: some field are only active after pressing 'INFO?' Key Definitions =============== MEDIA: Select current media using a sub-menu created from the file BBMED (see description with BBPAR). PRTCL: Select current particle from a sub-menu created from file BBPAR ( see description of BBPAR later). Exit the sub-menu by re-selecting the active key or pressing 'BETHE'. ENRG/MOM: Input particle energy or momentum depending on the current key label. (DELTA)X: Input thickness of medium. INFO?: Calculate range of particle in medium, energy loss traveling a distance (DELTA)X, and dE/dx at the initial energy. QUIT: Exit the program, saving current input parameters. +/-: Toggle between momentum- and energy-mode for display and input. STO: Update the current energy/momentum by adding the last calculated energy loss. One can use this feature to step a particle through several layers of material, for example. ON/ATTN: Exit the program, removing all saved input parameters and files from the hidden directory. DATA FILES ========== The particles and media available to the user are defined by the files BBPART and BBMED. These can be easily edited to add new media and particles. I've added a lot of error checking, so don't worry too much about crashing your calculator through incorrect input, or invalid particle or media data. The data files are organized as follows: ( NOTE: units are MeV - grams - cm ) BBPART = { PART1 PART2 ... } PARTn = { Name(STRING) Charge(FLOAT) Mass(FLOAT) } e.g. BBPART = { ... { "Pion" 1 139.6 } ... } and BBMED = { MED1 MED2 ... } MEDn = { Name(STRING) Density(FLOAT) FORMULAn } FORMULAn can be expressed in one of two ways: = MolecularFormula(STRING) IONCONST IONCONST = { Element1(STRING) IonizationConstant1(FLOAT) Element2(STRING) IonizationConstant2(FLOAT) ... } e.g. "C5H8O2" { "H" 0.000015 } or as a sequence of elements in the molecular unit: = ELEM1 ELEM2 ... ELEMn = { AtomicNumber(FLOAT) AtomMass(FLOAT) NumberInMolecule(FLOAT) IonizationConstant(FLOAT) } e.g. { 82 207 1 0.000823 } ( this is lead i.e. "Pb1" ) This second form is useful for isotopes e.g. deuterium in deuterated polyethylene (CD2). Also, in both cases inclusion of ionization constants is optional. Defaults are calculated if omitted. e.g. BBMED = { ... { "Quartz" 2.64 "SiO2" } ... { "CD2" 0.95 { 6 12 1} { 1 2 2 0.000015 } } ... }