Skip to content

SBND Timing Reconstruction Refactor#915

Open
VCLanNguyen wants to merge 64 commits into
developfrom
feature/frame_shift_refactor_v10_14_02
Open

SBND Timing Reconstruction Refactor#915
VCLanNguyen wants to merge 64 commits into
developfrom
feature/frame_shift_refactor_v10_14_02

Conversation

@VCLanNguyen
Copy link
Copy Markdown
Contributor

@VCLanNguyen VCLanNguyen commented Feb 14, 2026

Description

  • Timing reconstruction is refactored in this PR, affecting the decode/reconstruction workflow of CRT/PMT/XA.
  • After the refactoring, the @FrameShiftModule@ runs first in the decode chain, outputs timing products to be used at PMT/XA decoder and CRTStrip reconstruction.
  • Relevant PMT reconstruction modules at Reco1/Reco2 are updated.
  • The timing correction applied at CAFMakeer is undone. - The timing correction applied at CAFMakeer is undone. This should ressolve this issue: Converge timing correction in CAFMaker for SBND and ICARUS sbncode#567
  • Details and validation plots can before in the linked docdb.

Link(s) to docdb describing changes (optional)

https://sbn-docdb.fnal.gov/cgi-bin/sso/ShowDocument?docid=46654

Relevant PR links (optional)

This PR needs the XA decoder PR in sbndcode to go in first:
#847

This PR needs to be merged together with this group of PRs:

Checklist

  • Added at least 1 label from available labels.
  • Assigned at least 1 reviewer under Reviewers,
  • Assigned all contributers including yourself under Assignees
  • Linked any relevant issues under Developement
  • Does this PR affect CAF data format? If so, please assign a CAF maintainer (PetrilloAtWork or JosiePaton) as additional reviewer.
  • Does this affect the standard workflow?
  • Is this PR a patch for the ongoing production? If so, separate PR must also be made for production/v10_06_00 branch!

VCLanNguyen and others added 30 commits November 11, 2025 16:24
…_fragments' into feature/aliciavr-XARAPUCA-offline-decoder-v5.0-frameshift-refactor
…ess its products. Additionally, set a frameshift mode boolean t be activated when selecting the frameshift timestamp (this one to be integrated in the workflow)
@VCLanNguyen VCLanNguyen requested a review from PetrilloAtWork May 6, 2026 23:08
@PetrilloAtWork
Copy link
Copy Markdown
Member

something that looks like a bug (which must be fixed, hence the rejection)

I think that was the resize() call that does not reset values to 0. That was fixed.

a questionable implementation of the difference of timestamps

That is the implementation of TimingUtils::SubtractUTCTimestmap(). I don't see my original comment any more... either GitHub ate it, or it never left my computer. It was something like:

How is this implementation different from:

double sbn::TimingUtils::SubtractUTCTimestmap(uint64_t ts1, uint64_t ts2) {
  return (ts1 > ts2)? (double)(ts1 - ts2): -(double)(ts2 - ts1);
}

@VCLanNguyen
Copy link
Copy Markdown
Contributor Author

something that looks like a bug (which must be fixed, hence the rejection)

I think that was the resize() call that does not reset values to 0. That was fixed.

a questionable implementation of the difference of timestamps

That is the implementation of TimingUtils::SubtractUTCTimestmap(). I don't see my original comment any more... either GitHub ate it, or it never left my computer. It was something like:

How is this implementation different from:

double sbn::TimingUtils::SubtractUTCTimestmap(uint64_t ts1, uint64_t ts2) {
  return (ts1 > ts2)? (double)(ts1 - ts2): -(double)(ts2 - ts1);
}

I don't think it is any different. I just wrote it very convoluted originally so I could understand and did not look at it again... Updated now.

@PetrilloAtWork
Copy link
Copy Markdown
Member

There are things to be careful of in that apparently simple difference (the conversion from unsigned operands to a signed difference, and the loss of precision from conversion to double), so if you want you may add a comment in the implementation in that regard.

Copy link
Copy Markdown
Member

@PetrilloAtWork PetrilloAtWork left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved, and thanks.

@VCLanNguyen
Copy link
Copy Markdown
Contributor Author

Hi @nathanielerowe reviewers approved all 4 PRs now so they are ready for CI test. Any suggestions on how to proceed?

@aantonakis
Copy link
Copy Markdown
Contributor

@FNALbuild
Copy link
Copy Markdown
Collaborator

