Skip to content

Conversation

@runtingt
Copy link

@runtingt runtingt commented Jan 9, 2026

PR description:

In certain 2024 MC samples, the HTXS labels for all events are set to 0: UNKNOWN, see e.g. ZH-Hto2G:

with uproot.open("root://xrootd-cms.infn.it//store/mc/RunIII2024Summer24NanoAODv15/ZH-Hto2G_Par-M-125_TuneCP5_13p6TeV_amcatnloFXFX-pythia8/NANOAODSIM/150X_mcRun3_2024_realistic_v2-v2/2530000/2e868471-3ed9-461f-b633-7034cc80b492.root") as f:
    tree = f["Events"]
    print(tree["HTXS_stage1_2_cat_pTjet30GeV"].array()) # 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ..., 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]

This stems from changes made to transition from HepMC2 -> HepMC3 for these samples, where signal_process_vertex() was removed. Instead, it was assumed that the first vertex in GenEvent is the hard-scatter vertex. This is not always the case and causes the Rivet routine to fail. This PR moves the existing (correct) logic from the Rivet routine itself into a utility function that can then be used by the producer.

PR validation:

  • Sanity check: Following these changes, a re-nano of the affected Hgg samples contain no 0: UNKNOWN labels
  • Eventwise check: Re-nano of some known good samples (from 2023) with these changes produce the same HTXS labels for each event
  • Distribution check: The HTXS distributions for a known good sample (from 2023) and a re-nano 2024 sample with these changes (for the same process) agree within statistical uncertainties.

If this PR is a backport please specify the original PR and why you need to backport that PR. If this PR will be backported please specify to which release cycle the backport is meant for:

  • Intended backport: CMSSW_15_X_X

@cmsbuild
Copy link
Contributor

cmsbuild commented Jan 9, 2026

cms-bot internal usage

@cmsbuild
Copy link
Contributor

cmsbuild commented Jan 9, 2026

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-49759/47345

@cmsbuild
Copy link
Contributor

cmsbuild commented Jan 9, 2026

A new Pull Request was created by @runtingt for master.

It involves the following packages:

  • GeneratorInterface/RivetInterface (generators)

@cmsbuild, @lviliani, @mkirsano, @sensrcn, @theofil can you please review it and eventually sign? Thanks.
@alberto-sanchez, @mkirsano this is something you requested to watch as well.
@ftenchini, @mandrenguyen, @sextonkennedy you are the release manager for this.

cms-bot commands are listed here

@lviliani
Copy link
Contributor

Is this a duplicate of #49644?

@runtingt
Copy link
Author

Is this a duplicate of #49644?

Ah, yes it appears to be. Apologies.

I would argue this is a "cleaner" solution as the original bug was caused in part because two pieces of code did the same thing in different ways and only one of them was safe for HepMC3, so by refactoring here we also reduce the surface for a potential new bug in the future caused by a similar change in HepMC. I am however, happy with whichever so long as the bug is fixed :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants