Skip to content

Trigger Emulation Bug Fix and smaller updates#885

Merged
nathanielerowe merged 4 commits intodevelopfrom
feature/TriggerWorkNikki-PR
Nov 26, 2025
Merged

Trigger Emulation Bug Fix and smaller updates#885
nathanielerowe merged 4 commits intodevelopfrom
feature/TriggerWorkNikki-PR

Conversation

@npallat
Copy link
Copy Markdown
Contributor

@npallat npallat commented Nov 24, 2025

Description

Trigger Emulation Bug Fix includes:

  • Bug fix: previously the MonPulse length was taken from the FIRST waveforms in the vector of OpDetWaveforms, but this length corresponded to an XArapuca waveform, which is not the same size. This is fixed to now take the length from the first PMT waveform. (this is the major fix!)
  • Added check: added warnings to make sure we are only considering and slicing PMT waveforms
  • Added a vector of the number of pairs above threshold to the event (could be added to the cafs later)
  • Added a vector of the number of pairs above threshold to the PMT decoder output too
  • Updated Baseline fcl parameter to Run 2 Baseline,

$${\color{red}!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!}$$

$${\color{red}\bf{\textrm{IMPORTANT UPDATE June 22nd 2025:}}}$$ If you are making a PR which is intended as a patch for the CURRENT production (which started in Spring 2025), you must make two PRs: one for develop and one for the production/v10_06_00 branch.

$${\color{red}!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!}$$

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!
    This affects the ongoing validation release.

Relevant PR links (optional)

Does this PR require merging another PR in a different repository (such as sbnanobj/sbnobj etc.)?
It does not require merging with another PR. However, here is a link to the original PR including this work, for reference.

Link(s) to docdb describing changes (optional)

Is there a docdb describing the issue this solves or the feature added?
Here is a relevant presentation about this to the Trigger Working Group meeting.

… over threshold vector to events, updated Baseline to Run 2 Baseline, and checks that we are not considering any XArapuca channels
@npallat npallat requested a review from fjnicolas November 24, 2025 23:35
@npallat npallat self-assigned this Nov 24, 2025
@npallat npallat added bug Something isn't working trigger labels Nov 24, 2025
Copy link
Copy Markdown
Contributor

@fjnicolas fjnicolas left a comment

Choose a reason for hiding this comment

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

Thanks @npallat for putting this in!

My request before this gets in is reverting back to use run 1 baseline, since currently all our processing is based on run 1.

I left some other suggestions that I think should get address before a full scale production, but given the time constraint for the validation II samples I'd rather getting this in by now. Any thoughts @nathanielerowe @linyan-w?

Comment thread sbndcode/Decoders/PMT/run_pmtdecoder.fcl
Comment thread sbndcode/OpDetSim/TriggerEmulationService.cc Outdated
Comment thread sbndcode/OpDetSim/run_BeamRatesCalib.fcl Outdated
Comment thread sbndcode/OpDetSim/triggeremulationservice_sbnd.fcl Outdated
Comment thread sbndcode/OpDetSim/opDetDigitizerSBND_module.cc Outdated
Comment thread sbndcode/OpDetSim/opDetDigitizerSBND_module.cc Outdated
Comment thread sbndcode/OpDetSim/opDetDigitizerSBND_module.cc Outdated
Comment thread sbndcode/OpDetSim/TriggerEmulationService.cc Outdated
// resize
int ReadoutSize = fWaveforms[0].size();
int ReadoutSize;
if (PMT_Channels.empty()) { std::cout<<"Warning: Please provide PMT channels list."<<std::endl; ReadoutSize = fWaveforms[Pair1[0]].size(); }
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.

Is the cout here really a warning? It is expected that the PMT_Channels vector is empty when you call it fom the PMTDecoder module.

Copy link
Copy Markdown
Contributor Author

@npallat npallat Nov 25, 2025

Choose a reason for hiding this comment

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

The PMTDecoder has to assign the ReadoutSize differently because it is using data not MC:

          int NumFlash = fWaveforms.size() / (fTotalCAENBoards * PMTPerBoard);
          int FirstReadoutIndex = 0 + FlashCounter*PMTPerBoard + 0*PMTPerBoard*NumFlash;
          int ReadoutSize = fWaveforms[FirstReadoutIndex].size();

I could change this to just assign the ReadoutSize as ReadoutSize = fWaveforms[Pair1[0]].size() though since a warning will appear later when we loop through the channels if PMT_Channels is empty.

@fjnicolas
Copy link
Copy Markdown
Contributor

thanks for the catch @asanchezcastillo! my suggestion then is:

  • changing the baseline in digi_pmt_sbnd.fcl to use 14250 ADC (as in run 1 data)
  • TriggerEmulation inherits the baseline value from the PMT fhicl

Otherwise we'd need to have two configurations for the TriggerEmulation service, one for data, one for MC.

Copy link
Copy Markdown
Contributor

@fjnicolas fjnicolas left a comment

Choose a reason for hiding this comment

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

Thank you so much Nikki! Ready for CI!

@nathanielerowe
Copy link
Copy Markdown
Contributor

trigger build LArSoft/lar*@LARSOFT_SUITE_v10_14_00 SBNSoftware/sbndaq-artdaq-core@v1_10_06 SBNSoftware/sbn*@SBN_SUITE_v10_14_00

@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 ci_tests SBND on slf7 for e26:prof - ignored failure for unit_test -- details available through the CI dashboard

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

parent CI build details are available through the CI dashboard

@linyan-w linyan-w moved this from Waiting on Reviewer to Flagged by CI in SBND 2025 Fall Production Nov 25, 2025
@nathanielerowe
Copy link
Copy Markdown
Contributor

trigger build LArSoft/lar*@LARSOFT_SUITE_v10_14_00 SBNSoftware/sbndaq-artdaq-core@v1_10_06 SBNSoftware/sbn*@SBN_SUITE_v10_14_00

@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 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 -- 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

@nathanielerowe
Copy link
Copy Markdown
Contributor

Approved

@nathanielerowe nathanielerowe merged commit 996ebdd into develop Nov 26, 2025
@linyan-w linyan-w moved this from Flagged by CI to In tagged release in SBND 2025 Fall Production Dec 2, 2025
@kjplows kjplows moved this from Done to Testing in SBN software development Jan 16, 2026
@kjplows kjplows moved this from Testing to 2025 PRs in SBN software development Jan 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working trigger

Projects

Status: 2025 PRs
Status: In tagged release

Development

Successfully merging this pull request may close these issues.

7 participants