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"); cutoffMode = (int)getValue("cutoffMode");
cutoffEnergySet_eV = getValue("cutoffEnergySet_eV"); cutoffEnergySet_eV = getValue("cutoffEnergySet_eV");
cutoffFactor = getValue("cutoffFactor"); cutoffFactor = getValue("cutoffFactor");
maxNumberInteractionsPerElectron = getValue("maxNumberInteractionsPerElectron");
// Katrin Specs // Katrin Specs
wgtsMagField_T = getValue("wgtsMagField_T"); wgtsMagField_T = getValue("wgtsMagField_T");
+1
View File
@@ -31,6 +31,7 @@ protected:
int cutoffMode; // 0 = Energy from Parameter, 1 = WGTSTemperature*cutoffFactor int cutoffMode; // 0 = Energy from Parameter, 1 = WGTSTemperature*cutoffFactor
double cutoffEnergySet_eV; double cutoffEnergySet_eV;
double cutoffFactor; double cutoffFactor;
int maxNumberInteractionsPerElectron;
//KATRIN Specs //KATRIN Specs
double wgtsMagField_T; double wgtsMagField_T;
+6 -1
View File
@@ -45,13 +45,18 @@ void Simulation::doit() {
}; };
bool Simulation::check_NumberInteractions(int &numberInteractionsThisElectron) { bool Simulation::check_NumberInteractions(int &numberInteractionsThisElectron) {
if (numberInteractionsThisElectron < 100) { if (maxNumberInteractionsPerElectron == 0) {
return(false);
}
if (numberInteractionsThisElectron < maxNumberInteractionsPerElectron) {
numberInteractionsThisElectron++; numberInteractionsThisElectron++;
return(false); return(false);
} else { } else {
return(true); return(true);
} }
} }
void Simulation::doTC6() { void Simulation::doTC6() {
cout<<endl<<"Simulation::doTC6: Doing Testcase 6."<<endl<<endl; cout<<endl<<"Simulation::doTC6: Doing Testcase 6."<<endl<<endl;
parameterCheck_TC6(); parameterCheck_TC6();