Working Version with Population update and T+ interactions.
This commit is contained in:
@@ -0,0 +1,94 @@
|
||||
//
|
||||
// BED_SDCS_calculator.cpp
|
||||
// cross_section_calculator
|
||||
//
|
||||
// Created by Christian Reiling on 07.05.19.
|
||||
// Copyright © 2019 Christian Reiling. All rights reserved.
|
||||
//
|
||||
|
||||
#include "BED_SDCS_calculator.hpp"
|
||||
|
||||
|
||||
|
||||
double BED_SDCS_calculator::minE_eV = 15;
|
||||
double BED_SDCS_calculator::maxE_eV = 2e4;
|
||||
double BED_SDCS_calculator::pointsPer_initE_Order = 50;
|
||||
double BED_SDCS_calculator::pointsPer_secE_Order = 10;
|
||||
|
||||
std::string BED_SDCS_calculator::defaultExportPath = "/Users/ChristianReiling/Documents/Masterarbeit/katrin-plasma/src/mc_electron/data/";
|
||||
|
||||
void BED_SDCS_calculator::set_Parameters (double new_minE_eV, double new_maxE_eV, double new_pointsPer_initE_Order, double new_pointsPer_secE_Order) {
|
||||
set_minE_eV(new_minE_eV);
|
||||
set_maxE_eV (new_maxE_eV);
|
||||
set_pointsPer_initE_Order (new_pointsPer_initE_Order);
|
||||
set_pointsPer_secE_Order (new_pointsPer_secE_Order);
|
||||
}
|
||||
|
||||
void BED_SDCS_calculator::set_defaultExportPath(std::string new_defaultExportPath) {
|
||||
if (new_defaultExportPath.back() != '/') {
|
||||
new_defaultExportPath = new_defaultExportPath + '/';
|
||||
}
|
||||
defaultExportPath = new_defaultExportPath;
|
||||
}
|
||||
|
||||
|
||||
Edge2D_FuncContainer calc_SDCS_Edge() {
|
||||
Edge2D_FuncContainer BED_edge_SDCS;
|
||||
BED_edge_SDCS.get_Ionization_fromFunction(BED_eT2_Ionization::calc_SDCS, 15, 20000, 50, 10);
|
||||
BED_edge_SDCS.add_ankerpoint(EionT2_eV, 0,0);
|
||||
double xmin =EionT2_eV+1e-4;
|
||||
double ymin = (xmin-EionT2_eV)/2;
|
||||
BED_edge_SDCS.add_ankerpoint(xmin, ymin,BED_eT2_Ionization::calc_SDCS(xmin,ymin));
|
||||
return(BED_edge_SDCS);
|
||||
}
|
||||
|
||||
Average2D_FuncContainer calc_SDCS_Average() {
|
||||
Edge2D_FuncContainer BED_edge_SDCS = calc_SDCS_Edge();
|
||||
Average2D_FuncContainer BED_average_SDCS = Average2D_FuncContainer(BED_edge_SDCS);
|
||||
return(BED_average_SDCS);
|
||||
}
|
||||
|
||||
Stacked2D_FuncContainer calc_SDCS_Stacked() {
|
||||
Average2D_FuncContainer BED_average_SDCS = calc_SDCS_Average();
|
||||
Stacked2D_FuncContainer BED_stacked_SDCS = Stacked2D_FuncContainer(BED_average_SDCS);
|
||||
return(BED_stacked_SDCS);
|
||||
}
|
||||
|
||||
|
||||
void BED_SDCS_calculator::export_SDCS_Edge (std::string exportPath) {
|
||||
Edge2D_FuncContainer BED_edge_SDCS = calc_SDCS_Edge();
|
||||
BED_edge_SDCS.exportToFile(exportPath);
|
||||
}
|
||||
|
||||
void BED_SDCS_calculator::export_SDCS_Average (std::string exportPath) {
|
||||
Average2D_FuncContainer BED_average_SDCS = calc_SDCS_Average();
|
||||
BED_average_SDCS.exportToFile(exportPath);
|
||||
}
|
||||
|
||||
void BED_SDCS_calculator::export_SDCS_Stacked (std::string exportPath) {
|
||||
Stacked2D_FuncContainer BED_stacked_SDCS = calc_SDCS_Stacked();
|
||||
BED_stacked_SDCS.exportToFile(exportPath);
|
||||
}
|
||||
|
||||
|
||||
void BED_SDCS_calculator::export_SDCS_Edge () {
|
||||
stringstream ss;
|
||||
ss<<defaultExportPath<<"BED_edge_SDCS.dat";
|
||||
export_SDCS_Edge(ss.str());
|
||||
}
|
||||
|
||||
void BED_SDCS_calculator::export_SDCS_Average () {
|
||||
stringstream ss;
|
||||
ss<<defaultExportPath<<"BED_average_SDCS.dat";
|
||||
export_SDCS_Average(ss.str());
|
||||
}
|
||||
|
||||
void BED_SDCS_calculator::export_SDCS_Stacked () {
|
||||
stringstream ss;
|
||||
ss<<defaultExportPath<<"BED_stacked_SDCS.dat";
|
||||
export_SDCS_Stacked(ss.str());
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user