Reworked minor changes in structure and integration over energetic population container.
80 lines
2.7 KiB
C++
80 lines
2.7 KiB
C++
//
|
|
// 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_theta_container.hpp"
|
|
#include "kinematics_base.h"
|
|
#include "dcs_base.h"
|
|
|
|
|
|
class eT2_Elastic : public Sub_Interaction_Base {
|
|
TCS_Container tcs_data;
|
|
DCS_Base *dcs_gen;
|
|
Elastic_Kinematic_Base kinematics;
|
|
|
|
public:
|
|
eT2_Elastic(Population_Base *T2Population, UniRNG *rngUni, DCS_Base *dcs_gen) : Sub_Interaction_Base(T2Population, rngUni),
|
|
tcs_data(scale_start, scale_end, 1e3, get_data_path() + "eT2_ela_TCS.dat"),
|
|
kinematics(me_eV, 2*mT_eV) {
|
|
this->dcs_gen = dcs_gen;
|
|
}
|
|
|
|
double get_microSigma_m2(const double &E_eV) {return tcs_data.get_value(E_eV);}
|
|
InteractionOut do_Interaction (Particle *interPart);
|
|
};
|
|
|
|
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 v1_ms = interPart->get_v_ms();
|
|
vec3 vOff_ms = Population->roll_v_ms(interPart->get_x_m());
|
|
vec3 vLab_ms = v1_ms - vOff_ms;
|
|
double T_eV = calc_E_eV_from_v_ms(vLab_ms, me_eV);
|
|
double theta_lab = dcs_gen->get_theta(T_eV);
|
|
double phi_lab = rngUni->random() * 2 * pi;
|
|
kinematics.doKinematics(interPart, vOff_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, 2*mT_eV);
|
|
};
|
|
|
|
double get_microSigma_m2(const double &E_eV) {return Uehara_eT2_ElasticScattering::calc_TCS(E_eV);}
|
|
InteractionOut do_Interaction (Particle *interPart);
|
|
};
|
|
|
|
|
|
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 v1_ms = interPart->get_v_ms();
|
|
vec3 vOff_ms = Population->roll_v_ms(interPart->get_x_m());
|
|
vec3 vLab_ms = v1_ms - vOff_ms;
|
|
double T_eV = calc_E_eV_from_v_ms(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, vOff_ms, theta_lab, phi_lab);
|
|
return InteractionOut();
|
|
}
|
|
|
|
#endif /* eT2_elastic_h */
|