From 44958840933d54cb99d3b4c3598be1607166fd17 Mon Sep 17 00:00:00 2001 From: hrocho Date: Tue, 8 Oct 2019 19:50:45 +0200 Subject: [PATCH 1/2] docs update --- CMakeLists.txt | 25 ------------- constants.h | 2 +- docs/catima_manual.md | 79 +++++++++++++++++---------------------- examples/dedx | Bin 0 -> 20968 bytes examples/dedx.cpp | 12 +++--- examples/ls_coefficients | Bin 0 -> 19416 bytes examples/makefile | 2 +- examples/materials | Bin 0 -> 20712 bytes examples/materials.cpp | 8 ++-- examples/simple | Bin 0 -> 22320 bytes examples/simple.cpp | 8 ++-- 11 files changed, 51 insertions(+), 85 deletions(-) create mode 100755 examples/dedx create mode 100755 examples/ls_coefficients create mode 100755 examples/materials create mode 100755 examples/simple diff --git a/CMakeLists.txt b/CMakeLists.txt index cbd6c55..e110597 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -113,31 +113,6 @@ if(PYTHON_MODULE) $) target_link_libraries(pycatima PRIVATE catima) -# find_program(CYTHON_EXECUTABLE -# NAMES cython cython2 cython3 cython.bat -# DOC "path to the cython executable" -# ) -# if(NOT CYTHON_EXECUTABLE) -# MESSAGE(SEND_ERROR "Cython not found, it is required to build nurex python modules") -# endif(NOT CYTHON_EXECUTABLE) -# MESSAGE(STATUS "Cython found: " ${CYTHON_EXECUTABLE}) - - ### build libraries string -# foreach(entry ${EXTRA_LIBS} ${GSL_LIBRARIES} catima) -# LIST (APPEND EXTRA_PYTHON_LIBS \"${entry}\") -# endforeach(entry ${EXTRA_LIBS} ${GSL_LIBRARIES} catima) -# string (REPLACE ";" "," EXTRA_PYTHON_LIBS "${EXTRA_PYTHON_LIBS}") -# if(THREADS) -# set (CYTHON_DEFINES "-DUSE_THREADS=1") -# endif(THREADS) - ### insert libraries string and create setup.py -# FILE(COPY catimac.pxd catima.pyx DESTINATION ${PROJECT_BINARY_DIR}) -# set(CATIMA_LIB ${CMAKE_SHARED_LIBRARY_PREFIX}catima${CMAKE_SHARED_LIBRARY_SUFFIX}) -# configure_file(${CMAKE_CURRENT_SOURCE_DIR}/setup.py.in ${PROJECT_BINARY_DIR}/setup.py) -# add_custom_target(target_python ALL DEPENDS catima) -# add_custom_command(TARGET target_python -# COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_BINARY_DIR}/setup.py build_ext ${CYTHON_DEFINES} -i -# ) endif(PYTHON_MODULE ) ########## Sub Directories ########### diff --git a/constants.h b/constants.h index 24c365d..96ce7c8 100644 --- a/constants.h +++ b/constants.h @@ -27,7 +27,7 @@ constexpr bool reactions = true; constexpr bool reactions = false; #endif - +constexpr double PI = 3.1415926535897932384626433832795; constexpr double Avogadro = 6.022140857; // 10^23 constexpr double electron_mass = 0.510998928; // MeV/c^2 constexpr double atomic_mass_unit = 931.4940954; // MeV/c^2 diff --git a/docs/catima_manual.md b/docs/catima_manual.md index 97ddf54..0661a93 100644 --- a/docs/catima_manual.md +++ b/docs/catima_manual.md @@ -1,10 +1,10 @@ -CATima library manual {#mainpage} +CATima library manual ===================== Compiling and Instalation ------------------------- See [README.md](README.md) for details. - +[link2](catima_calculator.md) Units ------ The following units are used for input and outputs: @@ -41,27 +41,29 @@ There are 2 ways to define materials: specifying all elements in constructor or The example of water definition: ```cpp + +catima::Material carbon({0,6,1}); // carbon with elemental atomic weight + catima::Material water1({ - {1,1,2}, // 2 atoms of 1H - {16,8,1} // 1 atom of 16O + {1,1,2}, // {weight, Z, stn or weight fraction} + {16,8,1} }); water1.density(1.0); -water1.thickness(2.0); +water1.thickness(2.0); +water1.I(78.); // set custom ionization potential in eV catima::Material water2; water2.add_element(1,1,2); water2.add_element(16,8,1); water2.density(1.0).thickness(2.0); ``` -If mass number is equal to 0, the mass number of the element is taken as atomic weight of the element with provided Z -Other methods which can be used for Material: +If mass number is equal to 0, the mass number of the element is taken as atomic weight of the element. +Compound elements can be defined either via stoichiometric number or via weight fraction. If the number is less than 1 +it is assumed weight fraction is being used, otherwise stoichiometric number or molar fraction is being used. ```cpp -double den = water2.density(); //den equals 1.0 -double th = water2.thickness(); //th equals 2.0 -double molar_mass = water2.M(); // get molar mass of water -int ncomp = water2.ncomponents(); // ncomp equals 2 +catima::Material air ({{0,7,0.755267},{0,8,0.231781},{0,18,0.012827},{0,6,0.000124}},0.001205); // weight fractions +catima::Material water ({{0,1,2},{0,8,1}},1); // mole fraction ``` - ### predefined materials ### If the library is compiled with predefined materials database, the Material can be retrieved from the database as: ```cpp @@ -69,32 +71,9 @@ using namespace catimal Material water = get_material(material::WATER); Material graphite = get_material(6); ``` -currently all meterial up to Z=98 are predefined plus compounds from MOCADI: -``` - enum material{ - PLASTIC = 201, - AIR = 202, - CH2, - LH2, - LD2, - WATER, - DIAMOND, - GLASS, - ALMG3, - ARCO2_30, - CF4, - ISOBUTANE, - KAPTON, - MYLAR, - NAF, - P10, - POLYOLEFIN, - CMO2, - SUPRASIL, - HAVAR - }; -``` - + +The list of predefined material can be found at __material_database.h__ file + Calculation ----------- @@ -117,7 +96,7 @@ Both function returns structure ___Result___ which contains all calculated varia double sigma_E=0.0; double sigma_a=0.0; double sigma_r=0.0; - double tof=0.0; + double tof=0.0; }; ``` @@ -130,7 +109,6 @@ double domega2dx(Projectile &p, double T, const Material &t, Config c=default_co double range(Projectile &p, double T, const Material &t, Config c=default_config); double range_straggling(Projectile &p, double T, const Material &t, Config c=default_config); double angular_straggling(Projectile &p, double T, const Material &t, Config c=default_config); -\end{verbatim} ``` Example calculation: @@ -162,7 +140,7 @@ Layers can be copied from existing Layes: ```cpp catima::Layers matter2; matter2 = matter1; //matter2 contain 3 layers -matter2.add(nitrogen); +matter2.add(nitrogen); matter2.add(graphite); //matter2 contains 5 layers now ``` @@ -179,9 +157,20 @@ This __default_config__ is supplied as default argument to functions like catima the structure Config is defined as: ```cpp struct Config{ - char z_effective=z_eff_type::atima; - char skip=skip_none; - char dedx = 0; + #ifndef GLOBAL + unsigned char z_effective=z_eff_type::pierce_blann; + #else + unsigned char z_effective=z_eff_type::atima14; + #endif + + #ifdef REACTIONS + unsigned char skip=skip_none; + #else + unsigned char skip=skip_calculation::skip_reactions; + #endif + + unsigned char corrections = 0; + unsigned char calculation = 1; }; ``` @@ -223,7 +212,7 @@ For example check examples directory and makefile inside to see how to link. All functions and classes are inside __catima namespace__ Normally including main file is enough: -```cppp +```cpp #include "catima/catima.h" ``` diff --git a/examples/dedx b/examples/dedx new file mode 100755 index 0000000000000000000000000000000000000000..fd408f7f9ce685bf75485044a23375f0ab18699c GIT binary patch literal 20968 zcmeHP3v^q>nI7A*V*;@q8bb(yC=jRvM6vwBSqPCFD_jRVnAk}JC0rCqwpC=wD_sXC zZCcY5wyJCJc3aBn(yf=ivUFS0ZrjaaX)y^4DP>s~wlpn$xb%TTC^3(;X`7<`{+aou zs~f2c?e00G(choF~dqo+B~E_bLLeN`1w-v|QsQprp4~^PO~wmSf5u5+%JtX?&jIFcrETq*qET zU3Sv&X-bbN^E36i6kj;#x1~`bnA-IyHe)N5-q@O4I-}cN!;R5?5lnh}wccK>$JC|u zm~uSH41FHed?#%Mj}lXorPTQgD@6IeWwLk*eNw@KDeGMaJ@WI-CJy^1U0H>OZ z9?q8v;Pt5Zf;{r`;9x#G7ehWD9xEXKp#u1}0(f-+`v(fh4;H{H&?Z-&cAYFB-%_C7 zOA6Sb4$K#a)dl4J1>}DKe1SMejC+-{RVY*X2tI@ld#PkwYcT$T0V~oUz?c(eTX%;U z3Maz7k)#z)ba$+a#$(~`!1icZm}YN(JZ2`XK*BOjC7NIGhK)_iWOGLVRw9AuI*-50 z@-#(a5eucru5iMPqK39Et1*yB1a`KC+WYJMet#$w5@tr-(+~>x1O}s)8H~qzBE5ba zZ*?#b4GuNm+7hPOvK+64qA~YfNOwc>Q=?3b=m~lo3ui~OE0B4)g}=`!m&`aEeKyd!M;Gkv=V`cm23<8{hNT*Zx19RK{KAT65&99TesO=Yx=vI5DOTw znj`U~35jq+8=Beb@$bkO?_9sBE8b<2|Dk9naI<%4$Q%eKlJOYAVeK?`)XMs!NrdFh z)E(?b&5dT~HN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4iaty$+ok;{uwK_0H<4ETt7d@V#?25 zAtIAD$3;Q+d*~S_>+|z2rk7|*_MhdL-U2>7GvzWr7h^iC^~rzoll|AQ*o6$ml=b=f z8B>04%k{H9xBmlLzeOA5=fF&7G*0^T6W^(SCoqZ$`6m-Uchi*b+cDeO|0yu+`Yx@< zbRR2f>M$?g;k4`X{V=Atv%?O3Hv0)=?E3s1kSRa^XL+ap<658NFI-wuQ+iL;o*eFo zy+^karcc_Hk$2Yrb%#Dbe`Gp9gT|Je^-q9jub-b&GNtvwo*c~)PlHMK*0>tJ z@6P{Y#{I=MxPGQT27~SuvOYie9ABw4Sgw%%i(v5FAQ^s6!2c8H(t+ji$@bW<*Pugf z;`;eH>LGnYwV90C66-TP0iIo7c(rh?qJ6r^g!P!xUkuvy`@C9D>+?Ky>T`K6l*tzR zKkQYUVXfax#%;-E%Tx9YUB4F3a9LkJCdlAy&Q5vkW`vNrM;n~bFVxU=h}LRuH@6G7 mS2MmNn@L;s{~aBt#od;;UWUj&ZaZT{JK9vK+M(bmivI>IL|d5v literal 0 HcmV?d00001 diff --git a/examples/dedx.cpp b/examples/dedx.cpp index f13ac59..a2697c1 100644 --- a/examples/dedx.cpp +++ b/examples/dedx.cpp @@ -5,22 +5,22 @@ using std::cout; using std::endl; -int main(){ +int main(){ catima::Material water({ // material with 2 atoms {1,1,2}, // 1H - two atoms {16,8,1} // 16O - 1 atom }); water.density(1.0).thickness(2.0); - + catima::Material water2({ // material with 2 atoms {1,1,2}, // 1H - two atoms {16,8,1} // 16O - 1 atom - },1.0,78); - + }, 1.0,78.); // density and custom ionization potential + water2.thickness(2.0); - + catima::Projectile p(12,6); // define projectile, ie 12C - + cout<<"C->H2O\n"; for(double T=0; T<11000;T+=50){ auto result = catima::calculate(p,water,T/12); diff --git a/examples/ls_coefficients b/examples/ls_coefficients new file mode 100755 index 0000000000000000000000000000000000000000..a34ac158a675c3afcd156e8c2686190374281164 GIT binary patch literal 19416 zcmeHPeQ;aVmA|rM;sCL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wI}-BkDt<6eO@PFy3j6+Jbo_cr3RGj z`n;aP)RQMYUZ0+i;Pu1=`_JnxOu2skJ&K>ld1)O=^el+=dEJodQPp5P?vQa}eO|xY z2%H|tu|BWkFy(beh{)uOA3bNGH9pqo^&X~+lpg!fa!hXnpVkby%x9eyne)#*Dbkz*5~%$sq~wbL0)HKO3&*lkv=^daO&R+jABCm$;8hu73JrK z%qCy$DUE_%-=p-H?z0Oc?=UYOaOm@MD5n0bW0oP-XR{AG^m!eODOPOqlGFcP;FA9w zf8jxal1Kg(6~we9jvqt2k+JLZb77_jSx`}D{oi-!^ZFZ8jXI4jIqM$*&t5;T(`Bhm zm$HuLi06ROvn#HKpF8t+yqxjo`kDR)y7Y{W^?BWI*Ajq8EN7K+WyW6zgU1HR@N;th zPMSxZ814qF$9}y79cmNT&+CX!s|T5lWYm^epXn*^?E1o|gsUvtt%^)ok12hp%dX$; zQ+i6D$Ej1F%Tu9Dw%GrEpT+5CeKKxK9$TKW(^UORJj-Q$^;kWNvpGA>_Wi6Bz8|Cv z_Nf<2=sHAmHMg7Fg~x?i-)-u`t-dp~k{|RdCfCcd -#endif namespace catima{ @@ -58,17 +56,7 @@ double SigmaR_Kox(int Ap, int Zp, double E, int At, int Zt); inline double p_from_T(double T, double M=1.0){ return M*sqrt(T*T + 2*T*atomic_mass_unit); } -/* -inline double Ecm_from_T_relativistic(double T, double Ap, double At){ - double mp = Ap*atomic_mass_unit; - double mt = At*atomic_mass_unit; - double plab= p_from_T(T,Ap); - double elab = sqrt(plab*plab + mp*mp); - double ecm = sqrt(mp*mp + mt*mt + 2*elab*mt); - double pcm = plab * mt / ecm; - return sqrt(pcm*pcm+mp*mp)-mp; -} -*/ + /// calculates Ecm fom T, return in MeV units inline double Ecm_from_T(double T, double Ap, double At){ return T*Ap*At/(Ap+At); diff --git a/structures.h b/structures.h index 53f37ad..154911c 100644 --- a/structures.h +++ b/structures.h @@ -87,6 +87,7 @@ namespace catima{ * Maetrial water({ {1,1,2}, {16,8,1}, + 1.0, // optional density }); * \endcode */