Conversation
Addresses Mu2e#410. For Run-1B analysis, store the basic combo hit information of the hits associated with time clusters and line seeds. - New EventNtupleComboHitInfo struct and <name>hits vector-of-vector branches, parallel to each time cluster / line seed branch. - Opt-in per collection through timeclusters.fillHitsFor and lineseeds.fillHitsFor (lists of output names, default empty): the TimeAndPhiClusterFinder collection has ~20x the clusters of the others and dominates the ntuple size if its hits are stored. - timeclusters.comboHitTags names the combo hit collection the time cluster indices refer to. A TimeCluster does not record it, and a wrong collection usually keeps every index in range, so the straw hit count is also required to add up. - Add the straw-hit-weighted average edep to the time cluster and line seed structs so that the hit branches are not needed for it. - from_mcs-Run1B.fcl sets comboHitTags to makePH; hit branches stay off. - ntuplehelper, branches.md, and RooUtil TimeCluster::hits. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0188sbNRs537Esmwr4EPeNaF
michaelmackenzie
requested changes
Sep 17, 2026
michaelmackenzie
left a comment
Contributor
There was a problem hiding this comment.
This seems to work well for Run 1B. Please turn on the target-origin electron and proton time cluster hit collections (leaving off the tz and tphi cluster hit collections and the line seed collections):
physics.analyzers.EventNtuple.timeclusters.fillHitsFor : [ "timeclusters", "protontimeclusters" ]
Will this work for Run 1A processing where makePH is not added to the output? Is there a way to use the mu2e::IndexMap produced by SelectReco or will this only work for StrawHits?
Requested in review of Mu2e#412. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0188sbNRs537Esmwr4EPeNaF
oksuzian
marked this pull request as ready for review
September 18, 2026 02:00
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.
Addresses #410.
What this adds
<name>hitsbranches: vector-of-vector of a newEventNtupleComboHitInfostruct (inc/ComboHitInfo.hh), parallel to each time cluster and line seed branch, e.g.timeclustershits,protonlineseedshits. Leaves:plane/panel/layer/straw,nStrawHits,nCombo,time,edep,qual,wdist,wres,tres,pos,udir.edepleaf onEventNtupleTimeClusterInfoandLineSeedInfo: straw-hit-weighted average hit energy deposition, so the hit branches are not needed for it. Always filled for line seeds; filled for time clusters whencomboHitTagsis set,-1otherwise.timeclusters.comboHitTags: the combo hit collection the time cluster indices refer to; one tag for all collections, or one per collection.timeclusters.fillHitsFor,lineseeds.fillHitsFor: the output names to write a hit branch for.from_mcs-Run1B.fclsetscomboHitTags : [ "makePH" ](soedepis filled) and leaves the hit branches off, with an example in a comment.ntuplehelper, regenerateddoc/branches.md, andhitson the RooUtilTimeCluster.Why per-collection rather than a single
fillHitsflagSize, measured on one
mcs.mu2e.CeEndpointMix1BB-KL.Run1Baw_best_v1_5file (681 events):tphitimeclusterstphitimeclustershitsalone is 13.0 MB:TimeAndPhiClusterFindermakes ~20x the clusters of the other finders (12259 vs ~550 in this file).Input availability
The Run-1B
-KLmcs files already keepmakeSH,makePHandmakeSTHin full (KinematicLineOutputis built fromReconstruction.DetailedOutput, which includesLowRecoProducts), and all four time cluster finders and all three line finders run overmakePHwithFilterHits : false. So this works on the existing mcs files with no reco change. Line seeds carry their own hits and need no external collection.Guarding against the wrong combo hit collection
A
TimeClusterstores bare indices and does not record which collection they refer to. PointingcomboHitTagsatmakeSHinstead ofmakePHkeeps every index in range and silently writes unrelated hits, so besides the bounds check the helper requires the summednStrawHitsof the selected hits to equalTimeCluster::nStrawHits()(skipped if a finder leaves that at 0). With the wrong tag the job now stops withTime cluster has 10 straw hits but its indices select 6 from the combo hit collection: check timeclusters.comboHitTags.Tests
Built against AnalysisMDC2025 v02_02_00 (Offline v13_38_00), run on the file above:
nhits, summed hitnStrawHitsequals the objectnStrawHits, and theedepleaf agrees with a recomputation from the hit branch to < 1e-9. Proton time clusters average 0.0027 MeV, inside theProtonCalTimeClusterFinder0.002-0.005 window.fillHitsFor(both tables),fillHitsForwithoutcomboHitTags.timeclusters.fill : falsestill runs.TimeCluster::hitsis set when the branch is present and null when it is not.Open points
<name>hitsfollowstrk->trkhits, which givestimeclustershits. Happy to change.nStrawHits = 1), time cluster hits are panel hits; the same struct is used for both.🤖 Generated with Claude Code
https://claude.ai/code/session_0188sbNRs537Esmwr4EPeNaF