Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport of Factory for adding UserHooks to PythiaHadronizer and SUEP decay pythia Hook #36509

Merged
merged 13 commits into from Dec 20, 2021

Conversation

cericeci
Copy link

Backport of #36238, intended for UL signal production. I did include both changes from the PR for simplicity (the factory and the SUEP plugin itself), but I can take the former out of the code if deemed more appropriate as it is just a backport.

Original PR description

This PR includes two main changes:

  • A mechanism to add UserHooks to Pythia8Hadronizer through the usage of a PluginFactory (thanks to @kpedro88 for the idea and pointers on how to), so the source code of the main pythia plugin does not need to be modified when adding user modifications. This idea can be used in the future to migrate the current implementation of several UserHooks that are currently hard-coded.
  • A module dedicated to soft unclustered energy pattern (SUEP or soft-bombs)-like decays, following the description of 1612.00850. It can be used to decay an SM particle through a soft-bomb shower.
    • The suep shower code (header and source) is taken directly from Simon Knapen's implementation and adapted to cmssw's code standards.
    • The module uses the previously discussed PluginFactory to be included inside the Pythia8Hadronizer and can be used for decays of ME obtained from either pythia or a LHE producer such as madgraph. An example of its usage can be found here. It's usage is based on the inclusion of the following lines inside the process.generator inside the fragment:
    UserCustomization = cms.VPSet(
       cms.PSet(
         pluginName = cms.string("SuepDecay"),
         idDark = cms.int32(999999), # pdgId of the dark meson
         idMediator = cms.int32(25), # pdgId of the mediator
         temperature = cms.double(2) # Temperature of the thermal distribution
       )

PR validation

Unit tests passed.
Tests using a local config file show that the SUEP module properly decays the Higgs boson.

Backporting:

Backport of #36238

@cmsbuild
Copy link
Contributor

cmsbuild commented Dec 15, 2021

A new Pull Request was created by @cericeci (Carlos Erice) for CMSSW_10_6_X.

It involves the following packages:

  • GeneratorInterface/Pythia8Interface (generators)

@SiewYan, @mkirsano, @Saptaparna, @cmsbuild, @GurpreetSinghChahal, @agrohsje, @alberto-sanchez can you please review it and eventually sign? Thanks.
@alberto-sanchez, @mkirsano this is something you requested to watch as well.
@perrotta, @dpiparo, @qliphy you are the release manager for this.

cms-bot commands are listed here

@cericeci cericeci changed the title Sue ppythia dev 10 6 x Backport of Factory for adding UserHooks to PythiaHadronizer and SUEP decay pythia Hook Dec 15, 2021
@kpedro88
Copy link
Contributor

please test

@cmsbuild
Copy link
Contributor

-1

Failed Tests: UnitTests RelVals AddOn
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-98d3cb/21299/summary.html
COMMIT: b6935aa
CMSSW: CMSSW_10_6_X_2021-12-13-1100/slc7_amd64_gcc700
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/36509/21299/install.sh to create a dev area with all the needed externals and cmssw changes.

Unit Tests

I found errors in the following unit tests:

---> test TestGeneratorInterfacePythia8InterfaceCompareIdentical had ERRORS
---> test TestGeneratorInterfacePythia8InterfaceCompareExternal had ERRORS
---> test testGeneratorInterfacePythia8InterfaceTP had ERRORS
---> test TestGeneratorInterfacePythia8InterfaceCompareExternalStreams had ERRORS
and more ...

RelVals

The relvals timed out after 4 hours.

  • 25.025.0_TTbar+TTbar+DIGI+RECOAlCaCalo+HARVEST+ALCATT/step1_TTbar+TTbar+DIGI+RECOAlCaCalo+HARVEST+ALCATT.log
  • 135.4135.4_ZEE_13+ZEEFS_13+HARVESTUP15FS+MINIAODMCUP15FS/step1_ZEE_13+ZEEFS_13+HARVESTUP15FS+MINIAODMCUP15FS.log
  • 5.15.1_TTbar+TTbarFS+HARVESTFS/step1_TTbar+TTbarFS+HARVESTFS.log
Expand to see more relval errors ...

AddOn Tests

  • unknownAddOnTest might have timed out: FAILED - secs

@cericeci
Copy link
Author

That's quite unexpected, I didn't got any segfaults when running the local tests. I'll investigate a bit farther on it

@cmsbuild
Copy link
Contributor

Pull request #36509 was updated. @SiewYan, @mkirsano, @Saptaparna, @cmsbuild, @GurpreetSinghChahal, @agrohsje, @alberto-sanchez can you please check and sign again.

@cericeci
Copy link
Author

Sorry for the noise, I made a very dumb mistake on the initialization of the added userhooks vector. Can I get the tests redone on this one?

@perrotta
Copy link
Contributor

please test

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-98d3cb/21326/summary.html
COMMIT: 7c5e735
CMSSW: CMSSW_10_6_X_2021-12-13-1100/slc7_amd64_gcc700
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/36509/21326/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 35
  • DQMHistoTests: Total histograms compared: 3215686
  • DQMHistoTests: Total failures: 1
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3215351
  • DQMHistoTests: Total skipped: 334
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 34 files compared)
  • Checked 143 log files, 29 edm output root files, 35 DQM output files
  • TriggerResults: no differences found

