Screenshot with working ionization function.
Ionization will be changed to BED model.
This commit is contained in:
@@ -0,0 +1,75 @@
|
||||
//
|
||||
// simulation.hpp
|
||||
// mc_electron
|
||||
//
|
||||
// Created by Christian Reiling on 20.09.18.
|
||||
// Copyright © 2018 Christian Reiling. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef simulation_hpp
|
||||
#define simulation_hpp
|
||||
|
||||
#include "parameter.hpp"
|
||||
#include "katrin.hpp"
|
||||
#include "electron.hpp"
|
||||
|
||||
|
||||
class Simulation: public Parameter {
|
||||
public:
|
||||
~Simulation(){};
|
||||
Simulation() {
|
||||
numInjectedElectrons = 0;
|
||||
rngUni.seed(seed);
|
||||
logging = false;
|
||||
if (cutoffMode==0) {
|
||||
cutoffEnergy_eV = cutoffEnergySet_eV;
|
||||
} else if (cutoffMode==1) {
|
||||
cutoffEnergy_eV = kb_eVK*wgtsTemp_K*cutoffFactor;
|
||||
} else {
|
||||
stringstream ss;
|
||||
ss<<"Simulation::Simulation: cutoffMode= "<<cutoffMode<<" not defined.";
|
||||
throw (ss.str());
|
||||
}
|
||||
|
||||
};
|
||||
void initLogger(void);
|
||||
void doit(void);
|
||||
void doTC6(void);
|
||||
|
||||
protected:
|
||||
// Simulation
|
||||
Katrin Kat;
|
||||
ranlib::Uniform<double> rngUni;
|
||||
ranlib::NormalUnit<double> rngNormal;
|
||||
int numInjectedElectrons;
|
||||
deque<Electron> electronQue;
|
||||
|
||||
|
||||
// Injection
|
||||
Electron injectElectron();
|
||||
double getEkin_eVFermi_eV();
|
||||
double ESpectrumBetaDecay(double Ekin_eV);
|
||||
double FermiFunction(double Z, double Ekin_eV);
|
||||
|
||||
// Moving
|
||||
void moveElectronBorisPush(Electron *moveElectron, double MFP_m);
|
||||
void moveElectronDriftApproximation(Electron *moveElectron, double MFP_m);
|
||||
double getMFP_m(Electron moveElectron);
|
||||
bool movedOutside(blitz::TinyVector<double,3> loc_m);
|
||||
|
||||
// Termination
|
||||
bool checkTermination(Electron termElectron);
|
||||
double cutoffEnergy_eV;
|
||||
|
||||
// Logging
|
||||
bool logging;
|
||||
|
||||
ofstream *outStream;
|
||||
vector<double> zLogValues;
|
||||
void logElectron(Electron *logElectron,blitz::TinyVector<double,3> oldLoc_m);
|
||||
string getDirName();
|
||||
string getTimeString();
|
||||
};
|
||||
|
||||
|
||||
#endif /* simulation_hpp */
|
||||
Reference in New Issue
Block a user