✔️ CI build for LArSoft Succeeded on slf7 for e26:prof -- details available through the CI dashboard

@FNALbuild
Copy link
Copy Markdown
Collaborator

✔️ CI build for LArSoft Succeeded on slf7 for c14:prof -- details available through the CI dashboard

@FNALbuild
Copy link
Copy Markdown
Collaborator

❌ CI build for SBND Failed at phase build SBND on slf7 for e26:prof -- details available through the CI dashboard

🚨 For more details about the failed phase, check the build SBND phase logs

parent CI build details are available through the CI dashboard

@FNALbuild
Copy link
Copy Markdown
Collaborator

❌ CI build for SBND Failed at phase build SBND on slf7 for c14:prof -- details available through the CI dashboard

🚨 For more details about the failed phase, check the build SBND phase logs

parent CI build details are available through the CI dashboard

@aantonakis
Copy link
Copy Markdown
Contributor

trigger build SBNSoftware/sbncode#637,SBNSoftware/sbnobj#170,SBNSoftware/sbnanaobj#188,LArSoft/LARSOFT_SUITE_v10_14_02

@FNALbuild
Copy link
Copy Markdown
Collaborator

✔️ CI build for LArSoft Succeeded on slf7 for c14:prof -- details available through the CI dashboard

@FNALbuild
Copy link
Copy Markdown
Collaborator

✔️ CI build for LArSoft Succeeded on slf7 for e26:prof -- details available through the CI dashboard

@FNALbuild
Copy link
Copy Markdown
Collaborator

❌ CI build for SBND Failed at phase build SBND on slf7 for c14:prof -- details available through the CI dashboard

🚨 For more details about the failed phase, check the build SBND phase logs

parent CI build details are available through the CI dashboard

@FNALbuild
Copy link
Copy Markdown
Collaborator

❌ CI build for SBND Failed at phase build SBND on slf7 for e26:prof -- details available through the CI dashboard

🚨 For more details about the failed phase, check the build SBND phase logs

parent CI build details are available through the CI dashboard

@aantonakis
Copy link
Copy Markdown
Contributor

trigger build SBNSoftware/sbncode#637,SBNSoftware/sbnobj#170,SBNSoftware/sbnanaobj#188,LArSoft/lar*@LARSOFT_SUITE_v10_14_02_02

@FNALbuild
Copy link
Copy Markdown
Collaborator

✔️ CI build for LArSoft Succeeded on slf7 for c14:prof -- details available through the CI dashboard

@FNALbuild
Copy link
Copy Markdown
Collaborator

✔️ CI build for LArSoft Succeeded on slf7 for e26:prof -- details available through the CI dashboard

@FNALbuild
Copy link
Copy Markdown
Collaborator

❌ CI build for SBND Failed at phase build SBND on slf7 for c14:prof -- details available through the CI dashboard

🚨 For more details about the failed phase, check the build SBND phase logs

parent CI build details are available through the CI dashboard

@FNALbuild
Copy link
Copy Markdown
Collaborator

❌ CI build for SBND Failed at phase build SBND on slf7 for e26:prof -- details available through the CI dashboard

🚨 For more details about the failed phase, check the build SBND phase logs

parent CI build details are available through the CI dashboard

@aantonakis
Copy link
Copy Markdown
Contributor

trigger build SBNSoftware/sbncode#637,SBNSoftware/sbnobj#170,SBNSoftware/sbnanaobj#188,LArSoft/lar*@LARSOFT_SUITE_v10_14_02

@FNALbuild
Copy link
Copy Markdown
Collaborator

✔️ CI build for LArSoft Succeeded on slf7 for c14:prof -- details available through the CI dashboard

@FNALbuild
Copy link
Copy Markdown
Collaborator

✔️ CI build for LArSoft Succeeded on slf7 for e26:prof -- details available through the CI dashboard

@FNALbuild
Copy link
Copy Markdown
Collaborator

❌ CI build for SBND Failed at phase build SBND on slf7 for c14:prof -- details available through the CI dashboard

🚨 For more details about the failed phase, check the build SBND phase logs

parent CI build details are available through the CI dashboard

@FNALbuild
Copy link
Copy Markdown
Collaborator

❌ CI build for SBND Failed at phase build SBND on slf7 for e26:prof -- details available through the CI dashboard

🚨 For more details about the failed phase, check the build SBND phase logs

parent CI build details are available through the CI dashboard

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking change caf Common analysis framework crt Cosmic Ray Tagger data features for data processing pds Photon Detection System

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants