Calo step selection in calo dts filtering#1819
Conversation
…ection, and diagnostic printouts
|
Hi @michaelmackenzie,
which require these tests: build. @Mu2e/write, @Mu2e/fnalbuild-users have access to CI actions on main. ⌛ The following tests have been triggered for a9839ee: build (Build queue - API unavailable) |
|
☀️ The build tests passed at a9839ee.
N.B. These results were obtained from a build of this Pull Request at a9839ee after being merged into the base branch at 77250d9. For more information, please check the job page here. |
PR #1819 Review — Calo step selection in calo dts filteringPR Summary
Intent: Adds three things to the
No linked issue; no acceptance criteria to track. Core Changes1. Calo-specific particle momentum cutfhicl::Atom<double> minCaloPartMom{ Name("MinimumCaloPartMom"), Comment("Minimum particle momentum for calo steps"), 0.0 };
fhicl::Atom<double> maxCaloPartMom{ Name("MaximumCaloPartMom"), Comment("Maximum particle momentum for calo steps"), maxE_ };In the calo loop, 2. Total calo energy selectionfhicl::OptionalAtom<double> minSumCaloTotalE { Name("MinimumSumCaloE"), Comment("Minimum E sum of good calorimeter steps by all good particles (MeV) ")};Track 3. Diagnostic printouts gated by
|
| Criterion | State |
|---|---|
| Build & integration tests | ✅ all green |
| Code review approvals | |
| Behavior preservation | MinimumPartMom |
| Naming clarity | MinimumSumCaloE vs MinimumSumCaloStepE |
| Static analysis |
Recommended before merge: address Issue 1 (decide preservation vs. breaking) and Issue 2 (rename fhicl key while it's still cheap). Issues 3–9 are nice-to-haves.
Possible Improvements
- Add a unit/integration test (or a tiny test fcl) exercising the new total-energy path so future refactors don't silently regress it.
- Consolidate the four diagnostic blocks into a small helper or
mf::LogDebugto keepfilter()readable. - Initialize
total_edepat the top offilter()per event (it currently is, since it's a local — fine, but worth a comment explaining "intentionally summed across all calo collections"). - Bump
MaximumPartMom's comment in the header to mention it now applies only to tracker/CRV steps.
Want me to…
- Pull and summarize the clang-tidy errors/warnings from the build artifact to see if any are introduced by this PR.
- Search downstream fcl files in
Mu2e/Offlinethat setMinimumPartMomonDetectorStepFilterto quantify the blast radius of Issue 1. - Draft a suggested patch implementing Issues 1–4 (preservation of
minPartM_, rename,>=, optionalMaximumSumCaloE). - Look up other recent calo-filtering PRs / Run 1B discussions for added context on the motivation.
|
Responding to the AI comments:
|
This adds separate min/max particle momentum thresholds for calo steps, a total calo energy deposit selection, and some additional diagnostic printouts. In Run 1B work, we found the current filtering can bias the output by filtering out events with high deposits but they shower and separate into different sim particles. This helps resolve this issue, especially when using the new total calo energy deposit selection that will add up this total shower.