Skip to content

Update to using KPP_reco conditions and commissioning geometry - #27

Merged
oksuzian merged 2 commits into
Mu2e:mainfrom
bonventre:main
Oct 30, 2026
Merged

oksuzian merged 2 commits into
Mu2e:mainfrom
bonventre:main

Conversation

@bonventre

Copy link
Copy Markdown
Contributor
  • Turns on KPP_reco purpose
  • Switches to commissioning geometry
  • Turns on calocluster in KKLine
  • Updates tracker calibrations for newest combined runs

@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 — #27

Reviewed at head 3dd061d2af693db7d8fdd97bd1f618f17b870fc8. First pass.

Decision

  • 🟢 approve. On run 125472 this is a clear improvement. The tracker reconstruction goes from no tracks at all on main to 51 KKLine fits in 200 events, and the calorimeter is attached when a cluster is in time. Please look at finding 1 before running pass 1 widely. Combined_Pass1 stops on run 125470, one of the newest combined runs, because CalTimeCalib covers only run 125472. The configs also no longer run on the older combined runs. Both are database coverage, not code.

Scope understood

  • Combined_Pass1.fcl and Tracker/TrkRecoFromDigi.fcl (and through it TrkRecoFromFragments, TrkSHDFromDigi and TrkSHDFromFragments) switch from CRV_COMMISSIONING v1_0 and TRACKER_VST v2_0 plus text-file tables to the KPP_reco purpose, latest version, with no text files.
  • Combined_Pass1.fcl also moves to geom_common_commissioning_v02.txt, turns on the calorimeter in KKLine and LineFinder, and reads eventTiming from the database. TrkReco_epilog.fcl deweights and widens the calo matching. makeSD switches to byMnid. trackercalibrations.fcl gets new straw-response values.
  • No production campaign uses a PassN config, so this affects hand-run pass-1 processing only.

Findings

  1. 🟡 [S2] Combined_Pass1 stops on run 125470, and both configs stop on the combined runs before it.
    • KPP_reco v1_2 has IOVs for 125470-125483, except CalTimeCalib, which covers run 125472 only. nearestMatch falls back only to an earlier IOV (Offline DbTables/src/DbSet.cc:30-46), and TrkRecoFromDigi.fcl does not set it.
    • Demonstration, with the nightly Offline build and raw files read in place:
      • Run 125470 (raw.mu2e.cosmics.kpp.125470_000001-001.art, one of 27 files of that run): Combined_Pass1 stops on the first event with DBENGINE_UPDATE_FAILED for tid 30 (CalTimeCalib), run 125470:1.
      • Run 125438 (_000001): on main, Combined_Pass1 and the tracker job both run. At this head both stop on the first event with DBENGINE_UPDATE_FAILED: Combined_Pass1 on tid 25 (CRVTime), the tracker job on tid 32 (TrkPanelMap).
    • The kpp raw dataset has 125470 and four earlier combined runs (125402, 125404, 125406, 125438) that these configs cannot process now. The failure is loud, which is right.
    • Suggested fix: extend the CalTimeCalib IOV to 125470-125483 like the other tables, and add IOVs for the earlier runs if they still need pass 1.
    • The tracker-only configs have no nearestMatch, so a run after 125483 will also stop there, while Combined_Pass1 reuses the 125470-125483 constants. If that difference is intended, a comment would say so.
  2. 🟡 [S2] version : "" means "latest", and nothing records which version was used.
    • "" parses to -1 for major, minor and extension (Offline DbTables/inc/DbVersion.hh:21-40), which is the same as the default v*_*_*. So the same job gives different results once v1_3 is committed.
    • With the default verbose : 0, DbService prints nothing about the version it resolved. The only related log line is the nearestMatch warning.
    • Suggestion: pin v1_2 and bump it with each new set, or log the resolved version.
  3. ⚪ [S3] The tracker-only configs keep the extracted geometry while Combined_Pass1 moves to the commissioning one.
    • geom_common_commissioning_v02.txt puts the tracker at tracker.z0 = 22935 against 24171 in geom_common_extracted_v04.txt, and the calorimeter front at 25598 against 25843.
    • On run 125472, the KKLine fits from Combined_Pass1 and from the tracker job have identical parameters, but different numbers of segments and intersections. Both use the same KPP_reco alignment.
    • If tracker-only outputs are compared with combined ones, the geometry should probably match. Is the difference intended?
  4. ⚪ [S3] Small points.
    • LineFinder.AddCaloClusters : true only stores a cluster Ptr in the CosmicTrackSeed (CosmicReco/src/LineFinder_module.cc:372-397). Nothing reads it: KinematicLineFit has that use commented out (Mu2eKinKal/src/KinematicLineFit_module.cc:291). KKLine adds the calorimeter through UseCaloCluster in its extension instead.
    • Tracker/trackercalibrations.txt is no longer read by any config. It could go.
    • Combined_Pass1.fcl:89 leaves a commented-out textFile line, and :90 has a typo, "calibraitons".
    • The new values in trackercalibrations.fcl have no comment saying which runs and which procedure they come from.

Checked, no action needed

  • 🟢 KPP_reco v1_2 has every table the dropped text files provided: the 11 tracker tables in trackercalibrations.txt, TrkPanelMap, CalEnergyCalib, CalTimeCalib, the three CRV tables and DAQTiming.
  • 🟢 The byMnid change fixes the missing straw digis. On main, with byLink, 200 events of run 125472 give no line seeds and no fits. With only byMnid changed they give 67 seeds and 40 fits, and at this head 74 seeds and 51 fits. The share of fits with consistency above 0.01 goes from 17% to 41%.
  • 🟢 The calorimeter in KKLine works. On 3000 events of run 125472, 7 of 879 fits have a calo cluster attached. Only 28 events had both a track and a cluster, and 10 of their tracks had a cluster within 15.4 ns. CaloClusterMaker runs before LineFinder on RecoPath, and LineFinder throws if the collection is missing.
  • 🟢 Resolved configs: fhicl-dump of all six affected configs at main and at this head. Only the intended keys change. In TrkRecoFromDigiMC.fcl the calo settings change too, but UseCaloCluster stays false there.
  • 🟢 The PR merges cleanly onto current main (#25 and #26 touch none of these files).

Validation check

  • Environment: the nightly Offline build (museCIBuild/main/78517a34_5e3c66c6_a664b74b, p109), with PassN main (62ab2df7) or this head. Inputs were raw.mu2e.cosmics.kpp.125472_000077-001.art and raw.mu2e.cosmics.kpp.125438_000001-001.art, read in place from dCache, 200 events per job unless noted.
  • Database reads used dbTool, read only.
  • Not checked: the CRV, STM and Calo pass-1 configs, which this PR does not touch, and whether the new straw-response values are better than the old ones beyond the fit counts above.

@oksuzian

Copy link
Copy Markdown
Contributor

Follow-up to the review above, after Mu2e/Offline#2082 merged today:

  1. geom_common_commissioning_v02.txt was renamed to geom_common_extracted_v06.txt in Extracted geometry: commissioning v01/v02 become extracted v05/v06, default v06 Offline#2082 (merged 2026-10-29 as a9ddd0638), with the same content. Combined_Pass1 will fail to start on any build after that commit. It still runs on run 125472 with the older nightly build, which has the old file. Suggested fix: services.GeometryService.inputFile : "Offline/Mu2eG4/geom/geom_common_extracted_v06.txt".
  2. One more case for finding 1: Tracker/TrkRecoFromDigi.fcl also stops on the tracker-only VST runs. Run 124155 (raw.mu2e.trk.vst.124155_000003.art) stops on the first event with DbEngine::update failed to find tid 32 for run:subrun 124155:3. On main (TRACKER_VST v2_0) the same file runs. Keeping TRACKER_VST in the tracker-only configs, or adding KPP_reco IOVs for those runs, would fix it.

Otherwise Combined_Pass1 runs on 125472 and the calo clusters now attach. Thanks!

Offline#2082 renamed geom_common_commissioning_v02.txt to
geom_common_extracted_v06.txt with the same content, so the old name fails
on Offline builds from a9ddd0638 on ("Can't find file"). Checked on the CI
build of Offline 807d948f: 100 events of run 125472 run with the new name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014osFTVFtXjUZ6SdxpwLCHo
@oksuzian
oksuzian requested a review from rlcee October 30, 2026 11:49

@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 — #27

Reviewed at head df8ea035814f10f48504a3519ee73631be1290df. Re-review of 3dd061d.

Decision

  • 🟢 approve. The new commit fixes the geometry file name that Mu2e/Offline#2082 changed, and Combined_Pass1 runs again on current Offline builds with results identical to the first pass. The database coverage points from my first review are still open, and they are database work, not code in this PR.

Scope understood

  • The increment is one new commit on top of 3dd061d (not a rebase). It changes two lines in Combined_Pass1.fcl: the geometry is now geom_common_extracted_v06.txt, the new name of geom_common_commissioning_v02.txt.

Prior findings

  • 🟢 [was the follow-up comment, point 1] The geometry file name. FIXED in df8ea03, verified.
    • Offline#2082 (a9ddd0638) renamed the file. The only content change besides comments is that it now includes geom_common_extracted_v04.txt directly instead of through geom_common_extracted.txt, which included v04 at the time. So the geometry is the same.
    • fhicl-dump of Combined_Pass1.fcl at this head differs from the 3dd061d dump only in GeometryService.inputFile. The five tracker configs resolve identically.
    • With the Offline CI build 807d948f (which no longer has the old file), 200 events of run 125472 (raw.mu2e.cosmics.kpp.125472_000077-001.art) run to exit 0 and open geom_common_extracted_v06.txt. They give 74 line seeds and 51 KKLine fits, as in the first pass. The printed seeds and fits are identical to the first-pass job, apart from timing and file paths.
  • 🟡 [S2] Combined_Pass1 stops on run 125470 and on the combined runs before it. Carried over, still open. KPP_reco is still at v1_2. dbTool print-run for v1_2 today still gives CalTimeCalib only for run 125472, with no IOV for 125470 or 125483, and no IOV for any table on run 125438. The suggested fix is unchanged: extend the CalTimeCalib IOV to 125470-125483, and add IOVs for earlier runs if they still need pass 1.
  • 🟡 [S2] The tracker-only configs stop on the tracker VST runs (from my follow-up comment). Carried over, still open. Run 124155 still has no KPP_reco v1_2 IOV for any table, including TrkPanelMap. The fix is either to keep TRACKER_VST in the tracker-only configs or to add KPP_reco IOVs for those runs.
  • 🟡 [S2] version : "" means "latest", and nothing records which version was used. Carried over, still open (Combined_Pass1.fcl:88, Tracker/TrkRecoFromDigi.fcl:21). It changes nothing today, since v1_2 is still the newest version.
  • 🟢 [was S3] The tracker-only configs used a different geometry from Combined_Pass1. This is now resolved, by Offline#2082 rather than by this PR. geom_common_extracted.txt, which the tracker configs load, now includes geom_common_extracted_v06.txt, so both sets of configs use the same tracker and calorimeter positions. One difference remains: Combined_Pass1 names v06 directly, while the tracker configs follow the default. They will diverge again if the default moves to a newer file. If that is not intended, both could name the same file.
  • ⚪ [S3] Small points. Carried over; the new commit does not touch these lines. The commented-out textFile line (Combined_Pass1.fcl:89), the typo "calibraitons" (:90), the unused Tracker/trackercalibrations.txt, and the missing source comment for the new straw-response values in trackercalibrations.fcl.

Validation check

  • Environment: the Offline CI build 807d948f_94a4d81f_2b90c646 (p109), PassN at this head, input read in place from dCache. Database reads used dbTool, read only. PassN main is still 62ab2df7, so the base has not moved since the first pass.
  • No production campaign uses a PassN config, so this affects hand-run pass-1 processing only.
  • Not run: the tracker-only jobs and the VST and older combined runs at this head. Their configs resolve identically to the first pass, and the database is unchanged, so the first-pass results still apply.

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