Skip to content

Track-CRV association: document projected crossings in <trk>crvxings - #447

Merged
sophiemiddleton merged 1 commit into
Mu2e:mainfrom
RobMina:trkcrv-projected-xings
Nov 14, 2026
Merged

sophiemiddleton merged 1 commit into
Mu2e:mainfrom
RobMina:trkcrv-projected-xings

Conversation

@RobMina

@RobMina RobMina commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

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>crvxings with
inbounds == false. Crossings found by the extrapolation always have inbounds == true. The ntuple code needs no
change. This PR updates what the branches say:

  • inc/TrkCrvXingInfo.hh: the struct description and inbounds. Candidates from projections have a larger chi2.
  • inc/TrkCrvInfo.hh: nxings counts projections too.
  • inc/TrkCrvTrueXingInfoMC.hh: recoxing can point at a projection.
  • doc/branches.md: the trkcrvxings row, and a note to select tracks that reach a CRV sector with inbounds, not
    nxings > 0.
  • utils/trkcrv_example.py: "crossing the CRV" and the layer-probe fractions use inbounds. It also prints how many
    tracks 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

@RobMina RobMina changed the title Update documentation and example for TrkCrvMatch projections. Track-CRV association: document projected crossings in <trk>crvxings Nov 13, 2026

@oksuzian oksuzian left a comment

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.

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 of doc/branches.md, and utils/trkcrv_example.py, which now selects tracks that reach the CRV with inbounds.
  • 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

  1. ⚪ [S3] Two statements are not quite accurate for projections
    • doc/branches.md:74 says 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 (Offline CRVReco/src/TrkCrvMatchTool.cc:359-368 at #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:24 still describes mom as the momentum "at the crossing". For a projection it is the momentum at the intersection the line starts from, as Offline#2149 now says for TrkCrvXing::mom_ (RecoDataProducts/inc/TrkCrvMatch.hh:53).

Verified

  • 🟢 No code change. The header changes are comments only. nxings, recoxing and inbounds keep 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.
    • inbounds is false only for projections (inc/TrkCrvXingInfo.hh:26): every crossing at base is in bounds.
    • The doc/branches.md advice to use inbounds, not nxings > 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 with hadd.
    • 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, EventNtuple main 428345c): the script runs and prints crossing the CRV 5,849 and projected only 0. All its other numbers equal those of main'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 8775fa36 merged onto 70243009, on CI build main/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

  1. Optional: "geometric candidates" in doc/branches.md:74, and the mom comment in inc/TrkCrvXingInfo.hh:24 (finding 1).

@sophiemiddleton
sophiemiddleton merged commit 16e81db into Mu2e:main Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants