Skip to content

Conversation

@tbwester
Copy link
Contributor

Description

This PR adds utility functions for WireMod to sbncode. Specifically, this adds:

  • Matching sim::SimEnergyDeposits to recob::Hits for creating hit truth information
  • Matching recob::Hits to ROI ranges
  • Calculating scale values for hit charges & widths according to truth information & pre-computed WireMod splines
  • Wire waveform modification via scaling by the ratio of Gaussian functions

We plan for ICARUS & SBND to both maintain separate experiment-specific modules that use this common utility. In particular,

  • SBND needs support for sim::IDE objects for its Spring production files, which do not have SimEnergyDeposits. SimEnergyDeposits will be kept in future productions, so support for sim::IDEs will be implemented at the sbndcode-level
  • ICARUS also modifies ChannelROI objects in addition to recob::Wires. This functionality will be added at the icaruscode level.

This is the V10-compatible veresion of PR#499 by @hausnerh.

  • Have you added a label? (bug/enhancement/physics etc.)
  • Have you assigned at least 1 reviewer?
  • Is this PR related to an open issue / project?
  • Does this PR affect CAF data format? If so, please assign a CAF maintainer as additional reviewer.
  • Does this PR require merging another PR in a different repository (such as sbnanobj/sbnobj etc.)? If so, please link it in the description.

@tbwester tbwester requested a review from hausnerh October 23, 2025 18:52
@tbwester tbwester self-assigned this Oct 23, 2025
@tbwester tbwester added the enhancement New feature or request label Oct 23, 2025
Copy link
Contributor

@hausnerh hausnerh left a comment

Choose a reason for hiding this comment

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

Overall this look good to me.
One commented out block that could be cleaned up, but nothing worth blocking the merge over

if (planeXInWindow(shifted_edep.X(), plane, *curTPCGeomPtr, offset + tickOffset))
target_roi_vec.emplace_back(wireReadout->PlaneWireToChannel(edep_wireID), std::round(planeXToTick(shifted_edep.X(), plane, *curTPCGeomPtr, offset + tickOffset)));
}
/*
Copy link
Contributor

Choose a reason for hiding this comment

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

If this block is unused we should probably remove it to keep the utility as clean as possible.
The loop above, (while, imo, having less legible syntax) does the trick just fine

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants