Skip to content

Add a local customization point to calorimeter hits - #45

Merged
tmadlener merged 3 commits into
PandoraPFAOrg:masterfrom
tmadlener:bib-flag
Oct 8, 2026
Merged

tmadlener merged 3 commits into
PandoraPFAOrg:masterfrom
tmadlener:bib-flag

Conversation

@tmadlener

@tmadlener tmadlener commented Sep 21, 2026 •

Copy link
Copy Markdown
Collaborator

This is an implementation following the discussion in PandoraPFAOrg/PandoraSDK#37 to allow for extensions of the calorimeter hit that do not require to touch the CaloHit provided by PandoraSDK.

In order to be able to use these changes via k4GaudiPandora one also needs key4hep/k4GaudiPandora#55

This work will essentially allow the functionality from #43 to be done entirely without changes to PandoraSDK.

@tmadlener

Copy link
Copy Markdown
Collaborator Author

This now also includes the changes from #43 via cherry-picking and the small adaptations that are necessary to be independent of the PandoraSDK PR.

@tmadlener
tmadlener marked this pull request as ready for review September 24, 2026 14:36
@tmadlener

Copy link
Copy Markdown
Collaborator Author

I have removed all the additional machinery again and cut this back to only have the minimal bits to have a customizable LCCaloHit. This PR does not yet introduce any additional functionality.

@tmadlener

Copy link
Copy Markdown
Collaborator Author

I have verified locally that this does not change the results of Pandora and that things still run. To do this I have simulated the 3 ttbar events that come with CLDConfig and ran the CLDReconstruction.py over the output with and without these changes (using the --native flag to actually make sure that we use k4GaudiPandoras implementation of the algorithm). k4GaudiPandora was built with key4hep/k4GaudiPandora#55 for these tests.

Comparing the files afterwards yields no differences

$ diff -u <(podio-dump -e 0:2 -d ttbar_lccalohit_rec_REC.edm4hep.root) <(podio-dump -e 0:2 -d ttbar_pandorahit_rec_REC.edm4hep.root)
--- /dev/fd/63	2026-10-02 11:49:31.479247460 +0200
+++ /dev/fd/62	2026-10-02 11:49:31.480247452 +0200
@@ -1,4 +1,4 @@
-input file: ttbar_lccalohit_rec_REC.edm4hep.root
+input file: ttbar_pandorahit_rec_REC.edm4hep.root
             (written with podio version: 1.8.99)
 
 datamodel model definitions stored in this file:

With this check I think this and key4hep/k4GaudiPandora#55 are ready to be merged.

@tmadlener

Copy link
Copy Markdown
Collaborator Author

As discussed at yesterdays meeting, I will merge this today, unless there are more comments.

@jmcarcell

Copy link
Copy Markdown
Collaborator

I think changes like #49 are going to be needed

@jmcarcell

Copy link
Copy Markdown
Collaborator

The SDK factory API changed in PandoraPFAOrg/PandoraSDK#38 (merged September 7, 2026), specifically in commit PandoraPFAOrg/PandoraSDK@6c39dfc ("Overhaul of SDK persistency"). ObjectFactory::Read and Write now take const FieldMap& and FieldMap&, respectively, instead of FileReader& and FileWriter&.

The new LCCaloHitFactory and LCCaloHitFragmentFactory still use the old signatures, so they will also need adapting for SDK master, alongside the existing LCTrack persistency code. This PR builds and passes the existing tests against SDK 3.4.2.

@tmadlener

Copy link
Copy Markdown
Collaborator Author

Should be straight forward to add here. The main question is the comment I left in #49 and then eventually the order in which we merge these, in case we want to go for a single place definition.

@tmadlener
tmadlener changed the base branch from master to pandorasdk-fieldmap-persistency October 7, 2026 17:42
@tmadlener

tmadlener commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator Author

OK. Looks like PR stacks are not enabled here (or I haven't understood how to create them). In any case, changes for new persistency mode are here now as well and I have lifted the common things into a separate header that is now included by both LCCaloHit and LCTrack.

edit: It's PRs from forks that are not supported in stacks.

@jmcarcell
jmcarcell changed the base branch from pandorasdk-fieldmap-persistency to master October 7, 2026 18:00
Similar to LCTrack. This makes it possible to add more information that
is specific to LCContent locally instead of having to adapt the
centrally (PandoraSDK) provided CaloHit. This mirrors the appraoch that
has been taken by the LAr TPC.
@tmadlener
tmadlener merged commit 4855536 into PandoraPFAOrg:master Oct 8, 2026
6 of 7 checks passed
@tmadlener
tmadlener deleted the bib-flag branch October 8, 2026 09:49
madbaron added a commit to key4hep/key4hep-spack that referenced this pull request Oct 30, 2026
- k4GaudiPandora links GSL since v0.2.0 and requires EDM4hep 1.0 since v0.5.0
- k4GaudiPandora v0.4.0 needs LCContent 5.1.0 (PandoraPFAOrg/LCContent#45),
  main needs LCContent 5.1.1 (PandoraPFAOrg/LCContent#41 and #47)
- LCContent 5.1 requires PandoraSDK 4.0.1

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

2 participants