Repository navigation
Schedule the track-CRV association (TrkCrvMatcher, TrkCrvMatchMCMaker) in the reco and recoMC paths - #595
Conversation
|
☔ The build tests failed for 56523f1.
N.B. These results were obtained from a build of this Pull Request at 56523f1 after being merged into the base branch at 94a4d81. For more information, please check the job page here. |
|
One configuration point from a static review of The six
Production's default geometry (
|
…line per-sector-type list
|
@FNALbuild run build test |
|
⌛ The following tests have been triggered for 7b06260: build (Build queue - API unavailable) |
|
Thanks @oksuzian , that's a good catch: in Fixed in 7b06260:
Checked with
The LoopHelix instances are time only and do not use Making the module refuse a geometry whose sector types the lists do not describe is a better long-term guard. That is Now that Offline#2106 is merged, this PR is ready for review. |
|
☀️ The build tests passed at 7b06260.
N.B. These results were obtained from a build of this Pull Request at 7b06260 after being merged into the base branch at bcfef27. For more information, please check the job page here. |
oksuzian
left a comment
There was a problem hiding this comment.
PR Review Summary — #595
Reviewed at head 7b062601b37975c63590120ae0b80d436a36fa31. First pass.
Decision
- 🟢 approve. The association runs in the reco and recoMC paths as described. It costs about 2% of the off-spill reco time and 0.4% of the output file, and it changes no other product. FNALbuild build 705 passed every test at this head. The
SigmaVpoint from my comment of Nov 9 is fixed. Two configurations do not get the association: Run 1B no-field reco (finding 1), and the nightly off-spill and reco validation outputs, which drop it (finding 2). Neither blocks.
Scope understood
- Six
TrkCrvMatcherinstances, one per KalSeed collection, run afterSelectReco:KKLineinNoFieldPath, the four LoopHelix fits inOnSpillPath, andKKCHmuplus the LoopHelix fits in both off-spill paths. The LoopHelix ones are time only. recoMC adds the sixTrkCrvMatchMCMakerinstances afterMCReco. The default outputs keepTrkCrvMatchsandTrkCrvMatchMCs.
Prior findings (my comment of 2026-11-09)
- 🟢 [was a comment] All six instances kept the extracted geometry's
SigmaVlist, so Run 1 reco took T1's and T2's V resolution from the EX entry. FIXED in7b06260, verified withfhicl-dump.TrkCrvMatchLineandTrkCrvMatchCHmuhaveSigmaV: [13]in reco and recoMCNoFieldandOffSpill(and their retrigger variants). BothExtractedconfigurations keep[7, 13, 7, 17].
Findings
- 🟡 [S2]
recoMC/NoFieldRun1B.fcldefines its ownphysics.RecoPathas an explicit module list, so it schedules neitherTrkCrvMatchLinenorTrkCrvMatchLineMC.- Evidence: at this head merged with
main,fhicl-dumpshows both modules configured (withSigmaV: [13]) but on no path. The list ends atCrvCoincidenceClusterMCAssns(NoFieldRun1B.fcl:104-132at this head,:111-139after mergingmain). Run 1B no-field reco, which hasKKLine,ProtonKKLineandCosmicKKLine, therefore writes no association. - Suggested fix: append
TrkCrvMatchLineandTrkCrvMatchLineMCto thatRecoPath, or say in the description that Run 1B no-field reco is left out.
- Evidence: at this head merged with
- 🟡 [S2] The nightly off-spill and reco validation outputs drop the new products, so the Offline#2107 histograms are never filled there.
- Evidence:
Validation/offSpill.fcl(included byValidation/nightly/offSpill_*.fcl) writesCentralHelixOutputwith"drop *_*_*_*"and an explicit keep list that has noTrkCrvMatchsorTrkCrvMatchMCs.Validation/reco.fclis the same. I ran the committedoffSpill.fclon 300 events and Offline#2107'sval.fclon the output: noTrkCrvdirectory. Of the validation outputs, onlyceSimReco(KKDeonly; the others are dropped by"drop *_*Ue*_*_*"and"drop *_*mu*_*_*") and the extractedKinematicLineOutputkeep them. The off-spill job is the one whose own comment says it validates the CentralHelix extrapolation to the CRV. - Suggested fix: add
"keep mu2e::TrkCrvMatchs_*_*_*"and"keep mu2e::TrkCrvMatchMCs_*_*_*"to theoffSpill.fcl(and, if wanted,reco.fcl) keep lists.
- Evidence:
- ⚪ [S3] On my off-spill sample the
DtRefCentervalues sit 2 to 10 ns above the own-cluster medians thatTrkCrvMatchMCMakerprints.- Median
dtRefof each track's own cluster, 9,314 events, validation setting:KKCHmu16.9 ns (3,217 clusters; production setting 16.7 ns),KKDe21.5,KKDmu21.7,KKUe24.9 andKKUmu23.8 ns (24 to 29 clusters each). This PR sets 27, 32, 30, 28 and 26 ns. DtRefCenteronly ranks the best time candidate, and on this sample the best time candidate ofKKCHmuis the track's own cluster for 3,208 of 3,229 tracks anyway. If your MDC2025au sample gives the PR's values, the difference is between samples; a line naming the sample and its statistics in the prolog comment would help the next tuning.
- Median
Checked, no action needed
- 🟢 Every reco, recoMC and validation configuration still configures:
fhicl-dumpgives the same 44 of 45 atmainand at this head (recoMC/MakeSurfaceStepsaborts at both). - 🟢 Nothing else changes. Off-spill reco,
mainagainst this head, on the same 3,000 events: the Offlineval.fclhistograms of every other product agree bin for bin (1,293 histograms). The one exception is theTriggerResultsindex histogram. - 🟢 Cost and size. TimeTracker, production off-spill setting: the matcher and truth modules together take 0.41 ms per event, 2.3% of the event time. On-spill
ceMixrecoMC: 0.5%.product_sizes_dumper: the new collections are 0.4% of the off-spill file and about 0.1% of theceMixfile. - 🟢 The products are usable downstream. The kept
KalSeeds_K*andSelectRecoclusters cover thePtrs. EventNtuple#441, readingTrkCrvMatchCHmu/MCfrom this output, fills its branches consistently for all 4,876 tracks, with true-crossing deposits (the recoMC instances see the digiCrvSteps).
Validation check
- Build/tests run: yes. A muse workspace on the CI build
ca7b6580_bcfef276_5999ffa2, with this head merged withmain5ae70c7f(clean) and Offline#2107, built with exit status 0. I ran off-spill recoMC on 9,314 events (validation setting) and 3,000 events (production setting) atmainand at this head, and on-spill recoMC on 42ceMixevents. All jobs exited with status 0. FNALbuild build 705 (merged onbcfef276) passed every test, includingceSimReco,cosmicSimRecoandcosmicOffSpill. - Config contract check: pass, apart from findings 1 and 2.
- Cross-repo consistency: needs Offline#2106 (merged). Offline#2107 and EventNtuple#441 do not need this PR, but #441's ntuple jobs recompute the association, which shadows these products once they are in the files; I raised that on #441.
Author follow-ups
- Schedule the association in
NoFieldRun1B.fcl, or note why not (finding 1). - Keep the new products in the nightly off-spill validation output (finding 2).
- Optional: the sample behind the
DtRefCentervalues (finding 3).
oksuzian
left a comment
There was a problem hiding this comment.
PR Review Summary — #595
Reviewed at head 34d293eb34a29b9fbd3ae5130e2411823133fb46. Re-review of 7b06260.
Decision
- 🟡 comment now, approve when green. The new commit fixes both of my findings and documents the sample behind the
DtRefCentervalues. FNALbuild has not built this head:mu2e/buildtestis pending and FNALbuild has posted nothing since the push (checked 21:20 UTC). Build 705 passed at7b062601, and this commit changes only fcl. I am triggering a build and will approve once it is green.
What changed since 7b06260
- One commit,
34d293e"Address review comments." (4 fcl files, +9 −2). Not a rebase.
Prior findings (from my review at 7b062601)
- 🟢 [was 🟡 S2]
recoMC/NoFieldRun1B.fcldid not schedule the association. FIXED, verified withfhicl-dump: itsRecoPath(29 modules) now runsTrkCrvMatchLineright afterSelectReco, andTrkCrvMatchLineMClast, aftercompressRecoMCsandCrvCoincidenceClusterMCAssns, whose products it reads. Both modules are configured as in the other recoMC jobs (SigmaV: [13];RequireCrvSteps: truewithcompressDigiMCssteps). - 🟢 [was 🟡 S2] The nightly validation outputs dropped the products. FIXED, verified with
fhicl-dump:Validation/offSpill.fcl'sCentralHelixOutputkeepsTrkCrvMatchs_*_*_*andTrkCrvMatchMCs_*_*_*.Validation/reco.fclkeepsTrkCrvMatchDeandTrkCrvMatchDeMC, the association ofKKDe, the one fit that output keeps. - 🟢 [was ⚪ S3] The
DtRefCentervalues had no stated sample. Addressed: the prolog comment now names the MDC2025au samples they come from and gives the nightly off-spill input's medians (KKCHmu24.6 ns, the LoopHelix fits 26.6 to 33.2 ns). My off-spill sample gave lower medians (KKCHmu16.9 ns), so the right centre depends on the sample; the comment now lets the next tuning start from numbers.DtRefCenteronly ranks the best time candidate.
Validation check
- Build/tests run:
fhicl-dumpofrecoMC/NoFieldRun1B.fcl,Validation/offSpill.fclandValidation/reco.fclat this head with Offlinemainca7b6580(exit status 0 for all three). No jobs were rerun: the commit changes only module lists, keep lists and a comment, and my runs at7b062601cover the matcher itself. - Config contract check: pass.
- Cross-repo consistency: pass. EventNtuple#441 now gives its ntuple-stage producers their own labels, so it no longer shadows these products.
Residual risk
- Run 1B no-field recoMC with the association was checked by
fhicl-dumponly, not run.
|
@FNALbuild run build test |
|
Found while testing an Offline follow-up: every reco (non-MC) job stopped on its first event with ProductNotFound for SelectReco:CrvCoincidenceClusterFinder. Reco’s SelectReco writes the CRV clusters with no instance name; only SelectRecoMC uses that instance. Fixed in cb49c71: the reco matchers read SelectReco, and recoMC sets them back to SelectReco:CrvCoincidenceClusterFinder. reco/OffSpill, reco/NoField and reco/Extracted now run and write TrkCrvMatchs. The recoMC configurations dump identically to before, and five recoMC jobs give bit-identical association products. |
oksuzian
left a comment
There was a problem hiding this comment.
PR Review Summary — #595
Reviewed at head cb49c71afdcb80633f7461eec28ea51eccbb56f1. Re-review of 34d293e.
Decision
- 🟡 comment now, approve when green. The new commit fixes a real failure that my approval of
34d293ebmissed: every non-MC reco job stopped on its first event. The fix is right, and it changes nothing in the MC reco jobs. FNALbuild has not built this head (mu2e/buildtest"not triggered yet", checked 15:20 UTC), so I am requesting a build and will approve once it is green.
What changed since 34d293e
- One commit,
cb49c71"Fix ProductNotFound for SelectReco:CrvCoincidenceClusterFinder" (JobConfig/reco/prolog.fcl+8 −6,JobConfig/recoMC/prolog.fcl+7). Not a rebase.
The fix, checked
- 🟢 The diagnosis is right.
- The data-flavour
SelectRecowrites its CRV clusters with no instance name (Offline/CommonReco/src/SelectReco_module.cc:131,produces<CrvCoincidenceClusterCollection>()). SelectRecoMCwrites one collection per input label (Offline/CommonMC/src/SelectRecoMC_module.cc:179), which here isCrvCoincidenceClusterFinder.- So
SelectReco:CrvCoincidenceClusterFinderexists only in MC reco.
- The data-flavour
- 🟢
fhicl-dumpat this head against34d293eb:- In
reco/OnSpill.fcl,OffSpill.fcl,NoField.fclandExtracted.fcl, the six matchers (TrkCrvMatchLine,CHmu,De,Ue,Dmu,Umu) now readCrvCoincidenceClusterCollection : "SelectReco". Nothing else changes. recoMC/OnSpill.fcl,OffSpill.fcl,NoField.fcl,NoFieldRun1B.fclandExtracted.fcldump identically to34d293eb.
- In
Prior findings
- All findings from my earlier reviews were already fixed or addressed at
34d293eb, and this commit does not touch them.
Findings
- ⚪ [S3] Nothing in CI runs a non-MC reco job, which is why this got past FNALbuild and my reviews.
- FNALbuild build 706 passed at
34d293eb, but its reco jobs (ceSimReco,cosmicSimReco,cosmicOffSpill) and the nightlyValidation/reco.fclandoffSpill.fclare all built onrecoMC. Myfhicl-dumpchecks could not see a missing product. - A short
reco/OnSpill.fclorreco/OffSpill.fcljob in CI or in the nightly validation would catch the next one. Optional, and not for this PR.
- FNALbuild build 706 passed at
Validation check
- Build/tests run:
fhicl-dumpof ninerecoandrecoMCjob files at34d293eband at this head, in a muse workdir on the CI buildmain/7fb240fc_ec057b9e_7b20730e; all exited 0. No jobs were run. Your report thatreco/OffSpill,NoFieldandExtractednow run and writeTrkCrvMatchs, and that fiverecoMCjobs give bit-identical association products, is not re-checked here. - Config contract check: pass.
- Cross-repo consistency: pass. The branch is 9 commits behind
main(including Production#600) and merges cleanly.
Residual risk
- Not run by me: a non-MC reco job at this head.
|
@FNALbuild run build test |
|
⌛ The following tests have been triggered for cb49c71: build (Build queue - API unavailable) |
|
☀️ The build tests passed at cb49c71.
N.B. These results were obtained from a build of this Pull Request at cb49c71 after being merged into the base branch at 3d99c5b. For more information, please check the job page here. |
oksuzian
left a comment
There was a problem hiding this comment.
PR Review Summary — #595
Reviewed at head cb49c71afdcb80633f7461eec28ea51eccbb56f1. Follow-up to my comment review at the same head.
Decision
- 🟢 approve. FNALbuild build 709 built this head, merged on
main3d99c5b9, and every test passed: the prof build, all eleven validation jobs,rootOverlapsandg4surfaceCheck. The FIXME/TODO and clang-tidy rows show nothing. This is the approval my comment review promised once the build was green. Those jobs are all built onrecoMC, so the non-MC reco fix itself still rests on thefhicl-dumpcheck and your runs. The optional CI note stays open and does not block.
brownd1978
left a comment
There was a problem hiding this comment.
My only question is whether we want Crv association with loop helices.
LoopHelix tracks do not intersect the CRV. Keep KKLine and KKCHmu matchers (and their MC makers) only; remove OnSpill TrkCrvMatch sequences and Validation/reco.fcl keeps for TrkCrvMatchDe.
|
I agree that there is use case for LoopHelix tracks. Dropped TrkCrvMatchDe/Ue/Dmu/Umu (and their MC makers) in 1660c8c; only TrkCrvMatchLine and TrkCrvMatchCHmu remain. |
|
@FNALbuild run build test |
oksuzian
left a comment
There was a problem hiding this comment.
PR Review Summary — #595
Reviewed at head 1660c8c0a944cc9ba40f21449a636b65942220bc. Re-review of cb49c71.
Decision
- 🟡 comment now, approve when green. Thanks, Rob. Dropping the four LoopHelix matchers is clean: in every reco and recoMC job, the only change is that those modules and their truth makers are gone. The two follow-ups below are in the PR description and in EventNtuple, not in this PR's files. FNALbuild has not built this head yet: your 14:45 UTC request had no reply from the bot at 15:00 UTC, and
jenkins/ghprbis still pending. I will approve once it is green.
What changed since cb49c71
- One commit,
1660c8c"Drop LoopHelix TrkCrvMatch instances (agree with brownd1978)":JobConfig/reco/prolog.fcl+7 −14,JobConfig/recoMC/prolog.fcl+2 −12,Validation/reco.fcl−2. Not a rebase.
The change, checked
- 🟢
fhicl-dumpof nine job files (reco/OnSpill,OffSpill,NoField,Extracted;recoMC/OnSpill,OffSpill,NoField,NoFieldRun1B,Extracted) and ofValidation/reco.fclandValidation/offSpill.fcl, at cb49c71 and at this head. All exit 0. With theTrkCrvMatchDe/Ue/Dmu/Umutables and their...MCmakers taken out of the old dumps, the only remaining differences are those labels leaving the paths, and the twokeeplines leavingValidation/reco.fcl.TrkCrvMatchLineandTrkCrvMatchCHmuare unchanged. - 🟢 Nothing left in Production names the removed labels, or the removed
TrkCrvMatchLHandTrkCrvMatchMCLHsequences (git grepat this head).
Prior findings
- All earlier findings were fixed or answered by cb49c71, and this commit does not touch them.
Findings
- 🟡 [S2] EventNtuple still points users to the reco labels this commit removes. On EventNtuple
main(a8e216fb), from your EventNtuple#441,fcl/prolog.fcl:237-238definesTrkCrvMatchRecoTagsAll : [ "TrkCrvMatchDe", "TrkCrvMatchUe", "TrkCrvMatchDmu", "TrkCrvMatchUmu" ]and the matchingTrkCrvMatchRecoMCTagsAll.doc/branches.md:70andhelper/ntuplehelper.py:203tell users to set these tags "for the LoopHelix fits" on reco files from Production's reco paths. No EventNtuple job uses the two lists today, so nothing breaks at merge, but a user who follows the doc will ask for products that no reco file made after this PR holds. A small EventNtuple PR could drop the two lists and that part of the doc text. By Dave's argument, the ntuple-job LoopHelix matchers (TrkCrvMatchAllPath, used byfrom_mcs-mockdata_trkcrv.fcl) may be worth dropping too; that is your call. - ⚪ [S3] The PR description still describes the four LoopHelix matchers: its lines 13, 16, 25-26 and 44 list
TrkCrvMatchDetoTrkCrvMatchUmu, theirDtRefCentervalues, "OnSpillPath(the four LoopHelix fits)" and the recoMC test of "the four LoopHelix matchers". Please update it before merge, since it becomes the record of what was merged.
Validation check
- Build/tests run:
fhicl-dumpas above, in a muse workdir with Production at each head, backed by SimJob MDC2025be (Offline v13_47_01). No jobs were run. The two matchers that stay have three input tags each in the dumps (their KalSeeds,SelectRecoCRV clusters,CrvRecoPulses), none made by the removed modules. - Config contract check: pass.
- Cross-repo consistency: needs follow-up in EventNtuple (finding 1). The branch is 33 commits behind
mainand merges cleanly.
Residual risk
- Unchanged: no non-MC reco job has been run in CI.
Author follow-ups
- The EventNtuple follow-up in finding 1.
- Update the PR description.
|
@FNALbuild run build test |
|
⌛ The following tests have been triggered for 1660c8c: build (already triggered: build) (Build queue - API unavailable) |
|
☀️ The build tests passed at 1660c8c.
N.B. These results were obtained from a build of this Pull Request at 1660c8c after being merged into the base branch at f162444. For more information, please check the job page here. |
With DoGeometric true, TrkCrvMatchTool::beginRun checks SigmaV, SigmaU and SigmaT against the sector types of the loaded CosmicRayShield: one entry for all types, or one per sector type 1 to N; otherwise a CONFIG exception names the list and the geometry's sector types. Follow-up to Mu2e/Production#595.
oksuzian
left a comment
There was a problem hiding this comment.
PR Review Summary — #595
Reviewed at head 1660c8c0a944cc9ba40f21449a636b65942220bc. Follow-up to my comment review at the same head.
Decision
- 🟢 approve. FNALbuild has now built this head, merged on
mainf1624445: the prof build, all eleven validation jobs,rootOverlaps,g4surfaceCheck, the TODO/FIXME check and clang-tidy (0 errors, 0 warnings) passed. This is the approval my comment review promised once the build was green. - The two follow-ups from that review do not gate: the EventNtuple tag lists, and the PR description that still lists the four LoopHelix matchers.
|
@oksuzian @brownd1978 LoopHelix CRV matchers are dropped ( |
brownd1978
left a comment
There was a problem hiding this comment.
Thanks for the updates!
Summary
This PR runs the Offline track-CRV association (Mu2e/Offline#2106) in the standard reconstruction, so that
production reco output carries one
TrkCrvMatchcollection per KalSeed collection, and recoMC output also itsTrkCrvMatchMCtruth. Analyses, the EventNtuple (Mu2e/EventNtuple#441) and the nightly validation(
ValTrkCrvMatch, Mu2e/Offline#2107) then read the association instead of building it themselves.Changes
JobConfig/reco/prolog.fcl:TrkCrvMatcherinstance per KalSeed collection, from the Offline prolog table:TrkCrvMatchLine(KKLine) andTrkCrvMatchCHmu(KKCHmu): time and geometric matching, layer probe on;TrkCrvMatchDe,TrkCrvMatchUe,TrkCrvMatchDmu,TrkCrvMatchUmu: time only, since LoopHelix fits do notreach the CRV;
DtRefCenterper instance, the mediandtRefof each track's own cluster in MC truth for that fit (Offline#2106):KKCHmu 27 ns, KKDe 32, KKUe 28, KKDmu 30, KKUmu 26 (MDC2025au CosmicSignalOffSpill CH and LH reco); KKLine uses
the Offline default, 13 ns;
SigmaV : [ 13 ](mm) onTrkCrvMatchLineandTrkCrvMatchCHmu: the OfflineSigmaVlist is per CRV sector typeof the extracted geometry (EX, T1, T2, muon taggers = types 1-4), while in the Run1 geometries (
geom_common.txt,Run1B) T1 and T2 are both type 1 and would take the EX value, 7 mm. One provisional value for type 1, the
extracted T1 value, until a Run1 tuning; it changes only the pulls and the best-candidate flags of the geometric
candidates, not which candidates are kept;
SelectReco, on its selected clusters, while the fullCrvRecoPulsesare still in the event forthe layer probe;
NoFieldPath(line),OnSpillPath(the four LoopHelix fits),CentralHelixPathandLoopHelixPath(central helix and the four LoopHelix fits);keep mu2e::TrkCrvMatchs_*_*_*in the high-level reco products.JobConfig/reco/Extracted.fcl,JobConfig/recoMC/Extracted.fcl:TrkCrvMatchLine.SigmaVback to the Offlineper-sector-type list (
@local::TrkCrvMatcher.SigmaV), since these jobs use the extracted geometry.JobConfig/recoMC/prolog.fcl:TrkCrvMatchMCMakerper matcher (TrkCrvMatch<fit>MC), after the MC reco sequence, since it needscompressRecoMCsandCrvCoincidenceClusterMCAssns;keep mu2e::TrkCrvMatchMCs_*_*_*.No other module, filter or output selection changes.
Tests
On a build of Offline with the association PR:
recoMC/Extracted.fclfrom MDC2025bb digis (extracted v06 geometry), 300 events: the line matcher and itstruth run in
NoFieldPath, and both products are in the output.recoMC/OnSpill.fclfrom MDC2025au FlatGammaMix1BB digis, 200 events: the four LoopHelix matchers and theirtruth run in
OnSpillPath, both products are in the output, and every track of every collection has truth(52, 51, 44 and 46 tracks).
fhicl-dumpwith and without the SigmaV change):TrkCrvMatchLinekeeps[7, 13, 7, 17]inreco/Extracted,recoMC/ExtractedandrecoMC/ExtractedAllEvents, where nothing else thatruns changes;
TrkCrvMatchLineandTrkCrvMatchCHmuget[13]inrecoandrecoMCNoField,NoFieldRun1B,OffSpillandOnSpill.for the whole job.
Notes
TrkCrvMatchMCMakerprints its end-of-job summary, so a recoMC job prints one perinstance. Set
PrintSummary : falsein the recoMC prolog if that is too verbose for production logs.TrkCrvMatchs, whosePtrs would dangle.🤖 Generated with Claude Code