Added T5+ Interactions.
Preparing for adding direction dependend electron Containers.
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
//
|
||||
// T5IT2_elastic.h
|
||||
// mc_electron
|
||||
//
|
||||
// Created by Christian Reiling on 16.09.19.
|
||||
// Copyright © 2019 Christian Reiling. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef T5IT2_elastic_h
|
||||
#define T5IT2_elastic_h
|
||||
|
||||
|
||||
class T5IT2_Elastic : public Sub_Interaction_Base {
|
||||
Tabata_T3IT2_Elastic tcs_gen; // Obviously wrong, but should be good enough.
|
||||
Elastic_Kinematic_Base kinematics;
|
||||
|
||||
public:
|
||||
T5IT2_Elastic(Population_Base *T2Population, UniRNG *rngUni) : Sub_Interaction_Base(T2Population, rngUni), kinematics(5*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 T5IT2_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 /* T5IT2_elastic_h */
|
||||
Reference in New Issue
Block a user