Repository navigation
Add Edep filtering to the helix filter - #2055
Conversation
|
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 ce1567d: build (Build queue - API unavailable) |
|
☀️ The build tests passed at ce1567d.
N.B. These results were obtained from a build of this Pull Request at ce1567d after being merged into the base branch at 78ea1fd. For more information, please check the job page here. |
oksuzian
left a comment
There was a problem hiding this comment.
PR Review Summary — #2055
Reviewed at head ce1567d16861a8325f29b09b2c45fb819e229c9e. First pass.
Decision
- 🟢 approve
Scope understood
HelixFiltergains two optional cuts,minEDepAvgandmaxEDepAvg, on the mean straw-hit energy deposit of the helix hits. The stated use is selecting or vetoing protons at the helix level.- Both cuts are off unless a table sets them. No fcl in Offline or mu2e-trig-config sets them yet.
Findings
None.
Verified
- 🟢 The value read is the right one.
Helix.hits().eDepAvg()(HelixFilter_module.cc:137) recomputes the mean from the helix hits. The storedHelixSeed::eDepAvg()would be wrong here:AgnosticHelixFindernever fills_eDepAvg, so it stays 0 for every APR helix. OnlyCalHelixFinder,RobustHelixFinderandRobustMultiHelixFinderset it. - 🟢 The comment "Minimum mean straw hit energy deposit" is accurate.
ComboHitCollection::eDepAvg()(RecoDataProducts/src/ComboHit.cc:266-275) weights each combo hit'senergyDep()by itsnStrawHits(). A combo hit's_edepis itself the average over its straw hits (CombineStrawHits_module.cc:303,MakeStereoHits_module.cc:298-319). So the result is the mean per straw hit, as the comment says. - 🟢 It matches the finder's own cut.
AgnosticHelixFindercomputes the samehseed._hhits.eDepAvg()atCalPatRec/src/AgnosticHelixFinder_module.cc:1622and rejects oneDepAvg > _maxEDepAvgat :1653. The filter keepsedep <= _maxedep, so the boundary is the same. - 🟢 An empty hit list gives 0, not NaN, because the denominator is
nStrawHits + 1e-10. With the cuts unset, the defaultslowest()andmax()(:196-197) therefore pass every helix. - 🟢 Both new members are initialized where they are declared.
OptionalAtom::operator()(T&)leaves the member unchanged when the key is absent, so an unset cut is a real no-op. - 🟢 FNALbuild at this head is green, including the trigger test with return code 0. That is consistent with no change when the keys are unset. The one clang-tidy error is in the external
cetlib/LibraryManager.h, not in this PR.
Validation check
- Build/tests run: no local build or job run. FNALbuild build 3484 at this head passed every test.
- Config contract check: pass. Two new optional keys; existing tables validate unchanged.
- Cross-repo consistency: no companion change is needed to merge. No trig-config table uses the keys yet.
Residual risk
- Merge order with #2035: both PRs edit the same debug print in
HelixFilter_module.cc(:143-144 here).git merge-treeof the two heads reports a content conflict on that one statement only. Whichever merges second needs a one-line rebase. - The accessor
HelixSeed::eDepAvg()has no caller in Offline or EventNtuple. Only the finders that set the field read it, and it is 0 for APR helices. A later edit that switches this filter to the stored field would silently cut every APR helix whenminEDepAvgis set. This is pre-existing and not a reason to hold this PR.
Author follow-ups
- Which trigger path will set these cuts?
TrigAprProtonHelixFinder(trigAprProducers.fcl:22-30) runs withmaxEDepAvg: 100., so its helices look like the natural input. A short note on the intended values would help whoever reviews the trig-config side. MultiHelixFilterdoes not get the cut. It now has one consumer (trigAprFilters.fcl:646). Is that intended?
This will allow for selection or vetoing of protons at the helix level.