Added Parameter maxNumberInteractionsPerElectron.
This commit is contained in:
@@ -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");
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -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();
|
||||||
|
|||||||
Reference in New Issue
Block a user