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

[HGCal] [bugfix] fix NaN values in LeafCandidate rapidity #32524

Conversation

felicepantaleo
Copy link
Contributor

@felicepantaleo felicepantaleo commented Dec 17, 2020

PR description:

This PR fixes NaN values in the rapidity of LeafCandidates when charged hadrons are created from empty tracksters.

PR validation:

Tested in 23234.0 with the injection of TICL in PF: --customise RecoHGCal/TICL/iterativeTICL_cff.injectTICLintoPF

@rovere @missirol @hatakeyamak @bendavid @hqucms

@felicepantaleo
Copy link
Contributor Author

@cmsbuild please test

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-32524/20476

  • This PR adds an extra 20KB to repository

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @felicepantaleo (Felice Pantaleo) for master.

It involves the following packages:

RecoHGCal/TICL

@perrotta, @jpata, @kpedro88, @slava77 can you please review it and eventually sign? Thanks.
@rovere, @apsallid, @sobhatta, @lecriste, @hatakeyamak, @clelange 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

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-e21463/11771/summary.html
CMSSW: CMSSW_11_3_X_2020-12-17-1100/slc7_amd64_gcc900

Comparison Summary

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 7 differences found in the comparisons
  • DQMHistoTests: Total files compared: 36
  • DQMHistoTests: Total histograms compared: 2747287
  • DQMHistoTests: Total failures: 18
  • DQMHistoTests: Total nulls: 1
  • DQMHistoTests: Total successes: 2747246
  • 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

@kpedro88
Copy link
Contributor

+upgrade
minor changes in TICLPFCandidate energy (picking 23434.999 for higher stats):
HGCAL__TICLPFCandidates_1_Energy

@@ -296,7 +296,8 @@ void TrackstersMergeProducer::produce(edm::Event &evt, const edm::EventSetup &es
}

// Neutral Hadrons
constexpr float mpion2 = 0.13957f * 0.13957f;
constexpr float mpion = 0.13957f;
constexpr float mpion2 = mpion * mpion;
Copy link
Contributor

Choose a reason for hiding this comment

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

double? (to match signature or LorenzVector)

@@ -511,8 +512,8 @@ void TrackstersMergeProducer::produce(edm::Event &evt, const edm::EventSetup &es
tmpCandidate.setPdgId(211 * track.charge());
float energy = std::sqrt(track.pt() * track.pt() + mpion2);
Copy link
Contributor

Choose a reason for hiding this comment

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

should this actually use track.p ?

Suggested change
float energy = std::sqrt(track.pt() * track.pt() + mpion2);
float energy = std::sqrt(track.p() * track.p() + mpion2);

IIUC, this way even the original p4 definition would be correct.
or is there some good reason to keep raw energy to be this "transverse" energy?

@felicepantaleo
Copy link
Contributor Author

@cmsbuild please test

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-32524/20563

  • This PR adds an extra 20KB to repository

@cmsbuild
Copy link
Contributor

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

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-e21463/11846/summary.html
CMSSW: CMSSW_11_3_X_2020-12-23-1100/slc7_amd64_gcc900

Comparison Summary

@slava77 comparisons for the following workflows were not done due to missing matrix map:

  • /build/cmsbld/jenkins/workspace/compare-root-files-short-matrix/data/PR-e21463/1325.81_TTbar_13_106Xv1NanoAODINPUT+TTbar_13_106Xv1NanoAODINPUT+NANOEDMMC2017_106XMiniAODv1+HARVESTNANOAODMC2017_106XMiniAODv1
  • /build/cmsbld/jenkins/workspace/compare-root-files-short-matrix/data/PR-e21463/136.8523_RunJetHT2018C_nanoULremini+RunJetHT2018C_nanoULremini+NANOEDM2018_106Xv2+HARVESTNANOAOD2018_106Xv2

Summary:

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

@kpedro88
Copy link
Contributor

+upgrade

@slava77
Copy link
Contributor

slava77 commented Dec 24, 2020

+1

for #32524 b7f5a5b

  • code changes are in line with the code review
    • the PR description could perhaps be made more clear that the problem was arising from a bug mixing up p and pt to calculate a p4 energy component
  • jenkins tests pass and comparisons with the baseline show differences only in phase-2 TICLPFCandidates energy plots (essentially all coming from pt -> p change); notably the fwlite-based reco comparisons checking the same pfTICL collection show that pt, eta, and phi of the candidates are unchanged.

in 23434.999 and other phase-2 workflows we also have an expected change in the ticlTrackstersMerge rawEnergy
all_OldVSNew_TTbar14TeV2026D49PUwPRMXwf23434p999c_log10TICLCandidates_ticlTrackstersMerge__RECO_obj_rawEnergy

@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 25, 2020

+1

@cmsbuild cmsbuild merged commit e74911f into cms-sw:master Dec 25, 2020
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