Files
katrin-plasma/src/mc_electron/electron_terminator.h
T
2019-09-24 23:34:35 +02:00

49 lines
1.1 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 Negative_Terminator : public Terminator_Base {
double dipole_cutoffE_eV;
public:
Negative_Terminator(species this_species, long int max_interactions, double cut_off_energy_eV, double dipole_cutoffE_eV) : Terminator_Base(this_species, max_interactions, cut_off_energy_eV) {
this->dipole_cutoffE_eV = dipole_cutoffE_eV;
};
private:
bool check_walls(const Particle &movePart);
};
inline bool Negative_Terminator::check_walls(const Particle &movePart) {
vec3 loc_m = movePart.get_x_m();
double E_eV = movePart.get_E_eV();
double z_m = calc_z_m(loc_m);
double r_m = calc_r_m(loc_m);
if (z_m <= z_RW_m) {
stats.n_rw += 1;
return true;
}
if (z_m >= z_WGTS_end_m && E_eV <= dipole_cutoffE_eV) {
stats.n_dipole += 1;
return true;
}
if (r_m >= r_WGTS_m) {
stats.n_radial += 1;
return true;
}
return false;
}
#endif /* E_Terminator_h */