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());
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
//
|
||||
// BED_SDCS_calculator.hpp
|
||||
// cross_section_calculator
|
||||
//
|
||||
// Created by Christian Reiling on 07.05.19.
|
||||
// Copyright © 2019 Christian Reiling. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef BED_SDCS_calculator_hpp
|
||||
#define BED_SDCS_calculator_hpp
|
||||
|
||||
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include "BED_eT2_ionization.hpp"
|
||||
#include "function_container.hpp"
|
||||
|
||||
|
||||
class BED_SDCS_calculator {
|
||||
static double minE_eV;
|
||||
static double maxE_eV;
|
||||
static double pointsPer_initE_Order;
|
||||
static double pointsPer_secE_Order;
|
||||
static std::string defaultExportPath;
|
||||
public:
|
||||
BED_SDCS_calculator();
|
||||
|
||||
static void set_Parameters (double new_minE_eV, double new_maxE_eV, double new_pointsPer_initE_Order, double new_pointsPer_secE_Order);
|
||||
static void set_minE_eV (double new_minE_eV) {minE_eV = new_minE_eV;}
|
||||
static void set_maxE_eV (double new_maxE_eV) {maxE_eV = new_maxE_eV;}
|
||||
static void set_pointsPer_initE_Order (double new_pointsPer_initE_Order) {pointsPer_initE_Order = new_pointsPer_initE_Order;}
|
||||
static void set_pointsPer_secE_Order (double new_pointsPer_secE_Order) {pointsPer_secE_Order = new_pointsPer_secE_Order;}
|
||||
|
||||
static void set_defaultExportPath(std::string new_defaultExportPath);
|
||||
|
||||
|
||||
static void export_SDCS_Edge (std::string exportPath);
|
||||
static void export_SDCS_Average (std::string exportPath);
|
||||
static void export_SDCS_Stacked (std::string exportPath);
|
||||
|
||||
static void export_SDCS_Edge ();
|
||||
static void export_SDCS_Average ();
|
||||
static void export_SDCS_Stacked ();
|
||||
|
||||
private:
|
||||
static Edge2D_FuncContainer calc_SDCS_Edge();
|
||||
static Average2D_FuncContainer calc_SDCS_Average();
|
||||
static Stacked2D_FuncContainer calc_SDCS_Stacked();
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif /* BED_SDCS_calculator_hpp */
|
||||
@@ -0,0 +1,69 @@
|
||||
//
|
||||
// BED_TCS_calculator.cpp
|
||||
// cross_section_calculator
|
||||
//
|
||||
// Created by Christian Reiling on 07.05.19.
|
||||
// Copyright © 2019 Christian Reiling. All rights reserved.
|
||||
//
|
||||
|
||||
#include "BED_TCS_calculator.hpp"
|
||||
|
||||
#include <sstream>
|
||||
|
||||
|
||||
double BED_TCS_calculator::minE_eV = 15;
|
||||
double BED_TCS_calculator::maxE_eV = 2e4;
|
||||
double BED_TCS_calculator::pointsPerOrder = 100;
|
||||
std::string BED_TCS_calculator::defaultExportPath = "/Users/ChristianReiling/Documents/Masterarbeit/katrin-plasma/src/mc_electron/data/";
|
||||
|
||||
void BED_TCS_calculator::set_Parameters (double new_minE_eV, double new_maxE_eV, double new_pointsPerOrder) {
|
||||
set_minE_eV(new_minE_eV);
|
||||
set_maxE_eV (new_maxE_eV);
|
||||
set_pointsPerOrder (new_pointsPerOrder);
|
||||
}
|
||||
|
||||
void BED_TCS_calculator::set_defaultExportPath(std::string new_defaultExportPath) {
|
||||
if (new_defaultExportPath.back() != '/') {
|
||||
new_defaultExportPath = new_defaultExportPath + '/';
|
||||
}
|
||||
defaultExportPath = new_defaultExportPath;
|
||||
}
|
||||
|
||||
|
||||
Edge1D_FuncContainer BED_TCS_calculator::calc_TCS_Edge() {
|
||||
Edge1D_FuncContainer BED_edge_TCS;
|
||||
BED_edge_TCS.fillFromFunction(BED_eT2_Ionization::calc_TCS, minE_eV, maxE_eV, pointsPerOrder);
|
||||
// Manually add points near threshold
|
||||
BED_edge_TCS.add_ankerpoint(EionT2_eV, BED_eT2_Ionization::calc_TCS(EionT2_eV));
|
||||
double offset = 1e-4;
|
||||
BED_edge_TCS.add_ankerpoint(EionT2_eV+offset, BED_eT2_Ionization::calc_TCS(EionT2_eV+offset));
|
||||
return (BED_edge_TCS);
|
||||
}
|
||||
|
||||
Average1D_FuncContainer BED_TCS_calculator::calc_TCS_Average() {
|
||||
Edge1D_FuncContainer BED_edge_TCS = calc_TCS_Edge();
|
||||
Average1D_FuncContainer BED_average_TCS = Average1D_FuncContainer(BED_edge_TCS);
|
||||
return (BED_average_TCS);
|
||||
}
|
||||
|
||||
void BED_TCS_calculator::export_TCS_Edge (std::string exportPath) {
|
||||
Edge1D_FuncContainer BED_edge_TCS = calc_TCS_Edge();
|
||||
BED_edge_TCS.exportToFile(exportPath);
|
||||
}
|
||||
void BED_TCS_calculator::export_TCS_Average (std::string exportPath) {
|
||||
Average1D_FuncContainer BED_average_TCS = calc_TCS_Average();
|
||||
BED_average_TCS.exportToFile(exportPath);
|
||||
}
|
||||
|
||||
void BED_TCS_calculator::export_TCS_Edge () {
|
||||
stringstream ss;
|
||||
ss<<defaultExportPath<<"BED_edge_TCS.dat";
|
||||
export_TCS_Edge(ss.str());
|
||||
}
|
||||
|
||||
void BED_TCS_calculator::export_TCS_Average () {
|
||||
stringstream ss;
|
||||
ss<<defaultExportPath<<"BED_average_TCS.dat";
|
||||
export_TCS_Average(ss.str());
|
||||
}
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
//
|
||||
// BED_TCS_calculator.hpp
|
||||
// cross_section_calculator
|
||||
//
|
||||
// Created by Christian Reiling on 07.05.19.
|
||||
// Copyright © 2019 Christian Reiling. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef BED_TCS_calculator_hpp
|
||||
#define BED_TCS_calculator_hpp
|
||||
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include "BED_eT2_ionization.hpp"
|
||||
#include "function_container.hpp"
|
||||
|
||||
class BED_TCS_calculator {
|
||||
static double minE_eV;
|
||||
static double maxE_eV;
|
||||
static double pointsPerOrder;
|
||||
static std::string defaultExportPath;
|
||||
|
||||
public:
|
||||
BED_TCS_calculator();
|
||||
|
||||
static void set_Parameters (double new_minE_eV, double new_maxE_eV, double new_pointsPerOrder);
|
||||
static void set_minE_eV (double new_minE_eV) {minE_eV = new_minE_eV;}
|
||||
static void set_maxE_eV (double new_maxE_eV) {maxE_eV = new_maxE_eV;}
|
||||
static void set_pointsPerOrder (double new_pointsPerOrder) {minE_eV = new_pointsPerOrder;}
|
||||
|
||||
static void set_defaultExportPath(std::string new_defaultExportPath);
|
||||
|
||||
static void export_TCS_Edge (std::string exportPath);
|
||||
static void export_TCS_Average (std::string exportPath);
|
||||
|
||||
static void export_TCS_Edge ();
|
||||
static void export_TCS_Average ();
|
||||
|
||||
private:
|
||||
static Edge1D_FuncContainer calc_TCS_Edge();
|
||||
static Average1D_FuncContainer calc_TCS_Average();
|
||||
};
|
||||
#endif /* BED_TCS_calculator_hpp */
|
||||
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// main.cpp
|
||||
// cross_section_calculator
|
||||
//
|
||||
// Created by Christian Reiling on 07.05.19.
|
||||
// Copyright © 2019 Christian Reiling. All rights reserved.
|
||||
//
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
int main(int argc, const char * argv[]) {
|
||||
//createBED_TCS_Func_container();
|
||||
//createBED_SDCS_Func2D_container();
|
||||
//Katrin Kat;
|
||||
//Skalar_WGTS_Container Ion_Container(0, 10, 0.045, vec3(10,10,10));
|
||||
//Ion_Container.set_Bins_from_Function(tritiumDens);
|
||||
}
|
||||
Reference in New Issue
Block a user