|
gsl_complex | complex_hyperg (gsl_complex a, gsl_complex b, gsl_complex z) |
| Confluent hypergeometric function. More...
|
|
gsl_complex | complex_lngamma (gsl_complex z) |
| Complex logarithm of the Gamma function. More...
|
|
double | effective_charge (double z0, double e1, double z2, short sswitch) |
| Computes effective projectile charge. More...
|
|
double | djdx (double e1, double z0, double I0, double f0, double K, short sswitch, tdata *target) |
| Computes primary ionization. More...
|
|
double | dedx (double e1, double rel0, double z0, double a1, short sswitch, tdata *target) |
| Computes dE/dx. More...
|
|
double | delta (double g, tdata *target) |
| Computes the density effect. More...
|
|
double | olddelta (double g, tdata *target) |
| Computes an obsolete version of the density effect. More...
|
|
double | bma (double z1, double b) |
| Computes the Bloch, Mott and Ahlen corrections. More...
|
|
double | relbloch (double z12, double b1, double lambda, double theta0) |
| Compute the relativistic Bloch correction. More...
|
|
double | lindhard (double zz, double aa, double bb, short sswitch) |
| Compute the Lindhard-Sørensen correction. More...
|
|
double | Fbrems (double x) |
| Compute a mathematical function related to bremsstrahlung. More...
|
|
double | range (double e, double z1, double a1, short sswitch, tdata *target, int *tno) |
| Computes total range given initial energy. More...
|
|
double | qrange (double e, double z1, double a1, short sswitch, tdata *target) |
| Computes total range by direct integration of dE/dx. More...
|
|
double | benton (double e, double z1, double a1, tdata *target) |
| Computes ranges at low energies. More...
|
|
double | renergy (double e, double r0, double z1, double a1, short sswitch, tdata *target) |
| Extract energies from range tables. More...
|
|
void | run_range (FILE *finput, FILE *foutput, short sswitch, tdata *extratargets) |
| Parses and executes the task list. More...
|
|
short | init_switch (char *switchfile) |
| Initializes the value of of the switch bit field. More...
|
|
tdata * | init_target (char *targetfile) |
| Read optional target data file. More...
|
|
void | init_table (void) |
| Initialize range-energy tables. More...
|
|
double | energy_table (int i) |
| Returns the energy corresponding to a value in a range table. More...
|
|
tdata * | find_target (char *target, tdata *extratargets) |
| Finds target data corresponding to a target name. More...
|
|
void | print_target (tdata *target) |
| Prints a target table entry in INI format. More...
|
|
Header file for crange.
This header file collects all the other header files needed to compile crange, as well as all defines, function declarations, etc.
Definition in file crange.h.
double bma |
( |
double |
z1, |
|
|
double |
b |
|
) |
| |
Computes the Bloch, Mott and Ahlen corrections.
This function computes the Mott correction of Ahlen, [1], the Bloch correction of F. Bloch, [8], and the Ahlen correction of Ahlen, [3]. All three of these corrections are rendered obsolete by the Lindhard-Sørensen correction, and are included here for historical interest and comparison with older calculations.
- Parameters
-
z1 | The projectile charge. |
b | The projectile velocity in units of the speed of light (i.e. ). |
- Returns
- The sum of the Bloch, Mott and Ahlen corrections.
- Note
- The variables lambda and theta0 are free parameters in the Ahlen correction. Theta0 also appears in the Mott correction. Here I have used Ahlen's recommended values, lambda = 1, theta0 = 0.1. An alternative formula,
, is suggested by Waddington, Freier & Fixsen, [26].
- Warning
- The Mott correction has a severely limited range of validity, especially for high charges. It's so bad it can render the calculation not just inaccurate, but unphysical (dE/dx < 0) below about 10 A MeV for uranium. Ahlen recommends turning the Mott correction off for
. Here for
the Mott correction is given the value at
. This prescription is given by Waddington, Freier & Fixsen, [26].
- Bug:
- Currently, this function is not called by anything.
Definition at line 768 of file crange.c.
double dedx |
( |
double |
e1, |
|
|
double |
rel0, |
|
|
double |
z0, |
|
|
double |
a1, |
|
|
short |
sswitch, |
|
|
tdata * |
target |
|
) |
| |
Computes dE/dx.
This is the core of the whole package, the dE/dx calculator. I have based this largely on the work of Salamon, [20]. Values of certain physical constants have been updated, as well as some of the corrections to the basic stopping power formula.
If the restricted energy loss parameter rel0 is non-zero, dedx() computes restricted energy loss instead.
The dE/dx calculator includes a number of effects that are controlled by switches encoded in a bit field. Below we describe each bit field and the effect it controls.
- SSWITCH_ND : Density effect version. If this bit is set (which it is by default), a newer version of the density effect is used. See delta() and olddelta() for details.
- SSWITCH_SH : Inner shell correction. The inner shell correction is somewhat problematic. It arises when the projectile velocity is comparable to the velocity of inner shell electrons in the target medium. This is discussed by Fano, [9]. The shell correction can be included explicitly using this formula from Barkas & Berger, [5]. Alternatively, the shell correction can be "hidden" in the logarithmic mean ionization potential. Much more work is required before this topic can be fully understood.
- SSWITCH_LE : Relativistic shell correction. The Leung, or relativistic shell correction is a small effect which is due to relativistic inner shell electrons in very heavy targets. See Leung, [15], and Leung, [16]. SSWITCH_LE has no effect unless SSWITCH_SH is also turned on.
- The Lindhard-Sørensen effect (see lindhard()) is turned on by default. The Bloch, Mott & Ahlen effects are included for historical interestest. Right now these can be turned on by uncommenting a particular section of the code.
- SSWITCH_KI : Ultrarelativistic kinematic correction. This an estimate of the ultrarelativistic kinematic correction from Ahlen, [2]. It corrects to the finite mass (as opposed to size) of the nucleus in relativistic electron-nucleus collisions.
- SSWITCH_RA : Radiative correction. This is the radiative correction discussed in Ahlen, [2]. It arises from bremsstrahlung of scattered electrons in ultrarelativistic collisions. The form here is that of Jankus, [14]. The parameter Q from that paper is here set equal to the geometric mean between the the electron rest energy and
.
- SSWITCH_PA : Slowing due to pair production. This value and the value for the bremsstrahlung correction below are based on the work of Sørensen, [24].
- SSWITCH_BR : Slowing due to projectile bremsstrahlung. This version is that of Sørensen, [24], who has shown that this effect is much smaller than the version suggested by Weaver & Westphal, [27].. This is due to their treatment of the projectile and target nuclei as a point particles. That version appeared in some much older versions of this code, but has been replaced with Sørensen's version. We have not yet updated this code to reflect Sørensen's more recent paper [25].
- SSWITCH_BA : Barkas effect. This is the Barkas correction as calculated in Jackson & McCarthy, [13]. It is multiplied by a factor of two to bring it into agreement with Lindhard, [18]. It is not, however, equal to the results of Lindhard, and more work is needed to decide which, if any, form is correct. The recommended value seems to be the Jackson & McCarthy result multiplied by two. Jackson & McCarthy do not have reliable values of
for
. For the purposes of the computation, the cut-off is placed at
. I have followed the convention of Salamon in having the Barkas correction multiply just the "Bethe" portion of the stopping logarithm rather than the whole stopping logarithm. As there is considerable disagreement in the literature about the application of correction, and as changing the convention makes makes a difference of less than 1 A MeV even in calculating the energy of stopping uranium, I have chosen to leave it where it is. Furthermore, I have found that a simple power law
is adequate to model Jackson & McCarthy's function for
, so I have used this instead of the numbers found by reading off one of Jackson & McCarthy's figures (these values are stored in the array fva[10], but only the last value is used).
- Parameters
-
e1 | The projectile kinetic energy in A MeV. |
rel0 | Restricted energy loss parameter in eV. |
z0 | The projectile charge. |
a1 | The projectile atomic number. |
sswitch | The switch bit field. |
target | A pointer to a TDATA structure. |
- Returns
- dE/dx in units of A MeV g-1 cm2
Definition at line 545 of file crange.c.
double effective_charge |
( |
double |
z0, |
|
|
double |
e1, |
|
|
double |
z2, |
|
|
short |
sswitch |
|
) |
| |
Computes effective projectile charge.
This is the modification of projectile charge due to electron capture. Hubert, Bimbot & Gauvin, [12], give an empirically determined function which depends on the target material. This version is used if SSWITCH_EC is set. Two older versions, from Anthony & Landford, [4], and Pierce & Blann, [19] are also available.
- Parameters
-
z0 | The bare projectile charge. |
e1 | The projectile kinetic energy in A MeV. |
z2 | The target mean nuclear charge. |
sswitch | The switch bit field. |
- Returns
- The effective projectile charge.
- Bug:
- The Pierce & Blann formula is not actually available; it is simply commented out.
Definition at line 366 of file crange.c.
void run_range |
( |
FILE * |
finput, |
|
|
FILE * |
foutput, |
|
|
short |
sswitch, |
|
|
tdata * |
extratargets |
|
) |
| |
Parses and executes the task list.
This utility function steps through the range, energy and dE/dx tasks specified in the input data file. The tasks are denoted by a single letter:
- r compute ranges
- e compute energies
- d compute dE/dx
- j compute dJ/dx (primary ionization)
The task letter should be followed by the energy (or range) at which to compute range (or energy), the charge and mass of the particle, and the name of the target material. Names of target materials can be found in the target.ini file. Target material names may be up to NAMEWIDTH characters in length and should contain no whitespace.
- Parameters
-
finput | An open file pointer containing the task list. |
foutput | An open file pointer to write results to. |
sswitch | The switch bit field. |
extratargets | A pointer to an array of TDATA structures. |
- Bug:
- The primary ionization parameters are currently hard-coded.
Definition at line 1396 of file crange.c.