diff --git a/docs/calculations.tex b/docs/calculations.tex index e46c492..4880bf0 100644 --- a/docs/calculations.tex +++ b/docs/calculations.tex @@ -29,11 +29,41 @@ The range spline precision is checked via calculating dE/dx from inverse derivat \end{figure} +\section{Lindhard-Soerensen} +The Lindhard-Soerensen (LS) corrections to energy loss and energy loss straggling can be calculated directly or from precalculated values, which is useful when performance is needed. The precalculated LS coefficients are calculated at predefined log distributed energies. Below and above the energy limits the functions returns the value at minimal or maximal precalculated value. The take into account the different masses the Ls coefficients are precalculated for 2 different masses and final coefficients are estimated using a linear interpolation between the two calculations. + + +The calculated LS coefficients are plotted in Fig. \ref{ls}. +For the comparison and check of precalculated LS coefficients the LS coefficients and relative difference to directly calculated coefficients for different masses and charges are plotted in Figures \ref{ls_prec} amd \ref{lsX_prec}. + +\begin{figure} +\centering +\includegraphics[width=6.5cm]{plots/ls.png} +\includegraphics[width=6.5cm]{plots/lsX.png} +\caption{LS corrections for energy loss and energy loss straggling for different energies and projectile} +\label{ls} +\end{figure} + +\begin{figure} +\centering +\includegraphics[width=12cm]{plots/ls_precision.png} +\caption{LS corrections for energy loss directly calculated and calculated from the tabulated values for different Z and A. On the right the relative differences are plotted. The lowest energy for precalculation was set to 1 MeV/u.} +\label{ls_prec} +\end{figure} + +\begin{figure} +\centering +\includegraphics[width=12cm]{plots/lsX_precision.png} +\caption{LS corrections for energy loss directly calculated and calculated from the tabulated values for different Z and A. On the right the relative differences are plotted. The lowest energy for precalculation was set to 1 MeV/u.} +\label{lsX_prec} +\end{figure} + + + \section{Benchmarks} \subsection{Thin Target Approximation} test: projectile: 238U@700MeV/u - 30GeV/u, material: C(1mg/cm2), 30000 calculation in loop. - reults: with thin target pproximation: 2.4s, without: 2.4s \end{document} \ No newline at end of file diff --git a/docs/plots/ls.png b/docs/plots/ls.png new file mode 100644 index 0000000..de50d6d Binary files /dev/null and b/docs/plots/ls.png differ diff --git a/docs/plots/lsX.png b/docs/plots/lsX.png new file mode 100644 index 0000000..b3a32a3 Binary files /dev/null and b/docs/plots/lsX.png differ diff --git a/docs/plots/lsX_precision.png b/docs/plots/lsX_precision.png new file mode 100644 index 0000000..66a9a81 Binary files /dev/null and b/docs/plots/lsX_precision.png differ diff --git a/docs/plots/ls_precision.png b/docs/plots/ls_precision.png new file mode 100644 index 0000000..2bb79de Binary files /dev/null and b/docs/plots/ls_precision.png differ diff --git a/examples/ls_coefficients.cpp b/examples/ls_coefficients.cpp new file mode 100644 index 0000000..1cf542e --- /dev/null +++ b/examples/ls_coefficients.cpp @@ -0,0 +1,27 @@ +/** + * this example program print out Lindhard - Soerrensen coefficients for 238U + */ + +#include "catima/catima.h" +#include "catima/storage.h" +#include + +using std::cout; +using std::endl; + + +int main(){ + + catima::Projectile p(238,92); // define projectile, ie 12C + + cout<<"projectile 238U\n"; + + auto energies = catima::EnergyTable<50>(2,5); // get energy table, energies log distributed between 10^2 and 10000^5; + for(double T:energies){ + auto ls = catima::bethek_lindhard(p(T)); + auto lsX = catima::bethek_lindhard_X(p(T)); + cout<<"T "<