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

Fix MET unclustered energy computation [10_6_X] #29330

Merged
merged 3 commits into from
Apr 1, 2020

Conversation

ahinzmann
Copy link
Contributor

@ahinzmann ahinzmann commented Mar 28, 2020

PR description:

  1. Fix MET significance and unclustered pT computation for PUPPI MET. Previously these lines failed for the candidates inside jets as puppi MET and puppi jets are clustered from different particle collections with different particle momenta:

    if (footprint.find(pfCandidates->ptrAt(i)) == footprint.end()) {
    float weight = (weights != nullptr) ? (*weights)[pfCandidates->ptrAt(i)] : 1.0;
    //dP4 recovery
    for (const auto& it : footprint) {
    if ((it->p4() - (*pfCandidates)[i].p4() * weight).Et2() < 0.000025) {

    Particles from jets with puppi!=puppiForMET weights were not removed or falsely kept from unclustered energy.

  2. Fix MET unclusted pT uncertainty computation for PUPPI MET. Previously this line failed for the candidates inside jets as puppi MET and puppi jets are clustered from different particle collections:

    pfCandsNoJets = cms.EDProducer("CandPtrProjector",

    Particles from jets were not removed from unclustered energy.

  3. Replace dE-matching by dR-matching when computing unclustered pT and MET signficance for PF MET and PUPPI MET. Some low pT particles randomly passed the dE matching even though they did not point in the same direction, leading to changes up to 25%.

In this PR for UL-reMiniAOD, the issue is fixed by matching candidates based on dR instead of Ptrs. In the corresponding PR in the master #29254, the issue is solved by using the same particle flow collections for puppi jets and puppi MET and separate weight valuemaps.

PR validation:

On 100 events of 136.8311, it was checked that this PR obtains the same values of metSumPtUnlustered, metSignficance and unclustered energy uncertainties as the corresponding PT in the master #29254.

if this PR is a backport please specify the original PR and why you need to backport that PR:

This is a backport of the fix in #29331.

@ahinzmann ahinzmann changed the title Fix PUPPI MET unclustered energy computation Fix PUPPI MET unclustered energy computation [10_6_X] Mar 28, 2020
@cmsbuild cmsbuild added this to the CMSSW_10_6_X milestone Mar 28, 2020
@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 28, 2020

A new Pull Request was created by @ahinzmann for CMSSW_10_6_X.

It involves the following packages:

CommonTools/CandAlgos
PhysicsTools/PatUtils
RecoMET/METAlgorithms
RecoMET/METProducers

@perrotta, @cmsbuild, @santocch, @slava77 can you please review it and eventually sign? Thanks.
@emilbols, @gouskos, @hatakeyamak, @rappoccio, @peruzzim, @seemasharmafnal, @mmarionncern, @makortel, @smoortga, @jdolen, @ferencek, @jdamgov, @nhanvtran, @gkasieczka, @schoef, @andrzejnovak, @clelange, @riga, @JyothsnaKomaragiri, @mverzett, @gpetruc, @mariadalfonso this is something you requested to watch as well.
@davidlange6, @silviodonato, @fabiocos you are the release manager for this.

cms-bot commands are listed here

@ahinzmann ahinzmann mentioned this pull request Mar 28, 2020
@ahinzmann
Copy link
Contributor Author

ahinzmann commented Mar 28, 2020

FYI @danbarto @camclean @alefisico @saghosh
While this fix has a big impact on PUPPI MET unclustered energy uncertainties, this could in principle also help the issue for PF MET reported in #25849. Any volunteer to investigate this?

@slava77
Copy link
Contributor

slava77 commented Mar 28, 2020

@cmsbuild please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 28, 2020

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-run-pr-tests/5418/console Started: 2020/03/28 14:49

};

CandPtrProjector::CandPtrProjector(edm::ParameterSet const& iConfig):
candSrcToken_{consumes<edm::View<reco::Candidate>>(iConfig.getParameter<edm::InputTag>("src"))},
vetoSrcToken_{consumes<edm::View<reco::Candidate>>(iConfig.getParameter<edm::InputTag>("veto"))}
{
useDeltaRforFootprint_ = iConfig.exists("useDeltaRforFootprint") ? iConfig.getParameter<bool>("useDeltaRforFootprint") : false;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like fillDescriptions is in order

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

even though a fillDescriptions would be nice in general, my comment was triggered mostly by the use of ::exists.
It seems like in this case the new parameter can just be added as required and inserted in existing .py files with an appropriate default value.

@@ -39,6 +39,7 @@ metsig::METSignificance::METSignificance(const edm::ParameterSet& iConfig) {
jetEtas_ = cfgParams.getParameter<std::vector<double> >("jeta");
jetParams_ = cfgParams.getParameter<std::vector<double> >("jpar");
pjetParams_ = cfgParams.getParameter<std::vector<double> >("pjpar");
useDeltaRforFootprint_ = cfgParams.exists("useDeltaRforFootprint") ? cfgParams.getParameter<bool>("useDeltaRforFootprint") : false;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here as well, it looks like the useDeltaRforFootprint can just be added as required (in case implementation of the PSet validation is less motivating)

@ahinzmann
Copy link
Contributor Author

Tag for #27889

@cmsbuild
Copy link
Contributor

+1
Tested at: 82d52c3
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-bffe79/5418/summary.html
CMSSW: CMSSW_10_6_X_2020-03-28-1100
SCRAM_ARCH: slc7_amd64_gcc700

@cmsbuild
Copy link
Contributor

Comparison job queued.

@cmsbuild
Copy link
Contributor

Comparison is ready
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-bffe79/5418/summary.html

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 2 differences found in the comparisons
  • DQMHistoTests: Total files compared: 33
  • DQMHistoTests: Total histograms compared: 3212324
  • DQMHistoTests: Total failures: 2
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3211988
  • DQMHistoTests: Total skipped: 334
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 32 files compared)
  • Checked 137 log files, 14 edm output root files, 33 DQM output files

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 30, 2020

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-run-pr-tests/5436/console Started: 2020/03/30 16:48

@cmsbuild
Copy link
Contributor

+1
Tested at: 8b34609
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-bffe79/5436/summary.html
CMSSW: CMSSW_10_6_X_2020-03-30-1100
SCRAM_ARCH: slc7_amd64_gcc700

@cmsbuild
Copy link
Contributor

Comparison job queued.

@cmsbuild
Copy link
Contributor

Comparison is ready
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-bffe79/5436/summary.html

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 4 differences found in the comparisons
  • DQMHistoTests: Total files compared: 33
  • DQMHistoTests: Total histograms compared: 3212324
  • DQMHistoTests: Total failures: 32
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3211958
  • DQMHistoTests: Total skipped: 334
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 32 files compared)
  • Checked 137 log files, 14 edm output root files, 33 DQM output files

@slava77
Copy link
Contributor

slava77 commented Mar 30, 2020

+1

for #29330 8b34609

  • code changes are in line with the master version in Fix MET unclustered energy computation #29331, with the exception of modifications to satisfy the no-change policy, which enable the bugfixes only with run2_miniAOD_devel
  • jenkins tests pass and comparisons with the baseline show no relevant differences
    • signoff is relying on correctness of the implementation/test in the master version where the bugfixes are enabled

@santocch
Copy link

+1

@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_11_1_X is complete. This pull request will now be reviewed by the release team before it's merged. @silviodonato, @fabiocos (and backports should be raised in the release meeting by the corresponding L2)

@silviodonato
Copy link
Contributor

silviodonato commented Mar 31, 2020

backport of #29331

@silviodonato
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit e75ddf2 into cms-sw:CMSSW_10_6_X Apr 1, 2020
@ahinzmann ahinzmann changed the title Fix PUPPI MET unclustered energy computation [10_6_X] Fix MET unclustered energy computation [10_6_X] Apr 3, 2020
@slava77 slava77 mentioned this pull request Apr 17, 2020
41 tasks
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.

5 participants