Repository navigation
Track-CRV association: document projected crossings in <trk>crvxings - #447
Merged
Merged
Conversation
<trk>crvxings
oksuzian
approved these changes
Nov 13, 2026
oksuzian
left a comment
Contributor
There was a problem hiding this comment.
PR Review Summary — #447
Reviewed at head 1395fed44429c29be18da9734ee22cd950c91c10. First pass.
Decision
- 🟢 approve
Scope understood
- Companion of Mu2e/Offline#2149, which stores projections of straight-line tracks as crossings with
inbounds == false. This PR changes comments in three headers, one paragraph and one table row ofdoc/branches.md, andutils/trkcrv_example.py, which now selects tracks that reach the CRV withinbounds. - Merge order: merge with or after Offline#2149. Merged earlier, it does no harm: the example also runs on ntuples without projections (below). But the documentation would then describe behaviour Offline does not have yet.
Findings
- ⚪ [S3] Two statements are not quite accurate for projections
doc/branches.md:74says a line track is projected "onto the extended plane of each sector holding one of its candidates". Offline keeps a projection only when a geometric candidate uses it (OfflineCRVReco/src/TrkCrvMatchTool.cc:359-368at #2149's head). In my Offline#2149 A/B ntuple, 955 line tracks have no in-bounds crossing and at least one candidate. 691 of them have no projection, because they hold only time candidates. On every projected track, the projection sectors are exactly the sectors with a geometric candidate. Suggested: "each sector holding one of its geometric candidates".inc/TrkCrvXingInfo.hh:24still describesmomas the momentum "at the crossing". For a projection it is the momentum at the intersection the line starts from, as Offline#2149 now says forTrkCrvXing::mom_(RecoDataProducts/inc/TrkCrvMatch.hh:53).
Verified
- 🟢 No code change. The header changes are comments only.
nxings,recoxingandinboundskeep their types and defaults, so the branches are unchanged. - 🟢 The other comments match Offline#2149, checked on the A/B below:
nxings(inc/TrkCrvInfo.hh:11) counts projections: 264 tracks hold 280 projections.recoxing(inc/TrkCrvTrueXingInfoMC.hh:29) can point at a projection: 222 true crossings are matched only by one.inboundsis false only for projections (inc/TrkCrvXingInfo.hh:26): every crossing at base is in bounds.- The
doc/branches.mdadvice to useinbounds, notnxings > 0, and the chi2 note agree with Offline#2149's description.
- 🟢
utils/trkcrv_example.py. I ran it on ntuples from my Offline#2149 A/B: one MDC2025bb extracted-cosmic dig file (30,311 events, 20,296 tracks),from_mcs-extracted.fcl, merged withhadd.- With Offline#2149 (EventNtuple at this head): crossing the CRV 5,849, projected only 264, with a geometric candidate 5,373. Layer probe L0-L3: 0.639, 0.643, 0.645, 0.642.
- Without Offline#2149 (Offline
70243009, EventNtuplemain428345c): the script runs and prints crossing the CRV 5,849 and projected only 0. All its other numbers equal those ofmain's script on that file. - So the crossing count and the layer-probe fractions are the same with and without #2149, as the description says. The 264 projected-only tracks are exactly the tracks that hold projections.
- For comparison,
main's script on the #2149 ntuple prints crossing the CRV 6,113 (5,849 + 264) and L2 0.646. That is the miscount this PR fixes. - I did not have the description's file, so I did not reproduce its 21,453 / 6,252 / 188.
Validation check
- Build/tests: EventNtuple has no FNALbuild. This head built cleanly in a muse workdir with Offline#2149 at
8775fa36merged onto70243009, on CI buildmain/70243009_dc19af05_1dc8ee40. The script ran with uproot 5.7.6 and awkward 2.13.0, including--plots. - Config contract: no FHiCL change.
- Cross-repo consistency: pass. Merge with or after Offline#2149.
Residual risk
- Not checked: CRT data ntuples (
from_rec-combined.fcl).
Author follow-ups
- Optional: "geometric candidates" in
doc/branches.md:74, and themomcomment ininc/TrkCrvXingInfo.hh:24(finding 1).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Documentation only; companion of Mu2e/Offline#2149.
With Offline#2149, a straight-line track (KinematicLine fit) that crosses no CRV sector is projected onto the extended
plane of each sector holding one of its candidates. These projections are stored in
<trk>crvxingswithinbounds == false. Crossings found by the extrapolation always haveinbounds == true. The ntuple code needs nochange. This PR updates what the branches say:
inc/TrkCrvXingInfo.hh: the struct description andinbounds. Candidates from projections have a larger chi2.inc/TrkCrvInfo.hh:nxingscounts projections too.inc/TrkCrvTrueXingInfoMC.hh:recoxingcan point at a projection.doc/branches.md: thetrkcrvxingsrow, and a note to select tracks that reach a CRV sector withinbounds, notnxings > 0.utils/trkcrv_example.py: "crossing the CRV" and the layer-probe fractions useinbounds. It also prints how manytracks have projections only. On an extracted-cosmic MC file with #2149 (21,453 tracks), it reports 6,252 tracks
crossing the CRV, as without #2149, and 188 projected only. The layer-probe fractions match those without #2149.
🤖 Generated with Claude Code