Major changes:
- Added individul operators for species and better selecting process. - Switched to C arrays for main loop operations and calculating array indizes using knowledge of binning instead of doing sorted search - Added Recombination - Reworked elastic scattering kinematics - Added inelastic scattering kinematics
This commit is contained in:
@@ -0,0 +1,96 @@
|
||||
//
|
||||
// eT2_elastic.h
|
||||
// mc_electron
|
||||
//
|
||||
// Created by Christian Reiling on 20.05.19.
|
||||
// Copyright © 2019 Christian Reiling. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef eT2_elastic_h
|
||||
#define eT2_elastic_h
|
||||
|
||||
#include "sub_interaction_base.h"
|
||||
#include "uehara_eT2_elastic.hpp"
|
||||
#include "tcs_container.hpp"
|
||||
#include "dcs_container.hpp"
|
||||
#include "kinematics_base.h"
|
||||
|
||||
|
||||
class eT2_Elastic : public Sub_Interaction_Base {
|
||||
TCS_Container tcs_data;
|
||||
DCS_Theta_Container dcs_data;
|
||||
Elastic_Kinematic_Base kinematics;
|
||||
|
||||
|
||||
public:
|
||||
eT2_Elastic(Population_Base *T2Population, UniRNG *rngUni) : Sub_Interaction_Base(T2Population, rngUni),
|
||||
tcs_data(1e-5, 2e4, 1e3, getDataPath() + "eT2_TCS_ela_concat.dat"),
|
||||
dcs_data(1e-5, 2e4, 1e3, 200, getDataPath() + "eT2_DCS_ela_concat.dat"),
|
||||
kinematics(me_eV, mT2_eV) {}
|
||||
|
||||
double get_macroSigma_m2(const Particle &interPart);
|
||||
InteractionOut do_Interaction (Particle *interPart);
|
||||
};
|
||||
|
||||
|
||||
inline double eT2_Elastic::get_macroSigma_m2(const Particle &interPart) {
|
||||
double Ekin_eV = interPart.get_EKin_eV();
|
||||
double microSigma_m2 = tcs_data.get_value(Ekin_eV);
|
||||
//std::cout<<"DEBUG:\t"<<microSigma_m2<<"\n";
|
||||
vec3 loc_m = interPart.get_Location_m();
|
||||
double nT2_m3 = Population->get_density_m3(loc_m);
|
||||
return (microSigma_m2*nT2_m3);
|
||||
}
|
||||
|
||||
inline InteractionOut eT2_Elastic::do_Interaction (Particle *interPart) {
|
||||
// Here theta and phi are COM-Angles.... prob not correct. For m1 << m2 COM - Angle ~ Lab Angle
|
||||
vec3 v_ms = interPart->get_Speed_ms();
|
||||
vec3 vT2_ms = Population->roll_speed_ms(interPart->get_Location_m());
|
||||
vec3 vLab_ms = v_ms - vT2_ms;
|
||||
double T_eV = calc_Ekin_eV_from_speed(vLab_ms, me_eV);
|
||||
double theta_lab = dcs_data.roll_value(T_eV,rngUni);
|
||||
double phi_lab = rngUni->random() * 2 * pi;
|
||||
kinematics.doKinematics(interPart, vT2_ms, theta_lab, phi_lab);
|
||||
return (InteractionOut());
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Elastic Scattering:
|
||||
Using Rutherford Model with screening parameter following
|
||||
Cross-sections for water vapour for the Monte Carlo electron track structure code from 10eV to the MeV region
|
||||
S Uehara et al 1993 Phys. Med. Biol. 38 1841
|
||||
*/
|
||||
class eT2_Elastic_Analytic : public Sub_Interaction_Base {
|
||||
Elastic_Kinematic_Base kinematics;
|
||||
public:
|
||||
eT2_Elastic_Analytic(Population_Base *T2Population, UniRNG *rngUni) : Sub_Interaction_Base(T2Population, rngUni) {
|
||||
kinematics = Elastic_Kinematic_Base(me_eV, mT2_eV);
|
||||
};
|
||||
|
||||
double get_macroSigma_m2(const Particle &interPart);
|
||||
InteractionOut do_Interaction (Particle *interPart);
|
||||
};
|
||||
|
||||
|
||||
inline double eT2_Elastic_Analytic::get_macroSigma_m2(const Particle &interPart) {
|
||||
double Ekin_eV = interPart.get_EKin_eV();
|
||||
double microSigma_m2 = Uehara_eT2_ElasticScattering::calc_TCS(Ekin_eV);
|
||||
vec3 loc_m = interPart.get_Location_m();
|
||||
double nT2_m3 = Population->get_density_m3(loc_m);
|
||||
return (microSigma_m2*nT2_m3);
|
||||
}
|
||||
|
||||
inline InteractionOut eT2_Elastic_Analytic::do_Interaction (Particle *interPart) {
|
||||
// Here theta and phi are COM-Angles.... prob not correct. For m1 << m2 COM - Angle ~ Lab Angle
|
||||
vec3 v_ms = interPart->get_Speed_ms();
|
||||
vec3 vT2_ms = Population->roll_speed_ms(interPart->get_Location_m());
|
||||
vec3 vLab_ms = v_ms - vT2_ms;
|
||||
double T_eV = calc_Ekin_eV_from_speed(vLab_ms, me_eV);
|
||||
double theta_lab = Uehara_eT2_ElasticScattering::roll_theta(T_eV, rngUni);
|
||||
double phi_lab = rngUni->random() * 2 * pi;
|
||||
kinematics.doKinematics(interPart, vT2_ms, theta_lab, phi_lab);
|
||||
return (InteractionOut());
|
||||
}
|
||||
|
||||
#endif /* eT2_elastic_h */
|
||||
Reference in New Issue
Block a user