SBND Timing Reconstruction Refactor#637
Open
VCLanNguyen wants to merge 4 commits intodevelopfrom
Open
Conversation
This was referenced Mar 4, 2026
Contributor
Author
|
@JosiePaton @PetrilloAtWork can you guys review for CAF? |
PetrilloAtWork
requested changes
Apr 28, 2026
Member
There was a problem hiding this comment.
Ops... added the comment for a different PR here.
This PR is actually fine, although I would appreciate you considering the changes I mentioned below (in particular, the bit-wise & operator is semantically wrong there, even if it works as it should).
Re-request the review of this PR after considering these, for quick approval.
|
|
||
| double diff_ts = std::numeric_limits<double>::max(); | ||
|
|
||
| if ((triggerInfo.global_trigger_time != std::numeric_limits<uint64_t>::max()) & (triggerInfo.beam_gate_time_abs != std::numeric_limits<uint64_t>::max())){ |
Member
There was a problem hiding this comment.
Suggested change
| if ((triggerInfo.global_trigger_time != std::numeric_limits<uint64_t>::max()) & (triggerInfo.beam_gate_time_abs != std::numeric_limits<uint64_t>::max())){ | |
| if ((triggerInfo.global_trigger_time != std::numeric_limits<uint64_t>::max()) && (triggerInfo.beam_gate_time_abs != std::numeric_limits<uint64_t>::max())){ |
| diff_ts = triggerInfo.global_trigger_time - triggerInfo.beam_gate_time_abs; | ||
| } | ||
| else{ | ||
| diff_ts = (triggerInfo.beam_gate_time_abs - triggerInfo.global_trigger_time)*(double)-1; |
Member
There was a problem hiding this comment.
It can also go as
Suggested change
| diff_ts = (triggerInfo.beam_gate_time_abs - triggerInfo.global_trigger_time)*(double)-1; | |
| diff_ts = -1.0 * (triggerInfo.beam_gate_time_abs - triggerInfo.global_trigger_time); |
Comment on lines
+2659
to
+2663
| //// Legacy code: Timing correction is now done at decoding/reconstruction level | ||
| ////shift reference frame for CRT objects: crt trk, crt sp, crt sp match, crt trk match | ||
| //SBNDShiftCRTReference(rec, rec.sbnd_frames.frameApplyAtCaf); | ||
| ////shift reference frame for PMT objects: opflash, opt0 | ||
| //SBNDShiftPMTReference(rec, rec.sbnd_frames.frameApplyAtCaf); |
Member
There was a problem hiding this comment.
I recommend to remove this completely, but if you feel strongly about keeping it, make these non-Doxygen comments (//// starts a Doxygen comment). For example:
Suggested change
| //// Legacy code: Timing correction is now done at decoding/reconstruction level | |
| ////shift reference frame for CRT objects: crt trk, crt sp, crt sp match, crt trk match | |
| //SBNDShiftCRTReference(rec, rec.sbnd_frames.frameApplyAtCaf); | |
| ////shift reference frame for PMT objects: opflash, opt0 | |
| //SBNDShiftPMTReference(rec, rec.sbnd_frames.frameApplyAtCaf); | |
| #if 0 | |
| // Legacy code: Timing correction is now done at decoding/reconstruction level | |
| //shift reference frame for CRT objects: crt trk, crt sp, crt sp match, crt trk match | |
| SBNDShiftCRTReference(rec, rec.sbnd_frames.frameApplyAtCaf); | |
| //shift reference frame for PMT objects: opflash, opt0 | |
| SBNDShiftPMTReference(rec, rec.sbnd_frames.frameApplyAtCaf); | |
| #endif // 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Link(s) to docdb describing changes (optional)
https://sbn-docdb.fnal.gov/cgi-bin/sso/ShowDocument?docid=45982
Relevant PR links (optional)
This PR needs the XA decoder PR in sbndcode to go in first:
SBNSoftware/sbndcode#847
This PR needs to be merged together with this group of PRs:
Checklists