Skip to content

Add muon stop output for COL5 muon stops#538

Merged
oksuzian merged 1 commit intoMu2e:mainfrom
michaelmackenzie:PolyMuonStops
May 4, 2026
Merged

Add muon stop output for COL5 muon stops#538
oksuzian merged 1 commit intoMu2e:mainfrom
michaelmackenzie:PolyMuonStops

Conversation

@michaelmackenzie
Copy link
Copy Markdown
Contributor

These stops are important for RMC analyses, as the photons produced can reach the calorimeter. This relies on PR Mu2e/Offline#1817 which creates a unique name for the COL5 material in order to select these stops.

@FNALbuild
Copy link
Copy Markdown
Collaborator

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

  • JobConfig

which require these tests: build.

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

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

About FNALbuild. Code review on Mu2e/Offline.

@FNALbuild
Copy link
Copy Markdown
Collaborator

☀️ The build tests passed at 0a19c2f.

Test Result Details
test with Command did not list any other PRs to include
merge Merged 0a19c2f at ed044a2
build (prof) Log file. Build time: 04 min 14 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.
FIXME, TODO TODO (0) FIXME (0) in 0 files
clang-tidy 0 errors 0 warnings

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

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
Copy link
Copy Markdown
Collaborator

oksuzian commented May 4, 2026

PR #538 Review — Add muon stop output for COL5 muon stops

Summary

Author: @michaelmackenzie · Branch: michaelmackenzie:PolyMuonStopsMu2e:main
Files: 2 changed (+47 / −4) · Commits: 1 · Comments: 2 (FNALbuild only) · Reviews: 0

Adds a new polyStopPath to MuBeamResampler.fcl to capture muon stops in the COL5 polyethylene material (important for RMC analyses since photons produced there can reach the calorimeter). Mirrors the existing targetStopPath pattern. Depends on Mu2e/Offline#1817, which introduces the unique COL5Poly material name.

CI: ✅ All FNALbuild checks passed (build #617). mergeable_state: blocked is the standard "needs review approval" gate.


Core changes

  1. prolog.fcl — adds parallel COL5 versions of the stop‑detection chain:

    • Producer PolyMuonFinder (StoppedParticlesFinder, stoppingMaterial: "COL5Poly", particles 13/-13)
    • Producer stoppedPolyMuonDaughters (SimParticleDaughterSelector on PolyMuonFinder)
    • Producer compressPVPolyStops (CompressPhysicalVolumes on PolyStopFilter)
    • Filter PolyStopFilter (FilterG4Out on PolyMuonFinder)
    • Filter PolyStopPrescaleFilter (RandomPrescaleFilter)
    • New PolyStopPrescale : 1000 knob
  2. MuBeamResampler.fcl — wires the new producers/filters into a polyStopPath, adds a PolyStopOutput RootOutput (sim.owner.PolyStops.version.sequencer.art), and registers the prescale value.


🔴 Issues found

1. Dead code: stoppedPolyMuonDaughters is defined but never used

This is the main issue. The producer is added to prolog.fcl:

stoppedPolyMuonDaughters: {
  module_type: SimParticleDaughterSelector
  particleInput: "PolyMuonFinder"
  # EMCascade should not be vetoed because we do not re-simulate it
  processes: [ "DIO", "NuclearCapture" ] //TODO
}

But it does not appear in polyStopPath, nor in any sequence, nor in vetoParticles of any filter. By contrast, the analogous stoppedMuonDaughters is referenced in FlashFilter.vetoParticles (prolog.fcl:191) and in flashSequence (prolog.fcl:350).

Action: either remove stoppedPolyMuonDaughters, or — if the intent was to also veto poly‑stop daughters in the flash stream — add it to flashSequence/FlashFilter.vetoParticles and document why.

2. Prescale ordering vs. expected COL5 stop rate

The path applies the prescale before the muon finder:

polyStopPath : [ @sequence::Pileup.beamResamplerSequence, @sequence::Common.g4Sequence, PolyStopPrescaleFilter, PolyMuonFinder, PolyStopFilter, compressPVPolyStops]

This mirrors targetStopPath, so it's stylistically consistent. However, COL5 stops are far rarer than stopping‑target stops, so reusing nPrescale = 1000 (same as MuminusTargetStopPrescale) means you keep only 1‑in‑1000 events before checking if they have a COL5 stop — output statistics will be very small. Either:

  • justify the 1000 value for COL5 specifically (a comment near PolyStopPrescale : 1000 would help), or
  • drop the prescale (like IPAStopPath), or
  • reorder so the prescale comes after PolyStopFilter (i.e., prescale only the events that actually have a stop).

3. Minor: alignment of prescale assignments

The diff re‑aligns existing TargetStopPrescaleFilter / EarlyPrescaleFilter lines (whitespace‑only). That's cosmetic but mixes formatting changes into a feature PR; reviewers usually prefer separating those.

4. Minor: dataset name

sim.owner.PolyStops.version.sequencer.art — confirm PolyStops is acceptable in the Mu2e SAM dataset naming convention before this is exercised in production. (Placeholder strings are usually fine here, but worth a sanity check.)


Merge readiness

Check Status
Builds & functional tests (FNALbuild #617) ✅ all green
clang‑tidy / FIXME‑TODO ✅ clean
Reviews ⚠️ none yet (mergeable_state: blocked)
Offline dep PR #1817 ⚠️ must merge first — COL5Poly material name is defined there
Dead producer (#1 above) 🔴 should be resolved

Recommendation: request changes to remove or wire up stoppedPolyMuonDaughters, clarify the prescale rationale, and confirm Offline#1817 lands first.


Want me to

  1. Draft a review comment on the PR with the dead‑code finding and prescale question?
  2. Pull Give COL5 material a name, without any change to the composition Offline#1817 to verify the COL5Poly material name is actually introduced there?
  3. Search the Production repo for other usages of stoppedMuonDaughters to confirm whether stoppedPolyMuonDaughters was intended for an analogous spot?
  4. Check related fcl files (NeutralsResampler.fcl, etc.) to see if poly‑stop wiring is also needed there?

@oksuzian oksuzian merged commit 233c729 into Mu2e:main May 4, 2026
14 checks passed
@michaelmackenzie michaelmackenzie deleted the PolyMuonStops branch May 4, 2026 16:02
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.

3 participants