1
0
Fork 0
mirror of https://github.com/gwm17/catima.git synced 2024-11-23 02:38:51 -05:00
catima/config.h

74 lines
1.7 KiB
C
Raw Normal View History

2017-07-25 12:19:11 -04:00
/// \file config.h
#ifndef CONFIG
#define CONFIG
#include <cstring>
namespace catima{
/**
* \enum z_eff_type
* enum to select formulat to calculate effective charge of the Projectile
*/
enum z_eff_type:char {
none = 0,
pierce_blann = 1,
anthony_landorf = 2,
2018-01-15 09:11:51 -05:00
hubert = 3,
winger = 4,
schiwietz = 5,
2018-01-18 13:20:42 -05:00
global = 6,
atima14 = 7
2017-07-25 12:19:11 -04:00
};
/**
* enum to select which calculation to skip
*/
2018-07-31 09:34:41 -04:00
enum skip_calculation:unsigned char{
2017-07-25 12:19:11 -04:00
skip_none = 0,
skip_tof = 1,
skip_sigma_a = 2,
2018-07-31 09:34:41 -04:00
skip_sigma_r = 4,
skip_reactions = 128
2017-07-25 12:19:11 -04:00
};
/**
* enum to select which dEdx correction to skip
*/
2018-07-31 09:34:41 -04:00
enum corrections:unsigned char{
2017-07-25 12:19:11 -04:00
no_barkas = 1,
no_lindhard = 2,
no_shell_correction = 4
};
2018-01-18 13:20:42 -05:00
/**
* enum to select which dEdx straggling options
*/
2018-07-31 09:34:41 -04:00
enum omega:unsigned char{
2018-01-18 13:20:42 -05:00
atima = 0,
bohr = 1,
};
2017-07-25 12:19:11 -04:00
/**
* structure to store calculation configuration
* each group of options are grouped and enum are suppose to use
* see catima::z_eff_type, catima::skip_calculation, catima::corrections
*
* check catima::z_effective()
*
*/
struct Config{
2018-07-31 09:34:41 -04:00
unsigned char z_effective=z_eff_type::pierce_blann;
2018-01-18 13:20:42 -05:00
//char z_effective=z_eff_type::atima14;
2018-07-31 09:34:41 -04:00
unsigned char dedx = 0;
unsigned char dedx_straggling = omega::atima;
2018-07-31 11:40:25 -04:00
#ifdef REACTIONS
2018-07-31 09:34:41 -04:00
unsigned char skip=skip_none;
#else
unsigned char skip=skip_calculation::skip_reactions;
#endif
2017-07-25 12:19:11 -04:00
};
extern Config default_config;
}
#endif