mirror of
https://github.com/gwm17/catima.git
synced 2024-11-22 18:28:51 -05:00
config change
This commit is contained in:
parent
75f8a1a002
commit
e8d2973a79
|
@ -447,7 +447,7 @@ double bremsstrahlung(const Projectile &p, const Target &t){
|
|||
double sezi_dedx_e(const Projectile &p, const Material &mat, const Config &c){
|
||||
double w;
|
||||
double sum=0.0;
|
||||
bool use95 = config_lowenergy(c) == low_energy_types::srim_95;
|
||||
bool use95 = c.low_energy == low_energy_types::srim_95;
|
||||
for(int i=0;i<mat.ncomponents();i++){
|
||||
auto t = mat.get_element(i);
|
||||
w = mat.weight_fraction(i);
|
||||
|
@ -576,7 +576,7 @@ double dedx_variance(Projectile &p, Target &t, const Config &c){
|
|||
double zp_eff = z_effective(p,t,c);
|
||||
double f = domega2dx_constant*pow(zp_eff,2)*t.Z/t.A;
|
||||
|
||||
if(config_omega(c) == omega_types::atima){
|
||||
if( (c.calculation == omega_types::atima) ){
|
||||
cor = 24.89 * pow(t.Z,1.2324)/(electron_mass*1e6 * beta2)*
|
||||
log( 2.0*electron_mass*1e6*beta2/(33.05*pow(t.Z,1.6364)));
|
||||
cor = std::max(cor, 0.0 );
|
||||
|
|
21
config.h
21
config.h
|
@ -30,7 +30,7 @@ namespace catima{
|
|||
};
|
||||
|
||||
/**
|
||||
* enum to select which dEdx straggling options
|
||||
* enum to select dEdx straggling options
|
||||
*/
|
||||
enum omega_types:unsigned char{
|
||||
atima = 0,
|
||||
|
@ -38,7 +38,7 @@ namespace catima{
|
|||
};
|
||||
|
||||
/**
|
||||
* enum to select which how low energy part is calculated
|
||||
* enum to select how low energy part is calculated
|
||||
*/
|
||||
enum low_energy_types:unsigned char{
|
||||
srim_85 = 0,
|
||||
|
@ -57,24 +57,9 @@ namespace catima{
|
|||
|
||||
unsigned char corrections = 0;
|
||||
unsigned char calculation = 1;
|
||||
unsigned char low_energy = 0;
|
||||
};
|
||||
|
||||
inline void set_config_lowenergy(Config c, low_energy_types lt){
|
||||
c.calculation = c.calculation & (lt<<2);
|
||||
}
|
||||
|
||||
inline unsigned char config_lowenergy(const Config c){
|
||||
return (c.calculation>>2) & 0x7;
|
||||
}
|
||||
|
||||
inline void set_config_omega(Config c, omega_types ot){
|
||||
c.calculation = c.calculation & ot;
|
||||
}
|
||||
|
||||
inline unsigned char config_omega(const Config c){
|
||||
return c.calculation & 0x3;
|
||||
}
|
||||
|
||||
|
||||
extern Config default_config;
|
||||
}
|
||||
|
|
13
constants.h
13
constants.h
|
@ -4,22 +4,16 @@
|
|||
#include "catima/build_config.h"
|
||||
namespace catima {
|
||||
|
||||
// config
|
||||
constexpr double Ezero = 1E-3; // lowest E to calculate, below taken as 0
|
||||
constexpr double logEmin = -3; // log of minimum energy
|
||||
constexpr double logEmax = 7.0; // log of max energy
|
||||
constexpr int max_datapoints = 500; // how many datapoints between logEmin and logEmax
|
||||
constexpr int max_storage_data = 60; // number of datapoints which can be stored in cache
|
||||
constexpr double numeric_epsilon = std::numeric_limits<double>::epsilon();
|
||||
|
||||
/// required integration precision (relative units)
|
||||
/*
|
||||
constexpr double int_eps_range = 0.001;
|
||||
constexpr double int_eps_range_str = 0.001;
|
||||
constexpr double int_eps_ang_str = 0.01;
|
||||
constexpr double int_eps_tof = 0.01;
|
||||
*/
|
||||
constexpr double numeric_epsilon = 10*std::numeric_limits<double>::epsilon();
|
||||
|
||||
constexpr double thin_target_limit = 1 - 1e-3;
|
||||
|
||||
#ifdef REACTIONS
|
||||
constexpr double emin_reaction = 30.0;
|
||||
constexpr bool reactions = true;
|
||||
|
@ -27,6 +21,7 @@ constexpr bool reactions = true;
|
|||
constexpr bool reactions = false;
|
||||
#endif
|
||||
|
||||
// constants
|
||||
constexpr double PI = 3.1415926535897932384626433832795;
|
||||
constexpr double Avogadro = 6.022140857; // 10^23
|
||||
constexpr double electron_mass = 0.510998928; // MeV/c^2
|
||||
|
|
286
data_atima.h
286
data_atima.h
|
@ -4,293 +4,7 @@
|
|||
// this is taken from atima
|
||||
|
||||
namespace catima{
|
||||
/*
|
||||
constexpr double proton_stopping_coef[92][8] = { // proton in material stopping coefficient
|
||||
{ .0091827, .0053496, .69741, .48493, 316.07,1.0143, 9329.3, .0539890}, //H
|
||||
{ .11393, .0051984, 1.0822, .39252, 1081.0, 1.0645, 4068.5, .0176990}, //He
|
||||
{ .85837, .0050147, 1.6044, .38844, 1337.3, 1.0470, 2659.2, .01898},
|
||||
{ .8781, .0051049, 5.4232, .2032, 1200.6, 1.0211, 1401.8, .0385290},
|
||||
{ 1.4608, .0048836, 2.338, .44249, 1801.3, 1.0352, 1784.1, .02024},
|
||||
{ 3.2579, .0049148, 2.7156, .36473, 2092.2, 1.0291, 2643.6, .0182370}, //C
|
||||
{ .59674, .0050837, 4.2073, .30612, 2394.2, 1.0255, 4892.1, .0160060},
|
||||
{ .75253, .0050314, 4.0824, .30067, 2455.8, 1.0181, 5069.7, .0174260}, //O
|
||||
{ 1.226, .0051385, 3.2246, .32703, 2525.0, 1.0142, 7563.6, .0194690},
|
||||
{ 1.0332, .0051645, 3.004, .33889, 2338.6, .99997, 6991.2, .0217990}, //Ne
|
||||
{ 6.0972, .0044292, 3.1929, .45763, 1363.3, .95182, 2380.6, .0818350},
|
||||
{14.013, .0043646, 2.2641, .36326, 2187.4, .99098, 6264.8, .0462},
|
||||
{ .039001, .0045415, 5.5463, .39562, 1589.2, .95316, 816.16, .0474840},
|
||||
{ 2.072, .0044516, 3.5585, .53933, 1515.2, .93161, 1790.3, .0351980},
|
||||
{17.575, .0038346, .078694, 1.2388,2806.0, .97284, 1037.6, .0128790},
|
||||
{16.126, .0038315, .054164, 1.3104,2813.3, .96587, 1251.4, .0118470},
|
||||
{ 3.217, .0044579, 3.6696, .5091, 2734.6, .96253, 2187.5, .0169070},
|
||||
{ 2.0379, .0044775, 3.0743, .54773, 3505.0, .97575, 1714.00, .0117010},
|
||||
{ .74171, .0043051, 1.1515, .95083, 917.21, .8782, 389.93, .18926},
|
||||
{ 9.1316, .0043809, 5.4611, .31327, 3891.8, .97933, 6267.9, .0151960}, //Ca
|
||||
{ 7.2247, .0043718, 6.1017, .37511, 2829.2, .95218, 6376.1, .0203980},
|
||||
{ .147, .0048456, 6.3485, .41057, 2164.1, .94028, 5292.6, .0502630},
|
||||
{ 5.0611, .0039867, 2.6174, .57957, 2218.9, .92361, 6323.00, .0256690},
|
||||
{ .53267, .0042968, .39005, 1.2725, 1872.7, .90776, 64.166, .0301070},
|
||||
{ .47697, .0043038, .31452, 1.3289, 1920.5, .90649, 45.576, .0274690},
|
||||
{ .027426, .0035443, .031563, 2.1755, 1919.5, .90099, 23.902, .0253630},
|
||||
{ .16383, .0043042, .073454, 1.8592, 1918.4, .89678, 27.61, .0231840},
|
||||
{ 4.2562, .0043737, 1.5606, .72067, 1546.8, .87958, 302.02, .0409440}, //Ni
|
||||
{ 2.3508, .0043237, 2.882, .50113, 1837.7, .89992, 2377.00, .04965},
|
||||
{ 3.1095, .0038455, .11477, 1.5037, 2184.7, .89309, 67.306, .0165880},
|
||||
{15.322, .0040306, .65391, .67668, 3001.7, .92484, 3344.2, .0163660},
|
||||
{ 3.6932, .0044813, 8.608, .27638, 2982.7, .9276, 3166.6, .0308740},
|
||||
{ 7.1373, .0043134, 9.4247, .27937, 2725.8, .91597, 3166.1, .0250080},
|
||||
{ 4.8979, .0042937, 3.7793, .50004, 2824.5, .91028, 1282.4, .0170610},
|
||||
{ 1.3683, .0043024, 2.5679, .60822, 6907.8, .9817, 628.01, .0068055},
|
||||
{ 1.8301, .0042983, 2.9057, .6038, 4744.6, .94722, 936.64, .0092242},
|
||||
{ .42056, .0041169, .01695, 2.3616, 2252.7, .89192, 39.752, .0277570},
|
||||
{30.78, .0037736, .55813, .76816, 7113.2, .97697, 1604.4, .0065268},
|
||||
{11.576, .0042119, 7.0244, .37764, 4713.5, .94264, 2493.2, .01127},
|
||||
{ 6.2406, .0041916, 5.2701, .49453, 4234.6, .93232, 2063.9, .0118440},
|
||||
{ .33073, .0041243, 1.7246, 1.1062, 1930.2, .86907, 27.416, .0382080},
|
||||
{ .017747, .0041715, .14586, 1.7305,1803.6, .86315, 29.669, .0321230},
|
||||
{ 3.7229, .0041768, 4.6286, .56769, 1678.0, .86202, 3094.00, .06244},
|
||||
{ .13998, .0041329, .25573, 1.4241, 1919.3, .86326, 72.797, .0322350},
|
||||
{ .2859, .0041386, .31301, 1.3424, 1954.8, .86175, 115.18, .0293420},
|
||||
{ .76, .0042179, 3.386, .76285, 1867.4, .85805, 69.994, .0364480},
|
||||
{ 6.3957, .0041935, 5.4689, .41378, 1712.6, .85397,18493.00, .0564710},
|
||||
{ 3.4717, .0041344, 3.2337, .63788, 1116.4, .81959, 4766.0, .1179},
|
||||
{ 2.5265, .0042282, 4.532, .53562, 1030.8, .81652,16252.0, .19722},
|
||||
{ 7.3683, .0041007, 4.6791, .51428, 1160.0, .82454,17965.0, .13316},
|
||||
{ 7.7197, .004388, 3.242, .68434, 1428.1, .83398, 1786.7, .0665120},
|
||||
{16.78, .0041918, 9.3198, .29568, 3370.9, .90289, 7431.7, .02616},
|
||||
{ 4.2132, .0042098, 4.6753, .57945, 3503.9, .89261, 1468.9, .0143590},
|
||||
{ 4.0818, .004214, 4.4425, .58393, 3945.3, .90281, 1340.5, .0134140}, //Xe
|
||||
{.18517, .0036215, .00058788,3.5315, 2931.3, .88936, 26.18, .0263930},
|
||||
{ 4.8248, .0041458, 6.0934, .57026, 2300.1, .86359, 2980.7, .0386790},
|
||||
{ .49857, .0041054, 1.9775, .95877, 786.55, .78509, 806.6, .40882},
|
||||
{ 3.2754, .0042177, 5.768, .54054, 6631.3, .94282, 744.07, .0083026},
|
||||
{ 2.9978, .0040901, 4.5299, .62025, 2161.2, .85669, 1268.6, .0430310},
|
||||
{ 2.8701, .004096, 4.2568, .6138, 2130.4, .85235, 1704.1, .0393850},
|
||||
{10.853, .0041149, 5.8907, .46834, 2857.2, .8755, 3654.2, .0299550},
|
||||
{ 3.6407, .0041782, 4.8742, .57861, 1267.7, .82211, 3508.2, .24174},
|
||||
{17.645, .0040992, 6.5855, .32734, 3931.3, .90754, 5156.7, .0362780},
|
||||
{ 7.5309, .0040814, 4.9389, .50679, 2519.7, .85819, 3314.6, .0305140},
|
||||
{ 5.4742, .0040829, 4.897, .51113, 2340.1, .85296, 2342.7, .0356620},
|
||||
{ 4.2661, .0040667, 4.5032, .55257, 2076.4, .84151, 1666.6, .0408010},
|
||||
{ 6.8313, .0040486, 4.3987, .51675, 2003.0, .83437, 1410.4, .03478},
|
||||
{ 1.2707, .0040553, 4.6295, .57428, 1626.3, .81858, 995.68, .0553190},
|
||||
{ 5.7561, .0040491, 4.357, .52496, 2207.3, .83796, 1579.5, .0271650},
|
||||
{14.127, .0040596, 5.8304, .37755, 3645.9, .87823, 3411.8, .0163920},
|
||||
{ 6.6948, .0040603, 4.9361, .47961, 2719.0, .85249, 1885.8, .0197130},
|
||||
{ 3.0619, .0040511, 3.5803, .59082, 2346.1, .83713, 1222.0, .0200720},
|
||||
{10.811, .0033008, 1.3767, .76512, 2003.7, .82269, 1110.6, .0249580},
|
||||
{ 2.7101, .0040961, 1.2289, .98598, 1232.4, .79066, 155.42, .0472940},
|
||||
{ .52345, .0040244, 1.4038, .8551, 1461.4, .79677, 503.34, .0367890},
|
||||
{ .4616, .0040203, 1.3014, .87043, 1473.5, .79687, 443.09, .0363010},
|
||||
{ .97814, .0040374, 2.0127, .7225, 1890.8, .81747, 930.7, .02769},
|
||||
{ 3.2086, .004051, 3.6658, .53618, 3091.2, .85602, 1508.1, .0154010},
|
||||
{ 2.0035, .0040431, 7.4882, .3561, 4464.3, .88836, 3966.5, .0128390},
|
||||
{15.43, .0039432, 1.1237, .70703, 4595.7, .88437, 1576.5, .0088534},
|
||||
{ 3.1512, .0040524, 4.0996, .5425, 3246.3, .85772, 1691.8, .0150580},
|
||||
{ 7.1896, .0040588, 8.6927, .35842, 4760.6, .88833, 2888.3, .0110290}, //Pb
|
||||
{ 9.3209, .004054, 11.543, .32027, 4866.2, .89124, 3213.4, .0119350},
|
||||
{29.242, .0036195, .16864, 1.1226, 5688.0, .89812, 1033.3, .0071303},
|
||||
{ 1.8522, .0039973, 3.1556, .65096, 3755.0, .86383, 1602.0, .0120420},
|
||||
{ 3.222, .0040041, 5.9024, .52678, 4040.2, .86804, 1658.4, .0117470},
|
||||
{ 9.3412, .0039661, 7.921, .42977, 5180.9, .88773, 2173.2, .0092007},
|
||||
{36.183, .0036003, .58341, .86747, 6990.2, .91082, 1417.1, .0062187},
|
||||
{ 5.9284, .0039695, 6.4082, .52122, 4619.5, .88083, 2323.5, .0116270},
|
||||
{ 5.2454, .0039744, 6.7969, .48542, 4586.3, .87794, 2481.5, .0112820},
|
||||
{33.702, .0036901, .47257, .89235, 5295.7, .8893, 2053.3, .0091908},
|
||||
{2.7589, .0039806, 3.2092, .66122, 2505.4, .82863, 2065.1, .0228160} //U
|
||||
};
|
||||
|
||||
const double atima_vfermi[92] = {
|
||||
1.0309,
|
||||
0.15976,
|
||||
0.59782,
|
||||
1.0781,
|
||||
1.0486,
|
||||
1.00,
|
||||
1.058,
|
||||
0.93942,
|
||||
0.74562,
|
||||
0.3424,
|
||||
0.45259,
|
||||
0.71074,
|
||||
0.90519,
|
||||
0.97411,
|
||||
0.97184,
|
||||
0.89852,
|
||||
0.70827,
|
||||
0.39816,
|
||||
0.36552,
|
||||
0.62712,
|
||||
0.81707,
|
||||
0.9943,
|
||||
1.1423,
|
||||
1.2381,
|
||||
1.1222,
|
||||
0.92705,
|
||||
1.0047,
|
||||
1.2,
|
||||
1.0661,
|
||||
0.97411,
|
||||
0.84912,
|
||||
0.95,
|
||||
1.0903,
|
||||
1.0429,
|
||||
0.49715,
|
||||
0.37755,
|
||||
0.35211,
|
||||
0.57801,
|
||||
0.77773,
|
||||
1.0207,
|
||||
1.029,
|
||||
1.2542,
|
||||
1.122,
|
||||
1.1241,
|
||||
1.0882,
|
||||
1.2709,
|
||||
1.2542,
|
||||
0.90094,
|
||||
0.74093,
|
||||
0.86054,
|
||||
0.93155,
|
||||
1.0047,
|
||||
0.55379,
|
||||
0.43289,
|
||||
0.32636,
|
||||
0.5131,
|
||||
0.6950,
|
||||
0.72591,
|
||||
0.71202,
|
||||
0.67413,
|
||||
0.71418,
|
||||
0.71453,
|
||||
0.5911,
|
||||
0.70263,
|
||||
0.68049,
|
||||
0.68203,
|
||||
0.68121,
|
||||
0.68532,
|
||||
0.68715,
|
||||
0.61884,
|
||||
0.71801,
|
||||
0.83048,
|
||||
1.1222,
|
||||
1.2381,
|
||||
1.045,
|
||||
1.0733,
|
||||
1.0953,
|
||||
1.2381,
|
||||
1.2879,
|
||||
0.78654,
|
||||
0.66401,
|
||||
0.84912,
|
||||
0.88433,
|
||||
0.80746,
|
||||
0.43357,
|
||||
0.41923,
|
||||
0.43638,
|
||||
0.51464,
|
||||
0.73087,
|
||||
0.81065,
|
||||
1.9578,
|
||||
1.0257};
|
||||
|
||||
|
||||
|
||||
const double atima_lambda_screening[92]= {
|
||||
1.00,
|
||||
1.00,
|
||||
1.10,
|
||||
1.06,
|
||||
1.01,
|
||||
1.03,
|
||||
1.04,
|
||||
0.99,
|
||||
0.95,
|
||||
0.90,
|
||||
0.82,
|
||||
0.81,
|
||||
0.83,
|
||||
0.88,
|
||||
1.00,
|
||||
0.95,
|
||||
0.97,
|
||||
0.99,
|
||||
0.98,
|
||||
0.97,
|
||||
0.98,
|
||||
0.97,
|
||||
0.96,
|
||||
0.93,
|
||||
0.91,
|
||||
0.9,
|
||||
0.88,
|
||||
0.9,
|
||||
0.9,
|
||||
0.9,
|
||||
0.9,
|
||||
0.85,
|
||||
0.9,
|
||||
0.9,
|
||||
0.91,
|
||||
0.92,
|
||||
0.9,
|
||||
0.9,
|
||||
0.9,
|
||||
0.9,
|
||||
0.9,
|
||||
0.88,
|
||||
0.9,
|
||||
0.88,
|
||||
0.88,
|
||||
0.9,
|
||||
0.9,
|
||||
0.88,
|
||||
0.9,
|
||||
0.9,
|
||||
0.9,
|
||||
0.9,
|
||||
0.96,
|
||||
1.2,
|
||||
0.9,
|
||||
0.88,
|
||||
0.88,
|
||||
0.85,
|
||||
0.90,
|
||||
0.90,
|
||||
0.92,
|
||||
0.95,
|
||||
0.99,
|
||||
1.03,
|
||||
1.05,
|
||||
1.07,
|
||||
1.08,
|
||||
1.10,
|
||||
1.08,
|
||||
1.08,
|
||||
1.08,
|
||||
1.08,
|
||||
1.09,
|
||||
1.09,
|
||||
1.10,
|
||||
1.11,
|
||||
1.12,
|
||||
1.13,
|
||||
1.14,
|
||||
1.15,
|
||||
1.17,
|
||||
1.20,
|
||||
1.18,
|
||||
1.17,
|
||||
1.17,
|
||||
1.16,
|
||||
1.16,
|
||||
1.16,
|
||||
1.16,
|
||||
1.16,
|
||||
1.16,
|
||||
1.16};
|
||||
|
||||
*/
|
||||
}
|
||||
namespace density_effect{
|
||||
const double x0[97]= {
|
||||
|
|
Loading…
Reference in New Issue
Block a user