Change address for images in all files authored by jeppe's avatar jeppe
...@@ -31,7 +31,7 @@ Any questions ? Then read on... ...@@ -31,7 +31,7 @@ Any questions ? Then read on...
# Overview # Overview
ausa/eloss/ allows you to calculate energy losses for practically any ion-target combination using several different tabulations of stopping powers and ranges. The basic structure of the program is shown the figure below. Tabulations of stopping power and range may be generated for any ion-target combination using one of three sources: SRIM, GEANT or ICRU. The tabulations are fed to the `StoppingPowerCalculator` and `RangeCalculator` which calculate the stopping power and range for an arbitrary energy, typically, by cubic spline interpolation. Finally, the `EnergLossCalculator` calculates the energy loss for an arbitrary energy (initial or final) and thickness, either by integrating the stopping powers or by inverting the range function. For complete documentation of the code see http://docs.kern.phys.au.dk/. ausa/eloss/ allows you to calculate energy losses for practically any ion-target combination using several different tabulations of stopping powers and ranges. The basic structure of the program is shown the figure below. Tabulations of stopping power and range may be generated for any ion-target combination using one of three sources: SRIM, GEANT or ICRU. The tabulations are fed to the `StoppingPowerCalculator` and `RangeCalculator` which calculate the stopping power and range for an arbitrary energy, typically, by cubic spline interpolation. Finally, the `EnergLossCalculator` calculates the energy loss for an arbitrary energy (initial or final) and thickness, either by integrating the stopping powers or by inverting the range function. For complete documentation of the code see http://docs.kern.phys.au.dk/.
![eloss](https://git.kern.phys.au.dk/ausa/ausalib/uploads/c433f98b106be1898bc88267aac406f5/eloss.jpg) ![eloss](uploads/c433f98b106be1898bc88267aac406f5/eloss.jpg)
# Tutorial # Tutorial
## 1. Environmental variables ## 1. Environmental variables
...@@ -98,7 +98,7 @@ EnergyLossRangeInverter DEr1( move(rc1) ); ...@@ -98,7 +98,7 @@ EnergyLossRangeInverter DEr1( move(rc1) );
EnergyLossRangeInverter DEr2( move(rc2) ); EnergyLossRangeInverter DEr2( move(rc2) );
``` ```
The calculators provide identical functionalities, but rely on different methods. The first calculator (`DEsp`) integrates the stopping powers numerically, whereas the second and the third calculator (`DEr1` and `DEr2`) use the inverse-range method, though they differ in the way they determine the range function. The calculators provide identical functionalities, but rely on different methods. The first calculator (`DEsp`) integrates the stopping powers numerically, whereas the second and the third calculator (`DEr1` and `DEr2`) use the inverse-range method, though they differ in the way they determine the range function.
If you do not have [GSL](https://git.kern.phys.au.dk/ausa/ausalib/wikis/GSL) installed on your computer, you can still use our home-made integrator: If you do not have [GSL](wikis/GSL) installed on your computer, you can still use our home-made integrator:
```cpp ```cpp
#include <ausa/eloss/EnergyLossIntegrator.h> #include <ausa/eloss/EnergyLossIntegrator.h>
EnergyLossIntegrator DEsp( move(spc) ); EnergyLossIntegrator DEsp( move(spc) );
...@@ -116,7 +116,7 @@ More examples can be found [here](uploads/66bc7fb78ed597a789249a0e2870cc03/snipp ...@@ -116,7 +116,7 @@ More examples can be found [here](uploads/66bc7fb78ed597a789249a0e2870cc03/snipp
For a complete list of available get methods see [EnergyLossCalculator.h](http://docs.kern.phys.au.dk/classAUSA_1_1EnergyLoss_1_1EnergyLossCalculator.html). For a complete list of available get methods see [EnergyLossCalculator.h](http://docs.kern.phys.au.dk/classAUSA_1_1EnergyLoss_1_1EnergyLossCalculator.html).
## 6. Default calculator ## 6. Default calculator
If you are in a rush and do not care too much about how the energy loss is being determined, you can skip steps 2-4 and instead use the [default energy-loss calculator](https://git.kern.phys.au.dk/ausa/ausalib/blob/master/include/ausa/eloss/Default.h) which determines energy loss by numerical integration of GEANT stopping powers. To determine, say, the energy loss of 1 MeV protons in 100 nm aluminium, you would write If you are in a rush and do not care too much about how the energy loss is being determined, you can skip steps 2-4 and instead use the [default energy-loss calculator](blob/master/include/ausa/eloss/Default.h) which determines energy loss by numerical integration of GEANT stopping powers. To determine, say, the energy loss of 1 MeV protons in 100 nm aluminium, you would write
```cpp ```cpp
#include <memory> #include <memory>
#include "ausa/eloss/Material.h" #include "ausa/eloss/Material.h"
...@@ -161,20 +161,20 @@ Comparison of CPU times (1e6 repetitions): ...@@ -161,20 +161,20 @@ Comparison of CPU times (1e6 repetitions):
| 3 MeV alphas in 500 nm Si | 0.34 | 0.58 | 0.06 | 0.38 | | 3 MeV alphas in 500 nm Si | 0.34 | 0.58 | 0.06 | 0.38 |
| 6 MeV alphas in 10 um Si | 0.37 | 0.69 | 0.04 | 0.38 | | 6 MeV alphas in 10 um Si | 0.37 | 0.69 | 0.04 | 0.38 |
See also [this comparison](https://git.kern.phys.au.dk/ausa/ausalib/issues/30) of the two integrators. See also [this comparison](issues/30) of the two integrators.
## Integrator ## Integrator
The main advantages of the integrator are that it is numerically reliable and it yields results for all three tabulations, including GEANT which is readily available for any ion-target combinations. Another advantage is that it can separate the energy loss into its electronic and nuclear components. The main drawbacks are that it is slow (the thicker the material, the longer it takes) and that it systematically underestimates the energy loss of light ions at low energies because it does not take into account angular straggling (see Figure 1 below). It is possible to speed up the integrator by adjusting various parameters such as the minimum step size. The complete list of adjustable parameters can be found in [GslIntegrator.h](https://git.kern.phys.au.dk/ausa/ausalib/blob/gsl-integrator/include/ausa/eloss/GslIntegrator.h) (GSL integrator) and [EnergyLossIntegrator.h](https://git.kern.phys.au.dk/ausa/ausalib/blob/gsl-integrator/include/ausa/eloss/EnergyLossIntegrator.h) (home-made integrator). The main advantages of the integrator are that it is numerically reliable and it yields results for all three tabulations, including GEANT which is readily available for any ion-target combinations. Another advantage is that it can separate the energy loss into its electronic and nuclear components. The main drawbacks are that it is slow (the thicker the material, the longer it takes) and that it systematically underestimates the energy loss of light ions at low energies because it does not take into account angular straggling (see Figure 1 below). It is possible to speed up the integrator by adjusting various parameters such as the minimum step size. The complete list of adjustable parameters can be found in [GslIntegrator.h](blob/gsl-integrator/include/ausa/eloss/GslIntegrator.h) (GSL integrator) and [EnergyLossIntegrator.h](blob/gsl-integrator/include/ausa/eloss/EnergyLossIntegrator.h) (home-made integrator).
## Range inverter ## Range inverter
The main advantages of the integrator are that it is fast and does not suffer from the above mentioned systematic error. The main drawbacks are that it only yields results for SRIM and that it has some numerical problems around the maximum of the stopping power curve (see Figures 1 and 2 below). Also it does not allow separation of the energy loss into electronic and nuclear components. The numerical problems can be improved but not fully eliminated, at the cost of computational speed, by using B-spline least-squares fitting instead of cubic spline interpolation to determine the range function. The implementation of the B-spline least-square fitting has been taken from [Geometric Tools Engine](http://www.geometrictools.com/Source/CurvesSurfacesVolumes.html) (see also [license agreement](http://www.geometrictools.com/License/Boost/LICENSE_1_0.txt)) while the implementation of the cubic spline interpolation has been taken from [ROOT](http://project-mathlibs.web.cern.ch/project-mathlibs/sw/5_18_00/html/group__Interpolation.html). The main advantages of the integrator are that it is fast and does not suffer from the above mentioned systematic error. The main drawbacks are that it only yields results for SRIM and that it has some numerical problems around the maximum of the stopping power curve (see Figures 1 and 2 below). Also it does not allow separation of the energy loss into electronic and nuclear components. The numerical problems can be improved but not fully eliminated, at the cost of computational speed, by using B-spline least-squares fitting instead of cubic spline interpolation to determine the range function. The implementation of the B-spline least-square fitting has been taken from [Geometric Tools Engine](http://www.geometrictools.com/Source/CurvesSurfacesVolumes.html) (see also [license agreement](http://www.geometrictools.com/License/Boost/LICENSE_1_0.txt)) while the implementation of the cubic spline interpolation has been taken from [ROOT](http://project-mathlibs.web.cern.ch/project-mathlibs/sw/5_18_00/html/group__Interpolation.html).
# Figure 1 # Figure 1
![fig01](https://git.kern.phys.au.dk/ausa/ausalib/uploads/0d8ae35b5232e5401ee74bf3df88d363/fig01.jpg) ![fig01](uploads/0d8ae35b5232e5401ee74bf3df88d363/fig01.jpg)
# Figure 2 # Figure 2
![fig02](https://git.kern.phys.au.dk/ausa/ausalib/uploads/2843f9509537364d72ac62ce0fd66e32/fig02.jpg) ![fig02](uploads/2843f9509537364d72ac62ce0fd66e32/fig02.jpg)
# Figure 3 # Figure 3
![fig03](https://git.kern.phys.au.dk/ausa/ausalib/uploads/789d5761d0ec4d1885b24bb061d20d1f/fig03.jpg) ![fig03](uploads/789d5761d0ec4d1885b24bb061d20d1f/fig03.jpg)