37 lines
1.1 KiB
C++
37 lines
1.1 KiB
C++
//
|
|
// T3IT2_elastic.h
|
|
// mc_electron
|
|
//
|
|
// Created by Christian Reiling on 13.09.19.
|
|
// Copyright © 2019 Christian Reiling. All rights reserved.
|
|
//
|
|
|
|
#ifndef T3IT2_elastic_h
|
|
#define T3IT2_elastic_h
|
|
|
|
#include "sub_interaction_base.h"
|
|
#include "tabata_T3IT2_elastic.h"
|
|
|
|
|
|
class T3IT2_Elastic : public Sub_Interaction_Base {
|
|
Tabata_T3IT2_Elastic tcs_gen;
|
|
Elastic_Kinematic_Base kinematics;
|
|
|
|
public:
|
|
T3IT2_Elastic(Population_Base *T2Population, UniRNG *rngUni) : Sub_Interaction_Base(T2Population, rngUni), kinematics(3*mT_eV, 2*mT_eV) {};
|
|
|
|
double get_microSigma_m2(const double &E_eV) {return tcs_gen.get_TCS(E_eV);}
|
|
InteractionOut do_Interaction (Particle *interPart);
|
|
};
|
|
|
|
inline InteractionOut T3IT2_Elastic::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 /* T3IT2_elastic_h */
|