Skip to content

Add theta-energy calibration to Pandora reco - #37

Open
Jullianwatts wants to merge 1 commit into
MuonColliderSoft:mainfrom
Jullianwatts:pandora-theta-energy-calibration
Open

Add theta-energy calibration to Pandora reco#37
Jullianwatts wants to merge 1 commit into
MuonColliderSoft:mainfrom
Jullianwatts:pandora-theta-energy-calibration

Conversation

@Jullianwatts

@Jullianwatts Jullianwatts commented Aug 22, 2026

Copy link
Copy Markdown

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:

  • Common/pandora_calibration.py finds the payload JSON, converts it to the
    types Gaudi expects, and checks the table shape before the job starts.
  • ParticleFlow/pandora.py passes it to Pandora.
  • reco_args.py adds --pandoraCalibration.
  • PandoraSettings/PandoraSettingsThetaEnergy.xml names the two plugins. Naming
    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.

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
Jullianwatts force-pushed the pandora-theta-energy-calibration branch from c49b258 to 4057a5b Compare August 26, 2026 00:02
@Jullianwatts
Jullianwatts marked this pull request as ready for review August 26, 2026 00:20
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