Major changes:
- Added individul operators for species and better selecting process. - Switched to C arrays for main loop operations and calculating array indizes using knowledge of binning instead of doing sorted search - Added Recombination - Reworked elastic scattering kinematics - Added inelastic scattering kinematics
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
//
|
||||
// E_Terminator.h
|
||||
// mc_electron
|
||||
//
|
||||
// Created by Christian Reiling on 19.05.19.
|
||||
// Copyright © 2019 Christian Reiling. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef E_Terminator_h
|
||||
#define E_Terminator_h
|
||||
|
||||
#include "terminator_base.h"
|
||||
|
||||
|
||||
class E_Terminator : public Terminator_Base, private Energy_Terminator_Base, private MaxInteractions_Terminator_Base {
|
||||
|
||||
public:
|
||||
E_Terminator(const int &maxInteractions, const double &cutoffEnergy_eV) : Terminator_Base(electron), Energy_Terminator_Base(cutoffEnergy_eV), MaxInteractions_Terminator_Base(maxInteractions) {};
|
||||
|
||||
bool checkTermination (const Particle &movePart);
|
||||
private:
|
||||
bool check_Wall(const Particle &movePart);
|
||||
};
|
||||
|
||||
|
||||
inline bool E_Terminator::checkTermination (const Particle &movePart) {
|
||||
if (check_Wall(movePart)) {
|
||||
return (true);
|
||||
}
|
||||
if (check_Energy(movePart)) {
|
||||
return (true);
|
||||
}
|
||||
if (check_MaxInteractions(movePart)) {
|
||||
return (true);
|
||||
}
|
||||
return (false);
|
||||
}
|
||||
|
||||
|
||||
inline bool E_Terminator::check_Wall(const Particle &movePart) {
|
||||
vec3 loc_m = movePart.get_Location_m();
|
||||
double z_m = loc_m[2];
|
||||
double r_m = sqrt( pow(loc_m[0],2) + pow(loc_m[1],2) );
|
||||
if (z_m <= Katrin_Geo::get_z_RW_m()) {
|
||||
return (true);
|
||||
}
|
||||
if (r_m >= Katrin_Geo::get_radius_m()) {
|
||||
return (true);
|
||||
}
|
||||
return (false);
|
||||
}
|
||||
|
||||
|
||||
#endif /* E_Terminator_h */
|
||||
Reference in New Issue
Block a user