Working Version with Population update and T+ interactions.
This commit is contained in:
@@ -6,18 +6,20 @@
|
||||
// Copyright © 2019 Christian Reiling. All rights reserved.
|
||||
//
|
||||
|
||||
#include "read_system.h"
|
||||
|
||||
#include "injector.hpp"
|
||||
#include "katrin_geo.hpp"
|
||||
|
||||
const int Injector::injectionMethod = getParameter("injectionMethod");
|
||||
const double Injector::injectionEnergy_eV = getParameter("injectionEnergy_eV");
|
||||
|
||||
Particle Injector::injectElectron (const int &newId) {
|
||||
double r_m = Kat->get_radius_m()*sqrt(rngUni->random());
|
||||
double r_m = Katrin_Geo::get_radius_m()*sqrt(rngUni->random());
|
||||
double phi = rngUni->random()*2*pi;
|
||||
|
||||
double z_WGTSstart_m = Kat->get_z_WGTSstart_m();
|
||||
double z_WGTSend_m = Kat->get_z_WGTSend_m();
|
||||
double wgtsLength_m = z_WGTSend_m - z_WGTSstart_m;
|
||||
double z_WGTSstart_m = Katrin_Geo::get_z_WGTSstart_m();
|
||||
double wgtsLength_m = Katrin_Geo::get_wgtsLength_m();
|
||||
|
||||
double z_WGTS_start_to_half_pos_m = sqrt(rngUni->random())*wgtsLength_m/2;
|
||||
double z_m = (rngUni->random()<0.5) ? z_WGTS_start_to_half_pos_m : wgtsLength_m - z_WGTS_start_to_half_pos_m;
|
||||
@@ -44,10 +46,9 @@ Particle Injector::injectElectron (const int &newId) {
|
||||
}
|
||||
|
||||
double Injector::roll_FermiEnergy_eV() {
|
||||
// get Energy distribution using Rejection Method
|
||||
double pmax,Emin_eV, Emax_eV, Ecan_eV,eta1,eta2;
|
||||
pmax = 1.5e-28; // From Plotting EnergyDistributionBetaDecay
|
||||
Emin_eV = 1e-15;
|
||||
Emin_eV = zero;
|
||||
Emax_eV = TritiumDecayEndpoint_eV;
|
||||
do {
|
||||
eta1 = rngUni->random();
|
||||
|
||||
Reference in New Issue
Block a user