Skip to content

[codex] Use channel energy for hit smearing#127

Open
lobis wants to merge 1 commit into
masterfrom
codex/channel-specific-hit-smearing
Open

[codex] Use channel energy for hit smearing#127
lobis wants to merge 1 commit into
masterfrom
codex/channel-specific-hit-smearing

Conversation

@lobis
Copy link
Copy Markdown
Member

@lobis lobis commented May 19, 2026

lobis Ok: 17 Powered by Pull Request Badge

Summary

  • Compute the smearing resolution from the energy in the selected channel type instead of the total detector-hit energy.
  • Keep the previous behavior for applying one common stochastic gain to the selected TPC or VETO hits.
  • Leave non-selected hit types unchanged and avoid drawing a smearing factor when the selected channel has zero energy.

Why

TRestDetectorHitsSmearingProcess can be configured with channelType=tpc or channelType=veto, but the resolution was derived from fInputEvent->GetTotalEnergy(). For mixed events containing both TPC and VETO hits, a large energy deposit in the other channel could bias the selected-channel resolution. This is especially visible in cosmic-background simulations where a small TPC deposit may coexist with a large veto deposit.

Validation

  • Ran git diff --check on the patch.
  • Built the RestDetector target on the NAF REST build tree successfully.

@lobis lobis requested a review from JPorron May 19, 2026 12:01
@lobis lobis marked this pull request as ready for review May 19, 2026 12:01
@lobis lobis enabled auto-merge May 19, 2026 12:06
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.

1 participant