diff --git a/calculations.cpp b/calculations.cpp index dc35ae6..f0875e1 100644 --- a/calculations.cpp +++ b/calculations.cpp @@ -88,7 +88,7 @@ double bethek_dedx_e(Projectile &p, const Target &t, const Config &c, double I){ double f2 = log(2.0*electron_mass*1000000*beta2/Ipot); double eta = beta*gamma; - if(!(c.dedx&corrections::no_shell_correction) && eta>=0.13){ //shell corrections + if(!(c.corrections&corrections::no_shell_correction) && eta>=0.13){ //shell corrections double cor = (+0.422377*pow(eta,-2) +0.0304043*pow(eta,-4) -0.00038106*pow(eta,-6))*1e-6*pow(Ipot,2) @@ -100,21 +100,21 @@ double bethek_dedx_e(Projectile &p, const Target &t, const Config &c, double I){ f2+=2*log(gamma) -beta2; double barkas=1.0; - if(!(c.dedx&corrections::no_barkas)){ + if(!(c.corrections&corrections::no_barkas)){ barkas = bethek_barkas(zp_eff,eta,t.Z); } double delta = bethek_density_effect(beta, t.Z); double LS = 0.0; - if(!(c.dedx&corrections::no_lindhard)){ + if(!(c.corrections&corrections::no_lindhard)){ //double LS = bethek_lindhard(p); LS = precalculated_lindhard(p); } double result = (f2)*barkas + LS - delta/2.; result *=f1; - if( (p.T>50000.0) && !(c.dedx&corrections::no_highenergy)){ + if( (p.T>50000.0) && !(c.corrections&corrections::no_highenergy)){ result += pair_production(p,t); result += bremsstrahlung(p,t); } @@ -444,23 +444,16 @@ double bremsstrahlung(const Projectile &p, const Target &t){ return 16.0*C*gamma*p.Z*p.Z*p.Z*p.Z*t.Z*t.Z*Lbs/(t.A*p.A*3.0*4.0*M_PI); }; -double sezi_p_se(double energy,const Target &t){ - return 100*p_se(t.Z, energy)*Avogadro/t.A; -} - -double sezi_dedx_e(const Projectile &p, const Target &t){ - return 100*srim_dedx_e(p.Z,t.Z,p.T)*Avogadro/t.A; -} - -double sezi_dedx_e(const Projectile &p, const Material &mat){ +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; for(int i=0;i