Skip to content

Add guard to GetTime - #428

Merged
JamesJieranShen merged 4 commits into
rat-pac:mainfrom
rpitelka:RAVEN-quad-fix
Sep 18, 2026
Merged

JamesJieranShen merged 4 commits into
rat-pac:mainfrom
rpitelka:RAVEN-quad-fix

Conversation

@rpitelka

Copy link
Copy Markdown
Collaborator

When a waveform analyzer does not reconstruct any PEs for a given DigitPMT, any event fitters that call GetTime from the FitterInputHandler will cause a crash because GetTime expects a non-empty vector of times.

To fix this, I added a check to GetTime in FitterInputHandler that dies when the function is called when no PEs were reconstructed. I also added checks to all the fitters that call GetTime to skip PMTs with no reconstructed PEs.

I'm not sure this is the best solution, so input is appreciated, but it does fix the known crash when empty waveform analysis results from RAVEN (caused by the max_total_charge parameter being set too low) are fed into quad.

@JamesJieranShen

Copy link
Copy Markdown
Contributor

Discussed offline -- I'm not sure if throwing out all the hits above max charge is the best option. I think it may be better to have InputHandler fall back to digit* when the fit returns empty, needs more thinking....

@JamesJieranShen

Copy link
Copy Markdown
Contributor

Thanks @rpitelka , are the changes to FitDirectionCenter now obsolete?

@rpitelka

rpitelka commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator Author

@JamesJieranShen Fixed revert, now only FitterInputHandler is modified by this PR

@syjeon162

Copy link
Copy Markdown
Contributor

Looks good! Can we add some documentation about this behavior wherever relevant? (Maybe the FIT_COMMON or DIGITIZER_ANALYSIS ratdbs?)

@JamesJieranShen
JamesJieranShen merged commit fd11c15 into rat-pac:main Sep 18, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants