IAP GITLAB

Skip to content
Snippets Groups Projects
Commit c56ebc4a authored by ralfulrich's avatar ralfulrich
Browse files

removed unused "else" part

parent bddd991e
No related branches found
No related tags found
1 merge request!39Resolve "cascade example debugging"
Pipeline #94 passed
...@@ -123,38 +123,36 @@ namespace corsika::cascade { ...@@ -123,38 +123,36 @@ namespace corsika::cascade {
<< particle.GetEnergy() / 1_GeV << "GeV" << std::endl; << particle.GetEnergy() / 1_GeV << "GeV" << std::endl;
particle.Delete(); particle.Delete();
return; return;
} else { }
std::cout << "sth. happening before geometric limit ?" std::cout << "sth. happening before geometric limit ?"
<< ((min_distance < distance_max) ? "yes" : "no") << std::endl; << ((min_distance < distance_max) ? "yes" : "no") << std::endl;
if (min_distance < distance_max) { // interaction to happen within geometric limit if (min_distance < distance_max) { // interaction to happen within geometric limit
// check weather decay or interaction limits this step // check weather decay or interaction limits this step
if (min_distance == distance_interact) { if (min_distance == distance_interact) {
std::cout << "collide" << std::endl; std::cout << "collide" << std::endl;
InverseGrammageType const actual_inv_length = InverseGrammageType const actual_inv_length =
fProcessSequence.GetTotalInverseInteractionLength(particle, step); fProcessSequence.GetTotalInverseInteractionLength(particle, step);
corsika::random::UniformRealDistribution<InverseGrammageType> uniDist( corsika::random::UniformRealDistribution<InverseGrammageType> uniDist(
actual_inv_length); actual_inv_length);
const auto sample_process = uniDist(fRNG); const auto sample_process = uniDist(fRNG);
InverseGrammageType inv_lambda_count = 0. * meter * meter / gram; InverseGrammageType inv_lambda_count = 0. * meter * meter / gram;
fProcessSequence.SelectInteraction(particle, fStack, sample_process, fProcessSequence.SelectInteraction(particle, fStack, sample_process,
inv_lambda_count); inv_lambda_count);
} else { } else {
std::cout << "decay" << std::endl; std::cout << "decay" << std::endl;
InverseTimeType const actual_decay_time = InverseTimeType const actual_decay_time =
fProcessSequence.GetTotalInverseLifetime(particle); fProcessSequence.GetTotalInverseLifetime(particle);
corsika::random::UniformRealDistribution<InverseTimeType> uniDist( corsika::random::UniformRealDistribution<InverseTimeType> uniDist(
actual_decay_time); actual_decay_time);
const auto sample_process = uniDist(fRNG); const auto sample_process = uniDist(fRNG);
InverseTimeType inv_decay_count = 0 / second; InverseTimeType inv_decay_count = 0 / second;
fProcessSequence.SelectDecay(particle, fStack, sample_process, fProcessSequence.SelectDecay(particle, fStack, sample_process, inv_decay_count);
inv_decay_count);
}
} }
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment