Skip to content

Gen2 Production PR: Update to SBND LightPropagation Module - #967

Merged
aantonakis merged 4 commits into
production/sbnd-gen2from
bugfix_gen2_mctiming_merge_correctedopflash
Nov 17, 2026
Merged

aantonakis merged 4 commits into
production/sbnd-gen2from
bugfix_gen2_mctiming_merge_correctedopflash

Conversation

@VCLanNguyen

@VCLanNguyen VCLanNguyen commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Description

  1. Update cafmakerjob_sbnd_data_sce.fcl to pick up the correct SCE label
  2. Reorder reco2_data.fcl to run FrameShift module before LightPropagation module
  3. Update LightPropogation to pick FrameShift products

$${\color{blue}!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!}$$

$${\color{blue}\bf{\textrm{IMPORTANT UPDATE Feb 2nd 2026:}}}$$ If you are making a PR which is intended as a patch for the CURRENT production for gen 2 SBND analyses, you must make two PRs: one for develop and one for the production/sbnd-gen2 branch.

$${\color{red}\bf{\textrm{RESPONSE:}}}$$ This PR is unique to gen2 production. For develop, the FrameShift module is run at decoder level and every downstream products inherit it. For more information, see docdb#45982

$${\color{blue}!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!}$$

Relevant PR links (optional)

sbndcode: #967
sbncode: SBNSoftware/sbncode#675
sbnanaobj: SBNSoftware/sbnanaobj#199

Link(s) to docdb describing changes (optional)

See slide 27-29 on docdb#49588

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 tjones79) 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!

…nment

cafmakerjob_sbnd_data_sce.fcl was not remapping CorrectedOpFlashLabel to
its SCE variant, so CAFMaker's association lookup used a label nothing
produced ("lightpropagationcorrection" instead of
"lightpropagationcorrectionSCE"), leaving correctedOpFlash.* at the
-9999. sentinel in data.

LightPropagationCorrection_module now reads the sbnd::timing::FrameShiftInfo
product (produced by FrameShift_module, reordered earlier in
reco2_data.fcl's physics.reco2 path) instead of computing its own shift
from raw SPECTDC RWM/trigger hits. This picks up the RWM-to-gate alignment
FrameShift_module already applies (including the ~1738ns BNBLight mean)
and is stream-agnostic (BNB/Offbeam/Xmuon) since FrameApplyAtCaf is
resolved per-stream upstream. The FrameShiftInfo read is now done once per
event before the slice loop rather than once per slice.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@VCLanNguyen
VCLanNguyen marked this pull request as draft September 30, 2026 18:54
@VCLanNguyen VCLanNguyen changed the title Fix data-side CorrectedOpFlash timing: SCE label and RWM-to-gate alig… Gen2 Production PR: 1. Manual Fix for GENIE timing bug in CAFMaker, 2. Extend existing-data shift in CAFMaker, 3. Update to SBND LightPropagation Module Sep 30, 2026
@VCLanNguyen VCLanNguyen changed the title Gen2 Production PR: 1. Manual Fix for GENIE timing bug in CAFMaker, 2. Extend existing-data shift in CAFMaker, 3. Update to SBND LightPropagation Module Gen2 Production PR: Update to SBND LightPropagation Module Sep 30, 2026
@VCLanNguyen VCLanNguyen self-assigned this Sep 30, 2026
@VCLanNguyen VCLanNguyen added pds Photon Detection System data features for data processing labels Sep 30, 2026
@linyan-w linyan-w moved this to Waiting on Reviewer in SBND 2025 Gen2 Production Oct 1, 2026
@VCLanNguyen
VCLanNguyen marked this pull request as ready for review October 1, 2026 18:48
@asanchezcastillo asanchezcastillo self-assigned this Oct 20, 2026
@asanchezcastillo
asanchezcastillo requested review from fjnicolas and removed request for asanchezcastillo October 20, 2026 13:42
@asanchezcastillo

Copy link
Copy Markdown
Contributor

Pinging @fjnicolas as reviewer since @VCLanNguyen and myself are PR authors.

@aantonakis

Copy link
Copy Markdown
Contributor

trigger build ci_ref=v10_14_02_09 LArSoft/lar*@LARSOFT_SUITE_v10_14_02_06 SBNSoftware/sbndaq-artdaq-core@v1_10_06 SBNSoftware/sbn*@SBN_SUITE_v10_14_02_10

@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 Warning at phase ci_tests SBND on slf7 for e26:prof - ignored warnings for build -- details available through the CI dashboard

🚨 For more details about the warning phase, check the ci_tests SBND phase logs

parent CI build details are available through the CI dashboard

@aantonakis

Copy link
Copy Markdown
Contributor

Hi @fjnicolas, we are hoping to merge this PR soon. I just wanted to reach out to see if you could give this a review? Thanks!

@fjnicolas fjnicolas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good to me! Just two minor suggestions/comments. If time pressing, I'm happy to merge the PR as it is.


double spToCathode;
double cathodeToOpDet;
if(fIsMC){ // Correct VIS light as is simulated in MC.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can you add a link to the docdb explaining the difference between the data/MC approaches? It's non trivial, so it'd be nice for future reference.

Suggested change
if(fIsMC){ // Correct VIS light as is simulated in MC.
if(fIsMC){ // Correct VIS light as is simulated in MC (docdb 49900).

_fNuScore = 0.0;
fRWMTime=0.;
fEventTriggerTime=0.;
fFrameApplyAtCaf=0.;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I found the name of the variable confusing while making the review. The correction is all applied within this module, right? There is no correction left to be done by the user at CAF level.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Gen2 overall still needs time correction at CAF-level... It just happens this one timing variable sbn::CorrectedOpFlash will get correction at reco2 instead CAF.
So this naming method is to stay consistent with what being done in CAF, see these lines: https://github.com/SBNSoftware/sbncode/blob/production/sbnd-gen2/sbncode/CAFMaker/CAFMaker_module.cc#L645-L674

@aantonakis

Copy link
Copy Markdown
Contributor

trigger build ci_ref=v10_14_02_09 LArSoft/lar*@LARSOFT_SUITE_v10_14_02_06 SBNSoftware/sbndaq-artdaq-core@v1_10_06 SBNSoftware/sbn*@SBN_SUITE_v10_14_02_10

@FNALbuild

Copy link
Copy Markdown
Collaborator

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

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

@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 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 LArSoft Succeeded on slf7 for e26:prof -- details available through the CI dashboard

@FNALbuild

Copy link
Copy Markdown
Collaborator

⚠️ CI build for SBND Warning at phase ci_tests SBND on slf7 for e26:prof - ignored warnings for build -- details available through the CI dashboard

🚨 For more details about the warning phase, check the ci_tests SBND phase logs

parent CI build details are available through the CI dashboard

@aantonakis
aantonakis merged commit 95dcad5 into production/sbnd-gen2 Nov 17, 2026
3 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

data features for data processing pds Photon Detection System

Projects

Status: Waiting on Reviewer

Development

Successfully merging this pull request may close these issues.

5 participants