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

Correctly add HIPhotonIsolation to pat::photon #32462

Merged
merged 4 commits into from Dec 19, 2020
Merged

Correctly add HIPhotonIsolation to pat::photon #32462

merged 4 commits into from Dec 19, 2020

Conversation

guitargeek
Copy link
Contributor

PR description:

This is to address issue #32451.

I was asked if there is a simpler python-level-only solution for that issue than to hard-code the propagation of the HI isolation value map in the ReducedEGProducer. Well, I couldn't find any and I don't think it's even possible because the HIPhotonIsolation is a custom class. Hence, we can't use the existing mechanisms for int and float ValueMaps.

Accordingly, this PR proposes the solution via editing the ReducedEGProducer source.

@mandrenguyen @ttrk

PR validation:

CMSSW compiles, local matrix tests pass.

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

No backport intened.

@cmsbuild
Copy link
Contributor

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-32462/20362

  • This PR adds an extra 24KB to repository

Code check has found code style and quality issues which could be resolved by applying following patch(s)

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-32462/20363

  • This PR adds an extra 24KB to repository

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @guitargeek (Jonas Rembser) for master.

It involves the following packages:

RecoEgamma/EgammaPhotonProducers
RecoEgamma/EgammaTools

@perrotta, @jpata, @cmsbuild, @slava77 can you please review it and eventually sign? Thanks.
@Sam-Harper, @jainshilpi, @rovere, @lgray, @sobhatta, @lecriste, @afiqaize, @varuns23, @ram1123 this is something you requested to watch as well.
@silviodonato, @dpiparo, @qliphy you are the release manager for this.

cms-bot commands are listed here

@slava77
Copy link
Contributor

slava77 commented Dec 13, 2020

@cmsbuild please test

@@ -238,6 +242,13 @@ ReducedEGProducer::ReducedEGProducer(const edm::ParameterSet& config)
config.getParameter<edm::InputTag>("photonsPFValMap"))),
gsfElectronPfCandMapT_(consumes<edm::ValueMap<std::vector<reco::PFCandidateRef>>>(
config.getParameter<edm::InputTag>("gsfElectronsPFValMap"))),
recoHIPhotonIsolationMapInputToken_{
config.existsAs<edm::InputTag>("HIPhotonIsolationMapInput")
Copy link
Contributor

Choose a reason for hiding this comment

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

other cases in this producer rely on empty inputTags; I suggest to stay with that logic, also considering that use of existsAs is generally not welcome.

Copy link
Contributor

Choose a reason for hiding this comment

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

also, please stay with lower case

Suggested change
config.existsAs<edm::InputTag>("HIPhotonIsolationMapInput")
config.existsAs<edm::InputTag>("hiPhotonIsolationMapInput")

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay, I will drop the existsAs after the tests. I know it's not welcome because fillDescriptions is preferred. But since there is no fillDescriptions, isn't it better than an empty tag? I thought existsAs would make an eventual fillDescription migration easier because it makes it explicit that the parameter is optional. In the end I think the consistency with the other tags is the strongest argument for dropping the existsAs here, so I agree with you in the end.

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-13de91/11582/summary.html
CMSSW: CMSSW_11_3_X_2020-12-13-0000/slc7_amd64_gcc900

Comparison Summary

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 2 differences found in the comparisons
  • DQMHistoTests: Total files compared: 36
  • DQMHistoTests: Total histograms compared: 2747284
  • DQMHistoTests: Total failures: 10
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 2747252
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 35 files compared)
  • Checked 153 log files, 37 edm output root files, 36 DQM output files

@guitargeek
Copy link
Contributor Author

FYI it's expected that there are no reco differences. The HI events in the regular matrix tests have no photons. Privately, I used wf 158.2, the Photon+Jets HI workflow, to validate this PR.

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-32462/20366

  • This PR adds an extra 28KB to repository

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-32462/20495

  • This PR adds an extra 28KB to repository

@cmsbuild
Copy link
Contributor

Pull request #32462 was updated. @perrotta, @jpata, @cmsbuild, @slava77 can you please check and sign again.

@slava77
Copy link
Contributor

slava77 commented Dec 18, 2020

@cmsbuild please test

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-13de91/11792/summary.html
CMSSW: CMSSW_11_3_X_2020-12-18-1100/slc7_amd64_gcc900

DAS Queries failed

Comparison Summary

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 3 differences found in the comparisons
  • DQMHistoTests: Total files compared: 36
  • DQMHistoTests: Total histograms compared: 2716967
  • DQMHistoTests: Total failures: 6
  • DQMHistoTests: Total nulls: 1
  • DQMHistoTests: Total successes: 2716938
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.004 KiB( 35 files compared)
  • DQMHistoSizes: changed ( 312.0 ): 0.004 KiB MessageLogger/Warnings
  • Checked 153 log files, 37 edm output root files, 36 DQM output files

@slava77
Copy link
Contributor

slava77 commented Dec 19, 2020

+1

for #32462 e299916

  • code changes are in line with the PR description and the follow up review: the association of the photon isolation is appropriately propagated via reducedEgamma
  • jenkins tests pass and comparisons with the baseline show no (relevant) difference: on one hand the used HI tests apparently do not have any slimmedPhotons; on the other hand the bugfix is for the alignment of the isolation variable with different photons, which would not be visible in the simple inclusive plots
  • the signoff relies mainly on the expected behavior of the modified code (the old variant relied on simple alignment by virtue of having photon_config.photonSrc defined; now it defaults through the originalObjectRef as follows from
    edm::Ptr<reco::Candidate> ptr(pho.originalObjectRef());
    if (!ph_conf.tok_photon_src.isUninitialized())
    ptr = phos_by_oop.at(pho_idx);
    //now we go through and modify the objects using the valuemaps we read in
    EGXtraModFromVMObjFiller<OutputType>::addValuesToObject(
    pho, ptr, ph_conf.tok_valuemaps, pho_vmaps, overrideExistingValues_);

    )

No backport intened.

actually, since the main target for HI miniAOD is 11_2_X, please provide a backport to 11_2_X

@cmsbuild
Copy link
Contributor

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. @silviodonato, @dpiparo, @qliphy (and backports should be raised in the release meeting by the corresponding L2)

@qliphy
Copy link
Contributor

qliphy commented Dec 19, 2020

+1

@cmsbuild cmsbuild merged commit d495a3c into cms-sw:master Dec 19, 2020
@guitargeek guitargeek deleted the slimmedPhotons_HI_1 branch December 19, 2020 09:57
@mandrenguyen
Copy link
Contributor

@guitargeek Would you mind backporting this to 11_2_X, which is the release for HI miniAOD? Sorry, I should have caught that before the holiday.

@guitargeek
Copy link
Contributor Author

Okay! There you go #32619

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

6 participants