Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #120 +/- ##
==========================================
+ Coverage 15.02% 15.14% +0.11%
==========================================
Files 273 273
Lines 20639 20843 +204
==========================================
+ Hits 3102 3156 +54
- Misses 17537 17687 +150
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
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.
Description
This PR implements parametric shower energy reconstruction for electromagnetic showers in liquid argon. The new
ShowerParametricEnergyProcessorfits the true shower energy from visible calorimetric deposits using a forward regression approach based on theoretical shower development models. The fitter samples 3D points from parametric longitudinal (Gamma distribution) and transverse (Grindhammer-Peters) profiles, predicts box-wise energy depositions, and minimizes the chi-square against reconstructed calorimetric energies to extract the initial shower energy.Motivation and Context
Calorimetric energy reconstruction in modular liquid argon detectors suffers from systematic biases due to missing energy from invisible energy, nuclear effects, thresholding, and detector inefficiencies. This parametric approach corrects these biases by modeling the full 3D shower development and accounting for energy that escapes detector boundaries or falls below reconstruction thresholds. The method is particularly important for electromagnetic showers where containment and energy resolution are critical for physics analyses.
Type of Change
How Has This Been Tested?
The implementation has been tested on:
Test Configuration:
04c62f55)Checklist
Key Implementation Details
Core Components
ShowerEnergyFitter(inspine/utils/shower.py)ShowerParametricEnergyProcessor(inspine/post/reco/shower.py)directionandcalo_keupstream)calo_ke) with fitted parametric energyShower Physics Utilities (in
spine/utils/shower.py)sample_shower_points(): Sample 3D points from factorized shower modelshower_energy_density_3d(): Compute volumetric energy density at arbitrary pointsshower_long_params_gp(): Grindhammer-Peters longitudinal parametrizationshower_long_params_lar(): Custom LAr-tuned longitudinal parametrizationshower_transverse_params_gp(): GP transverse radial profile parametersConfiguration Parameters
n_points: Number of Monte Carlo samples per energy trial (default: 10000)seed: Random seed for reproducible samplingsigma_floor: Minimum per-box energy uncertainty in MeV (default: 1.0)energy_bounds: Valid energy range for fitting (default: 1-10000 MeV)xatol: Absolute tolerance on fitted energy (default: 1.0 MeV)use_gp: Toggle between GP and custom longitudinal parametrizationsmode: Geometry partitioning mode ("detector","module","tpc")Bug Fixes
CalorimetricEnergyProcessorto ensurefloattype conversion when evaluating string expressions (previously returnednumpy.ndarrayfor scalar results)Additional Notes
SHOWR_SHP); tracks are unaffectedn_points; 10000 samples provides good accuracy-speed tradeoff for typical applications