Added Parameters to controll Interaction building more precisely:
Toggle Recombination On/Off Toggle Excitation On/Off Control DCS_Data for Elastic and Excitaiton between: Elastic_data, 4Pi, 0Pi(straight forward)
This commit is contained in:
@@ -11,12 +11,14 @@
|
||||
|
||||
|
||||
class Excitation_Base : public Sub_Interaction_Base {
|
||||
DCS_Base *dcs_gen;
|
||||
protected:
|
||||
double deltaE_eV;
|
||||
|
||||
public:
|
||||
Excitation_Base(Population_Base *Population, UniRNG *rngUni, double deltaE_eV) : Sub_Interaction_Base(Population, rngUni) {
|
||||
Excitation_Base(Population_Base *Population, UniRNG *rngUni, double deltaE_eV, DCS_Base *dcs_gen) : Sub_Interaction_Base(Population, rngUni) {
|
||||
this->deltaE_eV = deltaE_eV;
|
||||
this->dcs_gen = dcs_gen;
|
||||
}
|
||||
|
||||
double get_macroSigma_m2(const Particle &interPart);
|
||||
@@ -39,7 +41,10 @@ inline InteractionOut Excitation_Base::do_Interaction (Particle *interPart) {
|
||||
vec3 vLab_ms = interPart->get_Speed_ms() - vOff_ms;
|
||||
double EkinLab_eV = calc_Ekin_eV_from_speed(vLab_ms, me_eV);
|
||||
double EkinLabNew_eV = EkinLab_eV - deltaE_eV;
|
||||
vec3 vnew_ms = roll_uniform_direction(rngUni) * calc_Speed_from_Ekin_eV(EkinLabNew_eV, me_eV) + vOff_ms;
|
||||
double theta_lab = dcs_gen->get_theta(EkinLab_eV);
|
||||
double phi_lab = rngUni->random() * 2 * pi;
|
||||
vec3 n0 = calc_newDirection(vLab_ms, theta_lab, phi_lab);
|
||||
vec3 vnew_ms = n0 * calc_Speed_from_Ekin_eV(EkinLabNew_eV, me_eV) + vOff_ms;
|
||||
interPart->set_Speed_ms(vnew_ms);
|
||||
|
||||
return InteractionOut();
|
||||
@@ -49,7 +54,7 @@ inline InteractionOut Excitation_Base::do_Interaction (Particle *interPart) {
|
||||
class Exp_Excitation_Base : public Excitation_Base {
|
||||
TCS_Container tcs_data;
|
||||
public:
|
||||
Exp_Excitation_Base(Population_Base *T2Population, UniRNG *rngUni, double deltaE_eV, std::string load_file_name) : Excitation_Base(T2Population, rngUni, deltaE_eV),
|
||||
Exp_Excitation_Base(Population_Base *T2Population, UniRNG *rngUni, double deltaE_eV, DCS_Base *dcs_gen, std::string load_file_name) : Excitation_Base(T2Population, rngUni, deltaE_eV, dcs_gen),
|
||||
tcs_data(scale_start, scale_end, 1e3, get_data_path() + load_file_name) {};
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user