Skip to content
This repository was archived by the owner on Aug 31, 2026. It is now read-only.

FastJetAlg: fix swapped jetOut / recParticleOut collections - #19

Merged
madbaron merged 1 commit into
MuonColliderSoft:mainfrom
mmfsz:fix-fastjet-output-swap
Aug 20, 2026
Merged

FastJetAlg: fix swapped jetOut / recParticleOut collections#19
madbaron merged 1 commit into
MuonColliderSoft:mainfrom
mmfsz:fix-fastjet-output-swap

Conversation

@mmfsz

@mmfsz mmfsz commented Aug 19, 2026

Copy link
Copy Markdown

The MultiTransformer at k4Reco/FastJet/src/FastJetAlg.cpp#L31-L32 declares its two outputs jets-first:

{KeyValues("jetOut", {"JetOut"}), KeyValues("recParticleOut", {"Constituents"})}

but operator() returns them the other way round, so the collection written under jetOut receives outputCollection (the subset of input particles that were clustered, flagged with setSubsetCollection(true)) and the collection written under recParticleOut receives jetCollection (the jets).

This PR swaps the returned tuple.

Checked on a MAIA v3.1 VBF H→bb sample. MAIAConfig's fastJet_cfg() names the inputs and
outputs correctly (recParticleIn = PandoraPFOs, jetOut = JetOut, recParticleOut = UsedPFOs),
so this is not a configuration error, but the collections written as JetOut and UsedPFOs come
out swapped due to the upstream bug. Cross-checked by plotting collections:

  • JetOut tracks the input PandoraPFOs on every variable.
  • UsedPFOs reproduces jets from standalone anti-kt on PandoraPFOs, jet by jet.

The MultiTransformer declares its two outputs jets-first:

    {KeyValues("jetOut", {"JetOut"}), KeyValues("recParticleOut", {"Constituents"})}

but operator() returned them the other way round, so the collection written
under jetOut received `outputCollection` (the subset of input particles that
were clustered, flagged with setSubsetCollection(true)) and the collection
written under recParticleOut received `jetCollection` (the jets).

The declared order is the intended one -- the default names are "JetOut" for
slot 0 and "Constituents" for slot 1 -- so fix the return, not the declaration.
@madbaron
madbaron merged commit f963439 into MuonColliderSoft:main Aug 20, 2026
2 of 5 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants