// // T2IT2_cx.h // mc_electron // // Created by Christian Reiling on 12.07.19. // Copyright © 2019 Christian Reiling. All rights reserved. // #ifndef T2IT2_cx_h #define T2IT2_cx_h #include "TI_thermal_binary_base.h" #include "kinematics_base.h" #include "janev_T2IT2_cx.h" class T2IT2_CX : public TI_thermal_binary_Precomputed_Interaction_Base { Elastic_Kinematic_Base kinematics; public: T2IT2_CX(Population_Base *T2Population, UniRNG *rngUni) : TI_thermal_binary_Precomputed_Interaction_Base(T2Population, rngUni, 2*mT_eV), kinematics(2*mT_eV, 2*mT_eV) { calc_values(); // need to call here, because, constructor can't call pure virtual function } double get_microSigma_m2(const double &E_eV) {return Janev_T2IT2_CX::get_TCS(E_eV);} InteractionOut do_Interaction (Particle *interPart); }; inline InteractionOut T2IT2_CX::do_Interaction (Particle *interPart) { vec3 v1_ms = interPart->get_v_ms(); vec3 v2_ms = Population->roll_v_ms(interPart->get_x_m()); double theta_lab = rngUni->random() * pi; 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 /* T2IT2_cx_h */