mirror of
https://github.com/gwm17/catima.git
synced 2024-11-22 18:28:51 -05:00
ls docs and example
This commit is contained in:
parent
f146d72966
commit
58ce7fcb3a
|
@ -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}
|
BIN
docs/plots/ls.png
Normal file
BIN
docs/plots/ls.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 20 KiB |
BIN
docs/plots/lsX.png
Normal file
BIN
docs/plots/lsX.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 28 KiB |
BIN
docs/plots/lsX_precision.png
Normal file
BIN
docs/plots/lsX_precision.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 58 KiB |
BIN
docs/plots/ls_precision.png
Normal file
BIN
docs/plots/ls_precision.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 59 KiB |
27
examples/ls_coefficients.cpp
Normal file
27
examples/ls_coefficients.cpp
Normal file
|
@ -0,0 +1,27 @@
|
|||
/**
|
||||
* this example program print out Lindhard - Soerrensen coefficients for 238U
|
||||
*/
|
||||
|
||||
#include "catima/catima.h"
|
||||
#include "catima/storage.h"
|
||||
#include <iostream>
|
||||
|
||||
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 "<<T<<", Delta LS = "<<ls<<", X = "<<lsX<<endl;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
PROGRAMS=simple example2 materials
|
||||
PROGRAMS=simple example2 materials ls_coefficients
|
||||
|
||||
GCC=g++ -Wall -std=c++14
|
||||
INCDIR=-I$(CATIMAPATH)/include
|
||||
|
|
Loading…
Reference in New Issue
Block a user