IAP GITLAB

Skip to content
Snippets Groups Projects
Commit 651dd433 authored by Maximilian Reininghaus's avatar Maximilian Reininghaus :vulcan: Committed by ralfulrich
Browse files

fixed setting of event type

parent 8684d4fc
No related branches found
No related tags found
No related merge requests found
......@@ -327,9 +327,7 @@ namespace corsika::cascade {
units::si::InverseTimeType inv_decay_count = units::si::InverseTimeType::zero();
auto const returnCode =
fProcessSequence.SelectDecay(particle, view, sample_process, inv_decay_count);
if constexpr (TStackView::has_event) {
view.GetProjectile().GetEvent()->setEventType(history::EventType::Decay);
}
SetEventType(view, history::EventType::Decay);
return returnCode;
}
......@@ -345,10 +343,14 @@ namespace corsika::cascade {
auto inv_lambda_count = units::si::InverseGrammageType::zero();
auto const returnCode = fProcessSequence.SelectInteraction(
particle, view, sample_process, inv_lambda_count);
SetEventType(view, history::EventType::Interaction);
return returnCode;
}
void SetEventType(TStackView& view, history::EventType eventType) {
if constexpr (TStackView::has_event) {
view.GetProjectile().GetEvent()->setEventType(history::EventType::Interaction);
for (auto&& sec : view) { sec.GetEvent()->setEventType(eventType); }
}
return returnCode;
}
// but this here temporarily. Should go into dedicated file later:
......
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