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

Add more calorimeter energy fractions to PackedCandidates #26506

Merged
merged 9 commits into from May 7, 2019
Merged

Add more calorimeter energy fractions to PackedCandidates #26506

merged 9 commits into from May 7, 2019

Conversation

steggema
Copy link
Contributor

PR description:

This PR adds two new data members to PackedCandidates to be able to save two calorimeter energy fractions (one related to ECAL over HCAL energy, the other the ratio of calorimetric energy to overall candidate energy so that absolute HCAL energy fractions as well as track-ECAL energy ratios can be calculated) to charged PF candidates in MiniAOD. The additional information is the main missing information to be able to run algorithms to reject electrons and/or muons misreconstructed as taus on taus reconstructed from MiniAOD information only (see #22594).

The PR is expected to increase the size of the MiniAOD output by 1.1%, as measured on a 10000-event TTW file from the Autumn 18 production. The size of the pat::PackedCandidates branch is expected to increase from

Branch Name | Average Uncompressed Size (Bytes/Event) | Average Compressed Size (Bytes/Event)
patPackedCandidates_packedPFCandidates__PAT. 141015 20723.3

to

patPackedCandidates_packedPFCandidates__PAT. 145227 21500.8

The proposed implementation adds two new data members so that we end up with two data members that hold "raw" information and two that hold regular calibrated information. The reason is that JetMET currently also uses the regular energy fraction data member to save raw energy fractions for isolated charged hadrons so that they can run the charged hadron calibration on MiniAOD events. I found no traces of usage in CMSSW (except for b-tagging, who use the energy fractions saved for neutrals as was the original purpose of these members) and hence propose to move the JetMET content to the raw data mebers so we can save the new information in a logically consistent way in the existing data members (@ahinzmann @zdemirag this may affect you).

@mverzett @kskovpen As far as I understand the BTV code, the DNN-based b-taggers (who seem to be the only customers in CMSSW) only use the information saved for neutrals, which are unchanged.

This is to address #26406 (see also the discussion therein). @peruzzim @rmanzoni @mbluj @slava77 @fgolf @swozniewski

PR validation:

Basic PR tests have been performed.

if this PR is a backport please specify the original PR:

N/A

@cmsbuild
Copy link
Contributor

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-26506/9368

  • This PR adds an extra 48KB to repository

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @steggema (Jan Steggemann) for master.

It involves the following packages:

DataFormats/PatCandidates
PhysicsTools/PatAlgos

@perrotta, @cmsbuild, @santocch, @slava77 can you please review it and eventually sign? Thanks.
@TaiSakuma, @gouskos, @hatakeyamak, @rappoccio, @HeinerTholen, @peruzzim, @seemasharmafnal, @mmarionncern, @ahinzmann, @smoortga, @acaudron, @jdolen, @drkovalskyi, @ferencek, @rovere, @jdamgov, @nhanvtran, @gkasieczka, @schoef, @clelange, @JyothsnaKomaragiri, @mverzett, @cbernet, @gpetruc, @mariadalfonso, @pvmulder this is something you requested to watch as well.
@davidlange6, @slava77, @fabiocos you are the release manager for this.

cms-bot commands are listed here

@slava77
Copy link
Contributor

slava77 commented Apr 23, 2019

@cmsbuild please test

@ahinzmann
Copy link
Contributor

Just to make sure I read the description and code correctly. This will keep saving for all isolated charged hadrons, the raw energy fractions, just under a different (+better) name, right?

@cmsbuild
Copy link
Contributor

cmsbuild commented Apr 23, 2019

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/34298/console Started: 2019/04/23 14:21

@slava77
Copy link
Contributor

slava77 commented Apr 23, 2019

assign xpog
to sign off on the size increase and perhaps double-check the code changes as well

@cmsbuild
Copy link
Contributor

New categories assigned: xpog

@fgolf,@peruzzim you have been requested to review this Pull request/Issue and eventually sign? Thanks

@steggema
Copy link
Contributor Author

Just to make sure I read the description and code correctly. This will keep saving for all isolated charged hadrons, the raw energy fractions, just under a different (+better) name, right?

Yes, this is the intention.

@cmsbuild
Copy link
Contributor

-1

Tested at: ebfef1b

You can see the results of the tests here:
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-26506/34298/summary.html

I found follow errors while testing this PR

Failed tests: RelVals

  • RelVals:

When I ran the RelVals I found an error in the following workflows:
1000.0 step3

runTheMatrix-results/1000.0_RunMinBias2011A+RunMinBias2011A+TIER0+SKIMD+HARVESTDfst2+ALCASPLIT/step3_RunMinBias2011A+RunMinBias2011A+TIER0+SKIMD+HARVESTDfst2+ALCASPLIT.log

1001.0 step2
runTheMatrix-results/1001.0_RunMinBias2011A+RunMinBias2011A+TIER0EXP+ALCAEXP+ALCAHARVDSIPIXELCALRUN1+ALCAHARVD1+ALCAHARVD2+ALCAHARVD3+ALCAHARVD4+ALCAHARVD5/step2_RunMinBias2011A+RunMinBias2011A+TIER0EXP+ALCAEXP+ALCAHARVDSIPIXELCALRUN1+ALCAHARVD1+ALCAHARVD2+ALCAHARVD3+ALCAHARVD4+ALCAHARVD5.log

@cmsbuild
Copy link
Contributor

Comparison not run due to runTheMatrix errors (RelVals and Igprof tests were also skipped)

outPtrP->back().setTrackProperties(
*ctrack, covariancePackingSchemas_[2], covarianceVersion_); //low quality, with pixels
else
outPtrP->back().setTrackProperties(
Copy link
Contributor

Choose a reason for hiding this comment

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

@davidlange6 @fabiocos
is there a way to add braces in clang-format for the cases of multi-line break-up of an if/else?
The result looks like a bit more dangerous pattern where and else can get misplaced

Copy link
Contributor

Choose a reason for hiding this comment

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

no - clang-format changes whitespace only. There is a clang-tidy option to add braces for ifs/fors/whiles that has been tried but so far doesn't work fully in cmssw (afaik).

#include "RecoVertex/VertexPrimitives/interface/ConvertToFromReco.h"
#include
"TrackingTools/GeomPropagators/interface/AnalyticalImpactPointExtrapolator.h"
Copy link
Contributor

Choose a reason for hiding this comment

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

@davidlange6 @fabiocos
this is apparently breaking the commented out code

!iConfig.getParameter<edm::InputTag>("PuppiSrc").encode().empty() ||
!iConfig.getParameter<edm::InputTag>("PuppiNoLepSrc")
.encode()
.empty()),
Copy link
Contributor

Choose a reason for hiding this comment

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

@davidlange6 @fabiocos
for this and similar cases is there a way to make clang-format not break up similarly looking lines in a different way?
it seems also unnecessary to have .encode().empty() broken up to two pretty short lines. Was it intended in the configuration

Copy link
Contributor

Choose a reason for hiding this comment

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

there are not an infinite number of options, no. This presumably happens because of the greater number of characters in the second line.

One can try by hand just to have a line break before .encode() on both lines (but that also may get changed by clang-format)

@cmsbuild
Copy link
Contributor

cmsbuild commented May 6, 2019

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

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 24 differences found in the comparisons
  • DQMHistoTests: Total files compared: 33
  • DQMHistoTests: Total histograms compared: 3211964
  • DQMHistoTests: Total failures: 1
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3211759
  • DQMHistoTests: Total skipped: 204
  • 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 May 6, 2019

+1

for #26506 3120396

  • code changes are in line with the PR description and the follow up review. Some effort was made to preserve the old treatment of hcalFraction in the deep jet/b-tagging code.
  • jenkins tests pass and comparisons with the baseline show differences only in the hcalFraction values, which are now also filled for most of the charged hadrons.
    • deep jet/b-tagging behavior is unchanged

@peruzzim
Copy link
Contributor

peruzzim commented May 7, 2019

+xpog

@perrotta
Copy link
Contributor

perrotta commented May 7, 2019

@davidlange6 here and in other recent PRs (see #26606 for another example) line breaking as implemented by clang mostly results in less easily readable code; moreover, it complicates the reviews quite a lot. Given my recent experiences I would simply avoid forcing all line breaks in the code checks resolution, unless some more clever setting can be found for them.

@davidlange6
Copy link
Contributor

davidlange6 commented May 7, 2019 via email

@fabiocos
Copy link
Contributor

fabiocos commented May 7, 2019

+1

@fabiocos
Copy link
Contributor

fabiocos commented May 7, 2019

merge

@cmsbuild cmsbuild merged commit 1c57cc9 into cms-sw:master May 7, 2019
@santocch
Copy link

santocch commented May 7, 2019

+1

@cmsbuild
Copy link
Contributor

cmsbuild commented May 7, 2019

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 be automatically merged.

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