@agrohsje
Copy link

+generators

@cmsbuild
Copy link
Contributor

This pull request is fully signed and it will be integrated in one of the next CMSSW_10_6_X IBs (tests are also fine) and once validation in the development release cycle CMSSW_12_3_X is complete. This pull request will now be reviewed by the release team before it's merged. @perrotta, @dpiparo, @qliphy (and backports should be raised in the release meeting by the corresponding L2)

@perrotta
Copy link
Contributor

backport of #36238

@perrotta
Copy link
Contributor

The method added to GeneratorInterface/Pythia8Interface/interface/MultiUserHook.h is not from #36238: could you please tell from which development or PR is it coming from?

GeneratorInterface/Pythia8Interface/plugins/BuildFile.xml looks rater different here in 10_6 and in the master release: can you explain?

The implementation in GeneratorInterface/Pythia8Interface/plugins/Pythia8Hadronizer.cc is rather different with respect to the one in the master: could you please summarize the differences?

@cericeci
Copy link
Author

@perrotta thanks for reviewing (and sorry for the amount of your time I'm taking lately on pushing backports)

The treatment of collections of UserHooks changed in #29995 (11_2, my understanding is that this was to adapt the code to ran on pythia 3.02, but maybe @agrohsje knows a bit more on the gen side?). Then, the cms class MultiUserHook was replaced by pythia's UserHooksVector. Unfortunately the functionality to loop over the items in the vector doesn't seem to be there for the former so I added a getter to get them. Would it be better if I just define my fCustomHooksVector as an std::vector directly and avoid modifying MultiUserHook.h? I can also check whether with UserHooksVector runs under pythia 2.40 if you want (then the changes would be minimal).

For the BuildFile there were several changes between 10_6 and master (#31329, #31405) that were never part of a backport. I only added the minimal changes needed for the plugin to work, but I'm not sure whether anything else should be ported as well (at least scram is not complaining to me). Any suggestions?

The differences on Pythia8Hadronizer.cc arise from the first point above, I went backwards from the UserHooksVector syntax to the MultiUserHook one, so to get the same functionality I need to arrange it for the old class syntax.

@perrotta
Copy link
Contributor

@cericeci thank you for your answers. In a backport, maintaining the changes and the number of ported features to the minimum is a welcome plus. Of course it cannot go at the expenses of the functionality, computing performance, and also effort needed to adapt the new addition into the new code. I am not expert enough in this code to judge whether you can, with a limited effort, backport only the new functionalities without the need of bringing together other developments integrated since then. I'll let you and @agrohsje to decide about it.
Therefore, either propose a simpler backport, or just confirm that it must remain in the present form. By the way, the getter in MultiUserHook.h seems to me a clean enough solution to get the hooks, and I wouldn't add more complicate gymnastic. I give for granted that you already checked carefully the comptibility with the pythia version available in 10_6

@cericeci
Copy link
Author

@perrotta From my side I'm ok with the current implementation, but if anybody from gen wants me to adapt it farther I have no problem in doing so

@perrotta
Copy link
Contributor

+1

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.

None yet

5 participants