Added Parameter maxNumberInteractionsPerElectron.

This commit is contained in:
Christian
2019-03-20 15:58:00 +01:00
parent 63470ac340
commit 3c94d9083e
3 changed files with 8 additions and 1 deletions
+1
View File
@@ -37,6 +37,7 @@ Parameter::Parameter() {
cutoffMode = (int)getValue("cutoffMode");
cutoffEnergySet_eV = getValue("cutoffEnergySet_eV");
cutoffFactor = getValue("cutoffFactor");
maxNumberInteractionsPerElectron = getValue("maxNumberInteractionsPerElectron");
// Katrin Specs
wgtsMagField_T = getValue("wgtsMagField_T");
+1
View File
@@ -31,6 +31,7 @@ protected:
int cutoffMode; // 0 = Energy from Parameter, 1 = WGTSTemperature*cutoffFactor
double cutoffEnergySet_eV;
double cutoffFactor;
int maxNumberInteractionsPerElectron;
//KATRIN Specs
double wgtsMagField_T;
+6 -1
View File
@@ -45,13 +45,18 @@ void Simulation::doit() {
};
bool Simulation::check_NumberInteractions(int &numberInteractionsThisElectron) {
if (numberInteractionsThisElectron < 100) {
if (maxNumberInteractionsPerElectron == 0) {
return(false);
}
if (numberInteractionsThisElectron < maxNumberInteractionsPerElectron) {
numberInteractionsThisElectron++;
return(false);
} else {
return(true);
}
}
void Simulation::doTC6() {
cout<<endl<<"Simulation::doTC6: Doing Testcase 6."<<endl<<endl;
parameterCheck_TC6();