cmssw
cmssw copied to clipboard
Add DY option to Embedding HepMC filter
PR description
This PR adds the IncludeDY
option to the EmbeddingHepMCFilter
in order to allow for the inclusion of Drell-Yan MC events with virtual photons / Z bosons for which the intermediate boson is missing in the particle collection, e.g. p p > ta ta~
). For example, this is needed for correctly filtering events of the DYJetsToTauTauToMuTauh_M-50
sample. The proposed changes were discussed in the TauPOG here: https://indico.cern.ch/event/1170879/#2-validation-of-exclusive-dy-t
We have also added the absolute value function around the mother's PDG ID to allow for charged bosons, such as W (±24) for H → WW.
PR validation
- We have compared MC events generated with and without the changes to this filter.
- Usual
scram build code-checks
andscram build code-format
.
PR backporting
After PR, we will request to backport these changes to CMSSW_10_6_X
as well, so we can regenerate the DYJetsToTauTauToMuTauh_M-50
sample for Run-2 UL MC for TauPOG studies, and also to the CMSSW version for the future Run-3 MC campaign.
+code-checks
Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-38829/31201
- This PR adds an extra 16KB to repository
A new Pull Request was created by @IzaakWN (Izaak) for master.
It involves the following packages:
- GeneratorInterface/Core (generators)
@SiewYan, @mkirsano, @Saptaparna, @cmsbuild, @GurpreetSinghChahal, @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, @rappoccio you are the release manager for this.
cms-bot commands are listed here
please test
@IzaakWN , do you happen to have a test snippet included with this PR to test the switch to this filter?
+1
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-0ff0c5/26427/summary.html
COMMIT: 24cbe44da82991eed97f338a45a3a29aa680da41
CMSSW: CMSSW_12_5_X_2022-07-24-2300/el8_amd64_gcc10
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/38829/26427/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: 4 differences found in the comparisons
- DQMHistoTests: Total files compared: 51
- DQMHistoTests: Total histograms compared: 3667670
- DQMHistoTests: Total failures: 8
- DQMHistoTests: Total nulls: 0
- DQMHistoTests: Total successes: 3667640
- DQMHistoTests: Total skipped: 22
- DQMHistoTests: Total Missing objects: 0
- DQMHistoSizes: Histogram memory added: 0.0 KiB( 50 files compared)
- Checked 210 log files, 47 edm output root files, 51 DQM output files
- TriggerResults: no differences found
@IzaakWN , do you happen to have a test snippet included with this PR to test the switch to this filter?
Sure, I grabbed the fragment for DYJetsToTauTauToMuTauh_M-50
from MCM
curl -s -k https://cms-pdmv.cern.ch/mcm/public/restapi/requests/get_test/TAU-RunIISummer20UL18wmLHEGEN-00006 > setup_DYJetsToMuTauh.sh
bash setup_DYJetsToMuTauh_buggy.sh
and simply added IncludeDY = cms.bool(True),
as follows:
process.generator = cms.EDFilter("Pythia8HadronizerFilter",
HepMCFilter = cms.PSet(
filterName = cms.string('EmbeddingHepMCFilter'),
filterParameters = cms.PSet(
BosonPDGID = cms.int32(23),
IncludeDY = cms.bool(True),
ElElCut = cms.string(''),
ElHadCut = cms.string(''),
ElMuCut = cms.string(''),
Final_States = cms.vstring('MuHad'),
HadHadCut = cms.string(''),
MuHadCut = cms.string('Mu.Pt > 16 && Had.Pt > 16 && Mu.Eta < 2.5 && Had.Eta < 2.7'),
MuMuCut = cms.string('')
)
),
# ...
)
and then run with something like
cmsRun -n3 -e -j test TAU-RunIISummer20UL18wmLHEGEN-00006_1_cfg.py
You can find more instruction in the back up of this presentation: https://indico.cern.ch/event/1170879/#2-validation-of-exclusive-dy-t
Thanks you for the slide, it looks fine for me.
please test to refresh
@cms-sw/generators-l2 Do you have any comment?
+1
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-0ff0c5/26553/summary.html
COMMIT: 24cbe44da82991eed97f338a45a3a29aa680da41
CMSSW: CMSSW_12_5_X_2022-07-31-2300/el8_amd64_gcc10
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/38829/26553/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: 10 differences found in the comparisons
- DQMHistoTests: Total files compared: 51
- DQMHistoTests: Total histograms compared: 3669004
- DQMHistoTests: Total failures: 25
- DQMHistoTests: Total nulls: 1
- DQMHistoTests: Total successes: 3668956
- DQMHistoTests: Total skipped: 22
- DQMHistoTests: Total Missing objects: 0
- DQMHistoSizes: Histogram memory added: 0.004 KiB( 50 files compared)
- DQMHistoSizes: changed ( 312.0 ): 0.004 KiB MessageLogger/Warnings
- Checked 210 log files, 47 edm output root files, 51 DQM output files
- TriggerResults: no differences found
Just for the record, I have already opened these two backports:
-
CMMS_10_6_X
for Run 2 UL: cms-sw/cmssw#38936 -
CMMS_12_4_X
for Run 3: cms-sw/cmssw#38938
please test
@cms-sw/generators-l2 Any comment? https://github.com/cms-sw/cmssw/pull/38829#discussion_r935740224
+1
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-0ff0c5/26821/summary.html
COMMIT: 24cbe44da82991eed97f338a45a3a29aa680da41
CMSSW: CMSSW_12_5_X_2022-08-15-1100/el8_amd64_gcc10
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/38829/26821/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: 51
- DQMHistoTests: Total histograms compared: 3692476
- DQMHistoTests: Total failures: 2
- DQMHistoTests: Total nulls: 0
- DQMHistoTests: Total successes: 3692452
- DQMHistoTests: Total skipped: 22
- DQMHistoTests: Total Missing objects: 0
- DQMHistoSizes: Histogram memory added: 0.0 KiB( 50 files compared)
- Checked 212 log files, 49 edm output root files, 51 DQM output files
- TriggerResults: no differences found
+1 but some tests failed in the 12X back port.
This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @perrotta, @dpiparo, @qliphy, @rappoccio (and backports should be raised in the release meeting by the corresponding L2)
+1
@IzaakWN There appears an IB issue after merging this PR: https://cmssdt.cern.ch/SDT/cgi-bin/logreader/el8_amd64_gcc10/CMSSW_12_5_X_2022-08-16-2300/pyRelValMatrixLogs/run/136.9_RunDoubleMuon2016C+RunDoubleMuon2016C+RAWRECOTE16+RAWRECOLHECLEANTE16+EMBEDHADTE16+EMBEDMINIAOD16/step4_RunDoubleMuon2016C+RunDoubleMuon2016C+RAWRECOTE16+RAWRECOLHECLEANTE16+EMBEDHADTE16+EMBEDMINIAOD16.log#/
Please have a quick fix. Thanks!
Hi @IzaakWN, Also IB unit test is failing: https://cmssdt.cern.ch/SDT/cgi-bin/logreader/el8_amd64_gcc10/CMSSW_12_5_X_2022-08-16-2300/unitTestLogs/TauAnalysis/MCEmbeddingTools#/171-171 because of the same reason.
@qliphy @aandvalenzuela, I guess it is because the IncludeDY
parameter is not specified in these test scripts: https://github.com/cms-sw/cmssw/blob/6d2f66057131baacc2fcbdd203588c41c885b42c/TauAnalysis/MCEmbeddingTools/python/EmbeddingPythia8Hadronizer_cfi.py#L8-L24
Is it possible to make it optional here? https://github.com/cms-sw/cmssw/blob/af34412bd8dd78ad213b273d6f0ba080ee8f0b2d/GeneratorInterface/Core/src/EmbeddingHepMCFilter.cc#L7
@IzaakWN the optimal solution would be to add a fillDescriptions
method in your Pythia8HadronizerFilter
.
A quicker fix would be to simply add the missing parameter in cmssw/TauAnalysis/MCEmbeddingTools/python/EmbeddingPythia8Hadronizer_cfi.py, assigning it a "false" default value. Could you please take care of it?
Hi @perrotta, I prefer to solve it by making the IncludeDY
parameter optional like this, so it does not conflict with previous fragment configurations:
iConfig.getUntrackedParameter<bool>("IncludeDY", false)
https://github.com/cms-sw/cmssw/commit/1828dd5f600ee25cfc655e94dc0f62f9a83e560a Is this okay with you? Then I'll open a new PR, and update the backports as well.
@IzaakWN in your fix please both update EmbeddingPythia8Hadronizer_cfi.py and assign a default value for "IncludeDY" as you are suggesting
Hi @qliphy, @aandvalenzuela, @perrotta, the fix is in PR https://github.com/cms-sw/cmssw/pull/39090 and it has been pushed to the backports as well. Apologies for the troubles.