Files
katrin-plasma/src/mc_electron/electron_terminator.h
T
Christian 6f288bb0c1 Reworked Katrin Geometrics.
Added creation of T3+ clusters.
Added diss. recombination fo T3+ + e-
2019-07-12 15:15:23 +02:00

55 lines
1.2 KiB
C++

//
// 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_x_m();
double z_m = loc_m[2];
double r_m = sqrt( pow(loc_m[0],2) + pow(loc_m[1],2) );
if (z_m <= z_RW_m) {
return true;
}
if (r_m >= r_WGTS_m) {
return true;
}
return false;
}
#endif /* E_Terminator_h */