KATRIN-Experiment / Kassiopeia

Simulation of electric and magnetic fields and particle tracking
https://katrin-experiment.github.io/Kassiopeia/index.html
Other
47 stars 29 forks source link

Fix Scattering Terminators #100

Closed richeldichel closed 6 months ago

richeldichel commented 7 months ago

This commit resets the KSTermOutput terminator value when terminator is called.

This bug was reported by a Kassiopeia user who tried to setup a simulation using

<ksterm_output name="term_max_elastic" group="output_track_h2" component="track_n_h2_elastic" max_value="1"/>
<ksterm_output name="term_max_excitation" group="output_track_h2" component="track_n_h2_excitation" max_value="1"/>
<ksterm_output name="term_max_ionisation" group="output_track_h2" component="track_n_h2_ionisation" max_value="1"/>

He observed that after the first termination of this kind, all following tracks were terminated after one step with the same terminator.

2xB commented 6 months ago

In this case, the output fields track_n_h2_elastic etc. are integrated outputs and misconfigured as not inside the track output group which would reset the integration after each track start. The fix seems to work since it resets the integration after each track manually, but it effectively just hides the underlaying configuration issue.