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:
Christian
2019-05-27 13:51:32 +02:00
parent ac83bae061
commit 79bf420f8d
56 changed files with 82194 additions and 0 deletions
+67
View File
@@ -0,0 +1,67 @@
//
// terminator_base.h
// mc_electron
//
// Created by Christian Reiling on 19.05.19.
// Copyright © 2019 Christian Reiling. All rights reserved.
//
#ifndef terminator_base_h
#define terminator_base_h
#include "process_base.h"
#include "particle.hpp"
#include "katrin_geo.hpp"
class Terminator_Base : public Process_Base {
public:
Terminator_Base(species this_species) : Process_Base(this_species) {};
virtual bool checkTermination (const Particle &movePart) = 0;
};
class MaxInteractions_Terminator_Base {
int maxInteractions;
int interactionsCount = 0;
int curId = 0;
public:
MaxInteractions_Terminator_Base(const int &maxInteractions) {
this->maxInteractions = maxInteractions;
}
protected:
bool check_MaxInteractions(const Particle &movePart) {
int Id = movePart.get_Id();
if (Id != curId) {
curId = Id;
interactionsCount = 0;
}
interactionsCount +=1;
if (interactionsCount >= maxInteractions) {
return (true);
}
return (false);
}
};
class Energy_Terminator_Base {
double cutoffEnergy_eV;
public:
Energy_Terminator_Base(const double &cutoffEnergy_eV) {
this->cutoffEnergy_eV = cutoffEnergy_eV;
}
protected:
bool check_Energy(const Particle &movePart) {
double Ekin_eV = movePart.get_EKin_eV();
if (Ekin_eV<=cutoffEnergy_eV) {
return (true);
}
return (false);
}
};
#endif /* terminator_base_h */