Tracking: Genfit exception guard #85
Conversation
…aborting the event loop
| // Guard the whole per-track fit: a GenFit exception (e.g. an | ||
| // ill-conditioned covariance during the fit or the extrapolation to the | ||
| // IP) should skip just this track, not abort the entire event loop. | ||
| try { |
There was a problem hiding this comment.
Can your try-except only cover the line that can throw an exception? You probably don't want to catch an unrelated exception, but if it happens in the big block inside the try-except you may.
There was a problem hiding this comment.
Hi @jmcarcell, it's not only specific one line, but it happens when it calls ProcessTrack, which it happens multiple times through the loop.
But we can change the exception to genfit::Exception instead of std::exception, so it caches narrower and only related exceptions. What do you think?
There was a problem hiding this comment.
Then it should probably be handled inside ProcessTrack and not outside of it, as any caller will be in the same situation. Different return codes can be returned, for example, to distinguish different cases. using genfit::Exception is definitely better.
Tagging @andread3vita
|
Thank you @mahmoudali2! Do you have a reproducer for the bug you are describing? |
While testing the fitter, I checked whether the failure of a single track fit could cause the entire event processing to crash. To prevent this, I wrapped the fitting procedure in a try-catch block so that a failed fit for one track should not interrupt the processing of the rest of the event. See here. |
BEGINRELEASENOTES
Guard the whole per-track fit: a GenFit exception (e.g. an ill-conditioned covariance during the fit or the extrapolation to the IP) should skip just this track, not abort the entire event loop.
ENDRELEASENOTES