range is a stopping power and range library written in C. It creates and stores in memory range tables based on the Northcliffe-Schilling[1] and Hubert-Bimbot-Gauvin[2] correlations. These can be used to calculate the energy loss of an ion after passage through a foil, or the incoming energy prior to passage based on the outgoing energy.
Since the Northcliffe-Schilling and Hubert-Bimbot-Gauvin correlations are valid for E/A < 12 MeV/A and 2.5 < E/A < 500 MeV/A, respectively, this library is mostly useful in analyzes of nuclear physics experiments in the low (E/A < 10 A MeV) and intermediate (10 < E/A < 150 A MeV) energy regimes, where usually a projectile, or reaction product, loose energy in the target material, dead layers in a detector, or in transmission detectors where only a fraction of the energy is deposited.
The library consists of four functions, passage(), egassap(), rangen() and thickn(), and the program range which is a front-end useful for quick estimations. The function passage() returns the ion energy after passage through an absorber, whereas egassap() returns the ingoing ion energy, given the energy after passage. If you know the energy of a beam, passage() can be used to calculate the energy deposited in a detector, or the enery lost through a target foil. Similarly, if you know the energy deposited by a reaction product in a detector, egassap() can be used to calculate its initial energy, prior to degradation. The function rangen() returns the range of a projectile in a given material, and the function thickn() returns the foil thickness needed to produce a given energy loss. Manual pages and examples are available.
range is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version.
This is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. See the GNU General Public License for more details.
File: range-0.1.5.tar.gz
Size: 543941 bytes
MD5 checksum: b509a6ba6dc6d38eab2c93ad5aa8cc2b
Untar the source,
$ tar -zxvf range-0.1.5.tar.gz
For a basic installation do shell commands,
$ cd range-0.1.5 $ ./configure $ make $ sudo make install $ sudo ldconfig
Do
$ ./configure --help
On Debian systems, read INSTALL.Debian for a Debian-wise installation.
Do 'man range' to see the synopsis and description of the range program.
Do 'man 3 range' to see the synopsis and description of the range functions.
Calculate energy loss of alpha particles in air,
/*
* passage.c
*
* Written by Ricardo Yanez <ricardo.yanez@calel.org>
*
*/
#include <stdio.h>
#include <range.h>
/* Calculate energy loss of alpha particles in air */
int main () {
int i;
double dens, t;
double d;
double ein, eout, eut, err;
/* define absorber (air) */
nelem = 3;
absorb[0].z = 8; absorb[0].a = 16; absorb[0].w = 2*16*23.2; /* O2 */
absorb[1].z = 7; absorb[1].a = 14; absorb[1].w = 2*14*75.5; /* N2 */
absorb[2].z = 18; absorb[2].a = 40; absorb[2].w = 1*40*1.3; /* Ar */
/* density of air at 1 atm (see README file) */
dens = 760.0 * 5.38083e-5 * (2*16*23.2 + 2*14*75.5 + 1*40*1.3);
/* If you want to be more accurate you can use molecular weights instead
of mass numbers when defining the weights */
printf("\nCalculating the energy of an alpha particle in air\n\n");
printf("Initial \t mm of air \t final\n");
printf("energy \t \t energy\n");
printf("(MeV) \t \t [1] \t [2]\n");
printf("------- \t --------- \t ------\n");
ein = 25.0;
for (i = 0 ; i < 10 ; i++) {
d = (i+1) / 20.0;
t = dens * d;
eout = passage(0,2,4,-1,0,0,ein,t,&err);
eut = passage(1,2,4,-1,0,0,ein,t,&err);
printf("%6.1lf \t\t %6.3lf \t %6.2lf \t %6.2lf\n",ein,d*10.0,eout,eut);
}
printf("\n[1] Northcliffe-Schilling correlations\n");
printf("[2] Hubert-Bimbot-Gauvin correlations\n\n");
return 0;
}
Compile with,
gcc -g -O -Wall passage.c -lrange -lm -o passage
and run,
$ ./passage Calculating the energy of an alpha particle in air Initial mm of air final energy energy (MeV) [1] [2] ------- --------- ------ 25.0 0.500 23.60 23.57 25.0 1.000 22.14 22.08 25.0 1.500 20.60 20.50 25.0 2.000 18.96 18.82 25.0 2.500 17.21 17.01 25.0 3.000 15.30 15.05 25.0 3.500 13.19 12.87 25.0 4.000 10.78 10.38 25.0 4.500 7.88 7.37 25.0 5.000 3.74 2.72 [1] Northcliffe-Schilling correlations [2] Hubert-Bimbot-Gauvin correlations
To use the range functions in ROOT load the library with,
gSystem->Load("/usr/local/lib/librange")
then compile the code as usual. For example, testRange.C,
root [0] gSystem->Load("/usr/local/lib/librange")
root [1] .L testRange.C++
root [2] testRange()
98.9758
119.114
139.215
157.807
263.747
The method of constructing range tables to interpolate to desired range values is due to Prof. Jan-Olov Liljenzin, Chalmers Institute of Technology, Sweden. The original program written in FORTRAN was inherited to me during my time as a Ph.D. student at Uppsala University. Since the source code was not intended for the general public it was never copyrighted in any sense. I have taken the liberty to port it to C and license it under GPL in the interest of a broader scientific community.
[1] - C. Northcliffe, R.F. Schilling, Nucl. Data Tables A7, 233 (1970).
[2] - F. Hubert, R. Rimbot and H. Gauvin, Atomic Data and Nuclear Data Tables 46, pp. 1-213 (1990).
range (0.1.5-1) unstable; urgency=low * Added natural Ni as pre-defined compound. -- Ricardo Yanez <ricardo.yanez@calel.org> Mon, 26 Dec 2011 14:18:10 -0800 range (0.1.4-1) unstable; urgency=low * Some fixes to code. -- Ricardo Yanez <ricardo.yanez@calel.org> Wed, 15 Dec 2010 17:22:47 -0800 range (0.1.3-1) unstable; urgency=low * Added function rangen. * Libraries C++ compatible. Removed librange++. -- Ricardo Yanez <ricardo.yanez@calel.org> Mon, 29 Mar 2010 16:42:46 -0400 range (0.1.2-1) unstable; urgency=low * Added function thickn. -- Ricardo Yanez <ricardo.yanez@calel.org> Sun, 08 Nov 2009 07:41:18 -0800 range (0.1.1-1) unstable; urgency=low * Improved use of multidimentional array pointers * Shared library compiled with g++ (librange++) -- Ricardo Yanez <ricardo.yanez@calel.org> Sun, 15 Jun 2008 14:19:21 -0400 range (0.1.0-11) unstable; urgency=low * Compiled for Etch. -- Ricardo Yanez <ricardo.yanez@calel.org> Mon, 23 Jul 2007 08:30:29 -0400 range (0.1.0-10) unstable; urgency=low * Included Copyright notice in codes. * Changed email address * Included LICENSE file in orig.tar.gz -- Ricardo Yanez <ricardo.yanez@calel.org> Sun, 3 Apr 2005 12:53:53 +1000 range (0.1.0-9) unstable; urgency=low * Fixed bug: Symbol U. -- Ricardo Yanez <ricardo.yanez@calel.org> Sun, 27 Mar 2005 17:40:35 +1000 range (0.1.0-8) unstable; urgency=low * Revised man pages and README * Renamed README to NOTES -- Ricardo Yanez <ricardo.yanez@calel.org> Fri, 25 Mar 2005 21:18:42 +1100 range (0.1.0-7) unstable; urgency=low * Fixed header. -- Ricardo Yanez <ricardo.yanez@calel.org> Tue, 15 Feb 2005 17:58:01 +1100 range (0.1.0-6) unstable; urgency=low * fixed some typos in manuals. -- Ricardo Yanez <ricardo.yanez@calel.org> Wed, 12 Jan 2005 15:49:11 +1100 range (0.1.0-5) unstable; urgency=low * Range table implemented (option 2) -- Ricardo Yanez <ricardo.yanez@calel.org> Fri, 7 Jan 2005 18:17:01 +1100 range (0.1.0-4) unstable; urgency=low * Linked range against shared library librange.so * -dE/dx table implemented (option 1) -- Ricardo Yanez <ricardo.yanez@calel.org> Thu, 30 Dec 2004 14:13:25 +1100 range (0.1.0-3) unstable; urgency=low * User defined compounds now possible * Added examples -- Ricardo Yanez <ricardo.yanez@calel.org> Sat, 11 Dec 2004 09:03:39 +1100 range (0.1.0-2) unstable; urgency=low * Added program range to original static library * Added man pages for range and passage -- Ricardo Yanez <ricardo.yanez@calel.org> Mon, 6 Dec 2004 10:12:19 +1100 range (0.1.0-1) unstable; urgency=low * Initial release. -- Ricardo Yanez <ricardo.yanez@calel.org> Thu, 2 Dec 2004 16:32:02 +1100
This document was generated using AFT v5.097