1. Added precalculation of integral values in thermal regime. 2. Minor Changes in Injection of \beta-electrons and ions.
51 lines
1.7 KiB
C++
51 lines
1.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 "precomputed_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 e_thermal_Precomputed_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) : e_thermal_Precomputed_Interaction_Base(T2Population, rngUni, me_eV),
|
|
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;
|
|
calc_values(); // need to call here, because, constructor can't call pure virtual function
|
|
}
|
|
|
|
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 v2_ms = Population->roll_v_ms(interPart->get_x_m());
|
|
vec3 vLab_ms = v1_ms - v2_ms; // P2 fixed
|
|
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;
|
|
interPart->set_v_ms(kinematics.get_v1_new(v1_ms, v2_ms, theta_lab, phi_lab));
|
|
return InteractionOut();
|
|
}
|
|
|
|
#endif /* eT2_elastic_h */
|