Skip to content

Add histograms for nightly validation of track CRV extrapolation - #2023

Merged
oksuzian merged 1 commit into
Mu2e:mainfrom
RobMina:validation-crv-intersections
Oct 7, 2026
Merged

oksuzian merged 1 commit into
Mu2e:mainfrom
RobMina:validation-crv-intersections

Conversation

@RobMina

@RobMina RobMina commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

This PR is a companion to Mu2e/Production#580

This PR adds histograms of each KalSeed's intersections with the CRV sectors. The nightly comparison then covers the CentralHelix (and KinematicLine) extrapolation to the CRV.

The intended source is the new off-spill nightly job in Mu2e/Production#580, whose CentralHelix fits extrapolate to the CRV (CHXTRAP ToCRV: true). No configuration change is needed: Validation_module already histograms every KalSeedCollection in the file.

@FNALbuild

Copy link
Copy Markdown
Collaborator

Hi @RobMina,
You have proposed changes to files in these packages:

  • Validation

which require these tests: build.

@Mu2e/fnalbuild-users, @Mu2e/write have access to CI actions on main.

⌛ The following tests have been triggered for af27492: build (Build queue - API unavailable)

About FNALbuild. Code review on Mu2e/Offline.

@FNALbuild

Copy link
Copy Markdown
Collaborator

☀️ The build tests passed at af27492.

Test Result Details
test with ✅ Command did not list any other PRs to include
merge ✅ Merged af27492 at f878eb6
build (prof) ✅ Log file. Build time: 04 min 27 sec
ceSimReco ✅ Log file.
g4test_03MT ✅ Log file.
transportOnly ✅ Log file.
POT ✅ Log file.
g4study ✅ Log file.
cosmicSimReco ✅ Log file.
cosmicOffSpill ✅ Log file.
ceSteps ✅ Log file.
ceDigi ✅ Log file.
muDauSteps ✅ Log file.
ceMix ✅ Log file.
rootOverlaps ✅ Log file.
g4surfaceCheck ✅ Log file.
trigger ✅ Log file.
check_cmake ✅ Log file.
FIXME, TODO ➡️ TODO (1) FIXME (0) in 2 files
clang-tidy ➡️ 1 errors 157 warnings
whitespace check ✅ no whitespace errors found

N.B. These results were obtained from a build of this Pull Request at af27492 after being merged into the base branch at f878eb6.

For more information, please check the job page here.
Build artifacts are deleted after 5 days. If this is not desired, select Keep this build forever on the job page.

@oksuzian oksuzian left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

PR Review Summary — #2023

Reviewed at head af274920cd73e302af7b62902e679b71795cc59b. first pass

Decision

  • 🟢 approve. The new CRV histograms are booked and filled correctly. None of the existing ValKalSeed histograms change, and the version is bumped from 14 to 15 as the file's own comment asks. The three notes below are nits.

Scope understood

  • ValKalSeed gains one labelled bin per CRV sector SurfaceId in [CRV_EX, CRV_StrongBack). For each KalSeed it adds the count of CRV-sector and strongback intersections. For each CRV-sector intersection it adds the in-bounds flag, the time relative to t0, momentum, relative momentum error, dP, and x/y/z.
  • Companion to Mu2e/Production#580, whose off-spill job keeps KKCHmu with CHXTRAP ToCRV: true.

Verified, no action needed

  • 🟢 No new configuration is needed. Validation_module.cc:157 already runs analyzeProduct<KalSeedCollection, ValKalSeed> over every KalSeed collection, so the off-spill output from #580 picks this up as is.

  • 🟢 Every booked histogram is filled. The sector histograms are filled only for intersections whose id is in _crvbin, so tracker, ST, IPA and other intersections are skipped.

  • 🟢 On-spill jobs are unaffected. A KalSeed with no CRV intersections fills NCRV and NCRVSB at 0 and nothing else.

  • 🟢 The sector bins are deterministic. SurfaceIdDetail::names() is a std::map ordered by enum value, so the bin order is stable from run to run. That's 34 sectors, CRV_EX through CRV_M8. TCRV (200) and DS_HatchConcrete (300) are correctly left out.

  • 🟢 Real values from the #580 job fall inside the new ranges. I printed the KalSeed intersections (printKalSeed, verbose 2) from 100 events of #580's offSpill_01 output. That gave 16 KKCHmu tracks with 36 intersections, two of them on CRV sectors:

    • CRV_T1: z = -4550 mm, p = 5.5 GeV/c, dP = -42.6 MeV
    • CRV_T2: z = 9567 mm, p = 8.2 GeV/c, dP = -63.7 MeV

    Both sit at y = 4790 mm. All of these values are inside the new axis ranges.

  • 🟢 CI: FNALbuild's build and all mu2e/* validation contexts passed at this head.

Findings

  1. ⚪ [S3] CRVz (-10000 to 20000 mm) only covers the current Run-1a CRV. Positions are in the detector frame (KinKalGeomMaker.cc:272, toDetector). In crv_counters_v10.txt, CRV-T1 and CRV-R1 start at z = -2114 mm and CRV-U sits at z = -2400 mm in Mu2e coordinates. That is about -12.3 to -12.6 m in the detector frame, so these sectors would land entirely in underflow. A lower edge of about -14000 mm would cover them. The CRVMom bins are 500 MeV wide, and the two tracks above (5.5 and 8.2 GeV/c) use about one sixth of the axis. That is fine for a comparison, so this is only a note.

  2. ⚪ [S3] NCRVSB is always 0 with the current configuration.

    • Strongback crossings are added as material-plane crossings (KKExtrap.hh, addMaterialPlaneXing).
    • KKFit::sampleFit copies those into the KalSeed only when savematxings_ is set (KKFit.hh:899).
    • SaveMaterialXings defaults to false (Mu2eKinKal/fcl/prolog.fcl:42), and a code search of the Mu2e organization finds no fcl that sets it.

    Drop the histogram, or add a comment that it needs SaveMaterialXings : true.

  3. ⚪ [S3] ks.t0Val() is recomputed for every CRV intersection. It walks t0Segment again each time, but the local t0 set at ValKalSeed.cc:153-154 already holds the same value. Use inter.time() - t0.

Validation check

  • Build/tests run: FNALbuild build plus the ceSimReco, cosmicSimReco, cosmicOffSpill and other validation jobs, all green at this head. Locally, I ran the intersection printout above on the #580 output using an Offline build without this PR. That checks the input values, not the new code.
  • Not run: this PR's Validation module itself, and valCompare against a reference.
  • Config contract check: n/a. There are no new fcl parameters.
  • Cross-repo consistency: pass. Mu2e/Production#580 produces the input, and the two can merge in either order.

Residual risk

  • Low. The change adds histograms only, and the version bump tells valCompare that the histogram set changed.

Author follow-ups

  1. Optional: widen CRVz for the Run-2 CRV geometry (finding 1).
  2. Optional: drop NCRVSB, or note that it needs SaveMaterialXings (finding 2).

@oksuzian
oksuzian merged commit e6e99ea into Mu2e:main Oct 7, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants