49 lines
1.9 KiB
C++
49 lines
1.9 KiB
C++
//
|
|
// Thermal_Population.h
|
|
// mc_electron
|
|
//
|
|
// Created by Christian Reiling on 25.05.19.
|
|
// Copyright © 2019 Christian Reiling. All rights reserved.
|
|
//
|
|
|
|
#ifndef Thermal_Population_h
|
|
#define Thermal_Population_h
|
|
|
|
#include "population_base.h"
|
|
#include "wgts_kinematics.h"
|
|
|
|
|
|
|
|
class Thermal_Population : public Population_Base, private RNG_Base {
|
|
Population_Container container;
|
|
Timer *timer;
|
|
Base_Kinematics *kinematics;
|
|
|
|
public:
|
|
Thermal_Population(species this_species, Base_Kinematics *kinematics, Timer *timer, UniRNG *rngUni, NormalRNG *rngNormal, int num_z_bins, int num_r_bins, int num_phi_bins) : Population_Base(this_species), RNG_Base(rngUni, rngNormal), container(num_z_bins, num_r_bins, num_phi_bins, 1) {
|
|
this->timer = timer;
|
|
this->kinematics = kinematics;
|
|
}
|
|
|
|
void increase_density (const Particle &upPart, const vec3 &oldLoc_m) {container.increase_cum_time_s(oldLoc_m, upPart.get_x_m(), calc_vec3_abs(upPart.get_v_ms()), upPart.get_E_eV());}
|
|
void decrease_denisty (const vec3 &loc_m, const double &E_eV) {container.increase_offset(loc_m, E_eV);}
|
|
|
|
double get_density_m3(const vec3 &loc_m) {return container.get_density_m3(loc_m, 0, timer->get_time_s());}
|
|
|
|
double get_density_m3(const int &E_bin, const Bins &loc_bins) {throw MyException("Should not be called.\n.");}
|
|
int get_number_E_bins() {return 1;}
|
|
Bins get_loc_bin(const vec3 & loc_m) {throw MyException("Should not be called.\n.");}
|
|
double get_E_bin_mid_eV(const int &E_bin) {throw MyException("Should not be called.\n.");}
|
|
|
|
|
|
vec3 roll_x_ms() {throw MyException ("Not yet implemented as not needed at this point.");}
|
|
vec3 roll_v_ms (const vec3 &loc_m) {return kinematics->get_v_ms(loc_m);}
|
|
vec3 get_drift_v_ms(const vec3 &loc_m) {return kinematics->get_v_offset_ms(loc_m);}
|
|
double get_thermal_v_ms() {return kinematics->get_thermal_v_ms();}
|
|
|
|
Population_Container *access_container() {return &container;}
|
|
};
|
|
|
|
|
|
#endif /* Thermal_Population_h */
|