- 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
75 lines
1.7 KiB
C++
75 lines
1.7 KiB
C++
//
|
|
// sub_interaction_base.h
|
|
// mc_electron
|
|
//
|
|
// Created by Christian Reiling on 19.05.19.
|
|
// Copyright © 2019 Christian Reiling. All rights reserved.
|
|
//
|
|
|
|
#ifndef sub_interaction_base_h
|
|
#define sub_interaction_base_h
|
|
|
|
#include <vector>
|
|
#include <deque>
|
|
|
|
#include "particle.hpp"
|
|
#include "population_base.h"
|
|
|
|
#include "error_types.h"
|
|
|
|
|
|
class InteractionOut {
|
|
bool delete_current;
|
|
|
|
Particle new_particles[3];
|
|
int number_new_particles;
|
|
bool decrease_density;
|
|
vec3 delete_location;
|
|
|
|
public:
|
|
InteractionOut() {reset();};
|
|
|
|
void reset() {
|
|
delete_current = false;
|
|
number_new_particles = 0;
|
|
decrease_density = false;
|
|
}
|
|
|
|
void set_delete_current(const bool &delete_current) {this->delete_current = delete_current;}
|
|
void add_new_particle(const Particle &newParticle) {
|
|
new_particles[number_new_particles] = newParticle;
|
|
number_new_particles++;
|
|
}
|
|
void set_delete_location (const vec3 &delete_location) {
|
|
this->delete_location = delete_location;
|
|
this->decrease_density = true;
|
|
}
|
|
|
|
bool get_delete_current() {return (delete_current);}
|
|
|
|
int get_number_new_particles() {return(number_new_particles);}
|
|
Particle *get_new_particles() {return(new_particles);}
|
|
|
|
bool get_delete_density() {return(decrease_density);}
|
|
vec3 get_delete_location() {return(delete_location);}
|
|
};
|
|
|
|
|
|
class Sub_Interaction_Base {
|
|
protected:
|
|
Population_Base *Population;
|
|
UniRNG *rngUni;
|
|
|
|
public:
|
|
Sub_Interaction_Base(Population_Base *Population, UniRNG *rngUni) {
|
|
this->Population = Population;
|
|
this->rngUni = rngUni;
|
|
};
|
|
|
|
virtual double get_macroSigma_m2(const Particle &interPart) = 0;
|
|
virtual InteractionOut do_Interaction (Particle *interPart) = 0;
|
|
};
|
|
|
|
|
|
#endif /* sub_interaction_base_h */
|