Reworked minor changes in structure and integration over energetic population container.
36 lines
919 B
C++
36 lines
919 B
C++
//
|
|
// 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 "sub_interaction_base.h"
|
|
#include "janev_T2IT2_cx.h"
|
|
|
|
|
|
class T2IT2_CX : public Sub_Interaction_Base {
|
|
public:
|
|
T2IT2_CX(Population_Base *T2Population, UniRNG *rngUni) : Sub_Interaction_Base(T2Population, rngUni) {}
|
|
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 loc_m = interPart->get_x_m();
|
|
vec3 v2_ms = Population->roll_v_ms(loc_m);
|
|
|
|
vec3 vLab_ms = interPart->get_v_ms() - v2_ms;
|
|
vec3 v1_ms = roll_uniform_direction(rngUni) * calc_vec3_abs(vLab_ms) + v2_ms;
|
|
interPart->set_v_ms(v1_ms);
|
|
return InteractionOut();
|
|
}
|
|
|
|
|
|
#endif /* T2IT2_cx_h */
|