Add theta-energy calibration to Pandora reco - #37
Open
Jullianwatts wants to merge 1 commit into
Open
Conversation
Pandora now corrects cluster energy with a 2D table in (theta, energy) instead of one flat number per subdetector. The correction happens inside Pandora, after clustering and before PFOs are built, so clusters, PFOs and jets all come out calibrated. Nothing has to be applied by hand later. The tables live in Calibration/ and are picked up automatically, so you just run reco_steer.py as normal. Use --pandoraCalibration none to turn them off, which is what you want when generating training samples, or pass your own table by name. What each file does: - Common/pandora_calibration.py finds the table, converts it to the types Gaudi expects, and checks the table size before the job starts. - ParticleFlow/pandora.py passes it to Pandora. - reco_args.py adds --pandoraCalibration. - PandoraSettingsDefault.xml lists the two plugins. This is what makes Pandora actually call them. HadronicThetaEnergyBinned runs after SoftwareCompensation, so it corrects whatever is left over. If no table is installed you get a warning, not a crash, and reco runs uncalibrated. So this is safe to merge before the tables exist. Still needs the theta-energy plugin in LCContent and the matching properties in k4GaudiPandora.
Jullianwatts
force-pushed
the
pandora-theta-energy-calibration
branch
from
August 26, 2026 00:02
c49b258 to
4057a5b
Compare
Jullianwatts
marked this pull request as ready for review
August 26, 2026 00:20
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.
Pandora now corrects cluster energy with a 2D table in (theta, energy) instead
of one flat number per subdetector. The correction happens inside Pandora,
after clustering and before PFOs are built, so clusters, PFOs and jets all
come out calibrated consistently. Nothing has to be applied by hand in
analysis.
The tables live in Calibration/ and are picked up automatically, so you just
run reco_steer.py as normal. --pandoraCalibration none turns it off (which is
what you want when generating calibration training samples), or pass your own
payload by name or path.
What each file does:
types Gaudi expects, and checks the table shape before the job starts.
a plugin is what makes Pandora actually call it. HadronicThetaEnergyBinned
runs after SoftwareCompensation, so it corrects the residual.
The plugin names are in their own settings file rather than in
PandoraSettingsDefault.xml. Putting them in the default makes reco stop at
Pandora ReadSettings for anyone whose LCContent does not have the plugins,
which is everyone until the two PRs underneath this one are merged and in a
container. Keeping them separate means this changes nothing for anyone, and
anyone who does have the plugins can use them with:
--pandoraSettings PandoraSettingsThetaEnergy.xml
Once the plugins are in a release, a follow-up PR moves them into the default
along with the calibration tables.
Safe to merge before any tables exist: there are no payloads in Calibration/
yet, a missing table is a warning rather than an error, and the plugins
register with empty tables, which is the identity.
Depends on key4hep/k4GaudiPandora#51 (the ten properties this sets) and
PandoraPFAOrg/LCContent#41 (the plugins themselves). Until those are merged and
in a container, this branch runs uncalibrated with a warning — same as merging
it today with no tables.