Repository navigation
Combined Pass1: iterative line finding and time cluster / line seed ntuple branches - #28
Open
michaelmackenzie wants to merge 2 commits into
Open
michaelmackenzie wants to merge 2 commits into
michaelmackenzie wants to merge 2 commits into
Conversation
…tuple branches Reco (Combined_Pass1.fcl): LineFinder finds up to 3 lines per time cluster (MaxLines, MaxWireDistPull 3, SkipFlatLines; Offline#2077) on all SimpleTimeCluster clusters instead of the CosmicShowerFilter output, which rejects nearly every cluster with two tracks. Keep the makeSH combo hits, both time cluster collections and the line seeds in the art output. Ntuple (from_mcs-combined.fcl): fill the time clusters (with hits), the shower-filtered time clusters and the line seeds (with hits), fill the EvB trigger info, and use the same geometry as the reconstruction. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
oksuzian
approved these changes
Oct 30, 2026
oksuzian
left a comment
Contributor
There was a problem hiding this comment.
PR Review Summary — #28
Reviewed at head d25b9d4ecaa504256ed9b7b1428b75908f54b8cd. First pass.
Decision
- 🟢 approve. Both configurations resolve to exactly the intended changes, and I reproduced the author's test on the same 2000 events with identical counts. The combined pass 1 finds clearly more lines and fits than
main. The points below concern how the time-cluster switch is described and what it costs; none of them blocks.
Scope understood
Combined_Pass1.fcl:LineFindergetsMaxLines : 3,MaxWireDistPull : 3andSkipFlatLines : true(Mu2e/Offline#2077), and searches theSimpleTimeClusterclusters instead of theCosmicShowerFilterones. The art output also keeps themakeSHhits, both time-cluster collections and the line seeds.from_mcs-combined.fcl: adds thetimeclusters,showerfilteredtimeclustersandlineseedsbranches with their hit branches, fills trigger information from the event-builder processes, and uses the same geometry as the reconstruction.
Findings
-
🟡 [S2] Searching
SimpleTimeClustermostly adds single-track clusters, which the description and the comment do not say- Evidence: I added a second
LineFinderwith the same settings, run on theCosmicShowerFilterclusters, to the PR's job on the same 2000 events. I assigned each line seed to the time cluster nearest in time.SimpleTimeClustermakes 1399 clusters andCosmicShowerFilterkeeps 793.- Of the 154 clusters in which
LineFinderfinds two or more lines, the filter rejects 115 (75%). This is the case the comment describes. - Of the 1193 clusters with exactly one line, the filter rejects 468 (39%). So 468 of the 583 clusters that this PR newly searches have a single line.
- With the same settings,
LineFindergives 803 seeds on the filtered clusters and 1533 onSimpleTimeCluster.
- The filter's rule explains this. It calls a cluster a shower as soon as hits in one panel change layer twice (
CosmicShowerFilter_module.cc:159-165at Offline807d948f). A single track that crosses three or more straws of a panel, as a cosmic running nearly parallel to a plane does, triggers that rule too. - The comment says the filter "rejects nearly every cluster with two tracks". That is true, but the bigger effect of the switch is that pass 1 now also fits single-track clusters the filter called showers. The good fits that this adds have fewer active hits: a median of 10, against 13 over all good fits.
- Suggested fix: if that is intended, say so in the comment at
Combined_Pass1.fcl:76-77and in the description. If not, keep the filter and look at its panel rule for cosmics instead.
- Evidence: I added a second
-
⚪ [S3] The pass-1 art output is four times larger, mostly because of the
makeSHhits- Evidence: for these 2000 events,
out.artgrows from 13.5 MB onmainto 54.3 MB.product_sizes_dumperattributes 33.8 MB (62% of the file) toComboHitCollection_makeSH, which only thetimeclustershitsbranch needs. TheKalSeeds_KKLineproduct grows from 7.3 MB to 12.3 MB, because there are more fits. CPU for the job goes from 40 s to 76 s. - Suggested fix: keep
makeSHonly if the time-cluster hit branch is needed routinely. Otherwise drop it and thetimeclustershitsbranch, sincelineseedshitsalready comes from the seeds' own hits.
- Evidence: for these 2000 events,
-
⚪ [S3] The combined and the tracker-only pass 1 now find lines differently
- The four
LineFindersettings are inCombined_Pass1.fcl.Tracker/TrkRecoFromDigi.fclandTrkRecoFromDigiMC.fclkeepCosmicShowerFilteras the input (Tracker/TrkReco_epilog.fcl:21) and one line per cluster. If both should behave the same, the settings belong inTrkReco_epilog.fcl. If the difference is intended, a one-line comment saying so would help.
- The four
Checked, no action needed
- 🟢 Base and merge. The branch is based on PassN
main64bd40f, the merge of #27, and merges cleanly. The geometry it adds tofrom_mcs-combined.fcl,Offline/Mu2eG4/geom/geom_common_extracted_v06.txt, is the one #27 put inCombined_Pass1.fcl. - 🟢 Offline keys. Mu2e/Offline#2077 was merged on 2026-10-29 and is in
v13_42_00and inmain807d948f. There,MaxLinesisunsigned,MaxWireDistPullisfloatandSkipFlatLinesisbool(CosmicReco/src/LineFinder_module.cc:74-76). An older Offline rejects the keys at validation. - 🟢 Resolved configuration.
fhicl-dumpof both files at this head againstmain, with the CI build807d948f, differs only in the intended lines: the four output commands, the three newLineFinderkeys and itsTimeClusterCollection, and in the ntuple the trigger settings, the time-cluster and line-seed tables, and the geometry. - 🟢 The transverse-step loop is not used. The resolved
LineFinderhasNTSteps : 0, so the loop I noted on Offline#2077 does not run.MaxLines : 3calls the search up to three times per cluster, but each call skips that loop. - 🟢 Time-cluster hits.
SimpleTimeClusterandCosmicShowerFilterboth indexmakeSH(the filter'sComboHitCollectionis set tomakeSHatTracker/TrkReco_epilog.fcl:11). So onecomboHitTags : [ "makeSH" ]is right for both collections. In the ntuple, the 26,134timeclustershitsentries equal the sum oftimeclusters.nhits. - 🟢 EventNtuple. The
timeclustersandlineseedstables are in EventNtuplemain, and in every tag sincev06_12_00andv06_14_00. Their hit branches (fillHitsFor,comboHitTags) arrived inv06_14_03, so the ntuple job needs that tag or later. - 🟢 Trigger information. The input file has 31 event-builder processes (
EvB0Calo01,EvB0Trk01-18,EvBCalo02-12andEvBCrv01). All of them have the same six trigger paths in the same order, so matching on "EvB" gives consistenttrig_*branches.trig_calo_laserfires in 72 of 2000 events, as the description says. - 🟢 The author's test, rerun. Run 125472, subrun 77, first 2000 events, Offline CI build
807d948fwith EventNtuplemaind05f8a2. Both stages finish with exit code 0. I get 1399 time clusters, 1533 line seeds, 198 events with more than one seed and 873 events with a track, as in the description. - 🟢 Against PassN
mainon the same events:- Seeds go from 769 to 1533,
KKLinefits from 574 to 943, events with a fit from 559 to 873, and fits with fit consistency above 0.01 from 279 to 393. 115 events gain a good fit. - 10 events lose their only fit, 3 of them a fit with consistency above 0.01, and one more event loses its only good fit. Those 4 good fits had only 2 to 8 active hits. In three, the seed comes back with one hit fewer, which is what the along-wire cut does. Twice that is the same line, which
KKLinethen does not fit, and once the line shifts slightly and fits with consistency 0. In the fourth, an 8-hit seed is not found at all. One hit removed would put it below the 8-hit minimum, but I did not confirm that this is the cause.
- Seeds go from 769 to 1533,
- 🟢 No production use. No prodtools campaign configuration uses a PassN file, so this affects only hand-run pass-1 processing.
Validation check
- Ran:
fhicl-dumpof both changed files atmainand at this head;Combined_Pass1.fcland thenfrom_mcs-combined.fclon 2000 events, formainand for this head; the second-LineFinderjob described in finding 1; andproduct_sizes_dumperon both outputs. - Not run: the tracker-only configurations, other runs or subruns, and any comparison with MC truth.
Author follow-ups
- State in the comment and the description that the
SimpleTimeClusterswitch also admits single-track clusters the shower filter rejects (finding 1). - Optional: decide whether pass 1 needs to keep all
makeSHhits (finding 2). - Optional: align the tracker-only configurations, or say why they differ (finding 3).
The makeSH combo hits were ~60% of the pass 1 art output and were only needed for the timeclustershits branch. Line seeds keep their own hits. Also note in the comment that searching all SimpleTimeCluster clusters adds mostly single-track clusters that the shower filter rejects. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
Thanks for the review. Addressed in e90d594:
|
oksuzian
approved these changes
Oct 30, 2026
oksuzian
left a comment
Contributor
There was a problem hiding this comment.
PR Review Summary — #28
Reviewed at head e90d5941d970a930a9c63226fac407e9596387ee. Re-review of d25b9d4.
Decision
- 🟢 approve. The new commit addresses all three points from my first review. I reran the same 2000 events at this head: the line seeds and fits are identical to the previous head, and the pass-1 output is now 20.5 MB instead of 54.3 MB.
Scope understood
- One new commit on top of d25b9d4. It stops keeping the
makeSHcombo hits in the pass-1 output and drops thetimeclustershitsntuple branch that needed them. It also expands the comment on theSimpleTimeClusterswitch, and the description now covers the single-track clusters and the tracker-only configurations.
Prior findings
- 🟢 [was 🟡 S2] Searching
SimpleTimeClustermostly adds single-track clusters. FIXED in e90d594, verified. The comment atCombined_Pass1.fcl:75-78now says that the shower filter also rejects single tracks crossing three or more straws of a panel, and that most of the added clusters have one line. The description says this is intended and gives the counts. - 🟢 [was ⚪ S3] The output is four times larger because of the
makeSHhits. FIXED in e90d594, verified. Thekeepline is gone, andtimeclustersno longer setscomboHitTagsorfillHitsFor(the resolved ntuple config has both empty). On the same 2000 events of run 125472, subrun 77,out.artis 20,502,219 bytes. It was 54,253,680 at d25b9d4 and is 13,461,482 onmain. - 🟢 [was ⚪ S3] The combined and tracker-only pass 1 find lines differently. Resolved: the description now states that the tracker-only configurations are deliberately left to the tracker experts.
Checked, no action needed
- 🟢 Resolved configs.
fhicl-dumpofCombined_Pass1.fclat this head differs from d25b9d4 only by the removedmakeSHkeep line.from_mcs-combined.fcldiffers only in the two emptiedtimeclusterskeys. Againstmain, both still differ only in the intended lines. - 🟢 Same reconstruction. Both stages exit 0 with no exceptions, on the Offline CI build
807d948fwith EventNtuplemaind05f8a2. The seed and fit printouts match d25b9d4 exactly: 1533 seeds, 943KKLinefits, 873 events with a fit and 393 fits with consistency above 0.01. - 🟢 Same ntuple content. The ntuple has one branch fewer (
timeclustershits).timeclusters(1399),showerfilteredtimeclusters(793),lineseeds(1533), the 20,661lineseedshitsentries andtrig_calo_laser(72) are all unchanged.
Merge order
- #29 deletes
from_mcs-combined.fcl, which this PR modifies. A test merge of the two heads conflicts on that file (modify/delete).Combined_Pass1.fclmerges automatically. Whichever PR merges second will need to resolve it.
Validation check
- Ran:
fhicl-dumpof both files at this head, and the reconstruction and ntuple jobs on the first 2000 events ofraw.mu2e.cosmics.kpp.125472_000077-001.art, compared with the d25b9d4 andmainruns from my first review. - Not run: the tracker-only configurations, other runs or subruns, and any MC truth comparison.
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.
Uses the iterative LineFinder options from Mu2e/Offline#2077 in the combined Pass 1 reconstruction, and adds the matching EventNtuple branches. The tracker-only pass 1 (
Tracker/) is unchanged; whether to use these settings there is left to the tracker experts.Reconstruction (
Combined_Pass1.fcl)LineFinder:MaxLines: 3,MaxWireDistPull: 3,SkipFlatLines: true. Up to 3 lines per time cluster, each found after removing the previous lines' hits (e.g. a cosmic and an electron it knocks out). A hit counts only if the line agrees with its position along the wire. Lines parallel to the planes (dz = 0) are skipped because KKLine can't fit them.LineFinder.TimeClusterCollection: SimpleTimeCluster, so all time clusters are searched. CosmicShowerFilter calls a cluster a shower when hits in one panel change layer twice. That rejects nearly every cluster with two tracks, and also single tracks that cross 3 or more straws of a panel (e.g. cosmics nearly parallel to the planes). Most of the newly searched clusters have one line: in the test below, 468 of the 583 clusters the filter rejects give a single line, and 115 give two or more. This is intended: these single-track clusters are now fitted too. The filter still runs, and its clusters are stored.LineFinderline seeds. ThemakeSHhits are not kept.Ntuple (
from_mcs-combined.fcl)timeclustersandshowerfilteredtimeclusters(no hit branches), andlineseedswithlineseedshits(from the seeds' own hits)EvBprocesses (e.g. to identify calo laser events)geom_common_extracted_v06.txt, the same as the reconstruction (it wasgeom_cosmic_extracted.txt)Test
Offline main (807d948f9), with run 125472 subrun 77 (2000 events) through
Combined_Pass1.fcland thenfrom_mcs-combined.fcl. Both exit 0 with no exceptions.main)trig_*branches filled (calo_laser72/2000)main)Needs an Offline with #2077 (v13_42_00 or main).
geom_common_extracted_v06.txt(#2082) is already needed by main.🤖 Generated with Claude Code