diff --git a/.gitignore b/.gitignore index b8b5399..8d18470 100644 --- a/.gitignore +++ b/.gitignore @@ -34,4 +34,5 @@ ana/* benchmark/* -build/* \ No newline at end of file +build/* +.vscode/* diff --git a/catima.cpp b/catima.cpp index a4d8949..9ce17bb 100644 --- a/catima.cpp +++ b/catima.cpp @@ -255,7 +255,7 @@ Result calculate(Projectile &p, const Material &t, const Config &c){ res.sigma_r = sqrt(range_straggling_spline(T)); res.Eloss = (res.Ein - res.Eout)*p.A; #ifdef NUREX - res.sp = nonreaction_rate1(p,t,c); + res.sp = nonreaction_rate(p,t,c); #endif return res; } diff --git a/config.h b/config.h index 4498877..b78a5e4 100644 --- a/config.h +++ b/config.h @@ -22,17 +22,18 @@ namespace catima{ /** * enum to select which calculation to skip */ - enum skip_calculation:char{ + enum skip_calculation:unsigned char{ skip_none = 0, skip_tof = 1, skip_sigma_a = 2, - skip_sigma_r = 4 + skip_sigma_r = 4, + skip_reactions = 128 }; /** * enum to select which dEdx correction to skip */ - enum corrections:char{ + enum corrections:unsigned char{ no_barkas = 1, no_lindhard = 2, no_shell_correction = 4 @@ -41,7 +42,7 @@ namespace catima{ /** * enum to select which dEdx straggling options */ - enum omega:char{ + enum omega:unsigned char{ atima = 0, bohr = 1, }; @@ -55,11 +56,15 @@ namespace catima{ * */ struct Config{ - char z_effective=z_eff_type::pierce_blann; + unsigned char z_effective=z_eff_type::pierce_blann; //char z_effective=z_eff_type::atima14; - char skip=skip_none; - char dedx = 0; - char dedx_straggling = omega::atima; + unsigned char dedx = 0; + unsigned char dedx_straggling = omega::atima; + #ifdef NUREX + unsigned char skip=skip_none; + #else + unsigned char skip=skip_calculation::skip_reactions; + #endif }; extern Config default_config; diff --git a/reactions.cpp b/reactions.cpp index 6317d9b..906b002 100644 --- a/reactions.cpp +++ b/reactions.cpp @@ -9,9 +9,10 @@ #include namespace catima{ -double nonreaction_rate1(Projectile &projectile, const Material &target, const Config &c){ +double nonreaction_rate(Projectile &projectile, const Material &target, const Config &c){ if(projectile.T