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

Technical optimisation of e/gamma (local)covariances function (11_3_X) #33270

Merged
merged 4 commits into from Mar 31, 2021

Conversation

swagata87
Copy link
Contributor

PR description:

This PR is a follow-up of my previous PR #33148, which was merged recently. In particular, I'm addressing this comment which was raised in the last RECO meeting. So, as requested by @VinInn, this PR changes the return type of localCovariances, scLocalCovariances, and covariances functions from std::vector<float> to std::array<float,3>. As only 3 floats are returned, array is a better and more memory-efficient choice.

This is a purely technical PR, and no change in physics is expected.

PR validation:

runTheMatrix.py successfully ran with 23234.0, 140.53, and 11634.0

This PR is not a backport.
No backport is needed.

@cmsbuild
Copy link
Contributor

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-33270/21764

  • This PR adds an extra 120KB to repository

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

@Martin-Grunewald
Copy link
Contributor

please test

v.push_back(covEtaEta);
v.push_back(covEtaPhi);
v.push_back(covPhiPhi);
std::array<float,3> v;
Copy link
Contributor

Choose a reason for hiding this comment

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

brace initialization?

v.push_back(covEtaEta);
v.push_back(covEtaPhi);
v.push_back(covPhiPhi);
std::array<float,3> v;
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

@@ -102,9 +102,9 @@ void testEcalClusterLazyTools::analyze(const edm::Event& ev, const edm::EventSet
std::cout << std::endl;
std::vector<float> vLat = lazyTools.lat(clus);
std::cout << "lat...................... " << vLat[0] << " " << vLat[1] << " " << vLat[2] << std::endl;
std::vector<float> vCov = lazyTools.covariances(clus);
std::array<float,3> vCov = lazyTools.covariances(clus);
Copy link
Contributor

Choose a reason for hiding this comment

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

here and everywhere else below one could use auto instead of the explicit type (btw if auto was used in first place no change was required!)
This is somehow stylistic (I prefer auto) so I leave to reco-conv. too say the final word

Copy link
Contributor

Choose a reason for hiding this comment

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

const auto& vCov = lazyTools.covariances(clus);

seems like a good choice?

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-33270/21765

  • This PR adds an extra 224KB to repository

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @swagata87 (Swagata Mukherjee) for master.

It involves the following packages:

DQMOffline/Ecal
DQMOffline/Trigger
EgammaAnalysis/ElectronTools
PhysicsTools/PatAlgos
RecoEcal/EgammaClusterAlgos
RecoEcal/EgammaCoreTools
RecoEgamma/EgammaElectronAlgos
RecoEgamma/EgammaHLTProducers
RecoEgamma/EgammaPhotonProducers
RecoEgamma/EgammaTools
RecoEgamma/PhotonIdentification

@perrotta, @cmsbuild, @andrius-k, @kmaeshima, @fwyzard, @ErnestaP, @ahmad3213, @Martin-Grunewald, @jfernan2, @slava77, @jpata, @santocch, @rvenditti can you please review it and eventually sign? Thanks.
@rappoccio, @gouskos, @jainshilpi, @hatakeyamak, @emilbols, @argiro, @thomreis, @mbluj, @varuns23, @seemasharmafnal, @mmarionncern, @JyothsnaKomaragiri, @ahinzmann, @jhgoh, @lgray, @jdolen, @sscruz, @cericeci, @simonepigazzini, @ferencek, @trocino, @rociovilar, @Sam-Harper, @rovere, @jdamgov, @missirol, @nhanvtran, @gkasieczka, @schoef, @mtosi, @andrzejnovak, @clelange, @HuguesBrun, @rchatter, @swozniewski, @Fedespring, @calderona, @sobhatta, @lecriste, @afiqaize, @gpetruc, @mariadalfonso, @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

@Martin-Grunewald
Copy link
Contributor

please test

@cmsbuild
Copy link
Contributor

Pull request #33270 was updated. @perrotta, @cmsbuild, @andrius-k, @kmaeshima, @fwyzard, @ErnestaP, @ahmad3213, @Martin-Grunewald, @jfernan2, @slava77, @jpata, @santocch, @rvenditti can you please check and sign again.

@jpata
Copy link
Contributor

jpata commented Mar 26, 2021

@cmsbuild please test

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-62800e/13793/summary.html
COMMIT: 9a90148
CMSSW: CMSSW_11_3_X_2021-03-26-1100/slc7_amd64_gcc900
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/33270/13793/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: 7 differences found in the comparisons
  • DQMHistoTests: Total files compared: 37
  • DQMHistoTests: Total histograms compared: 2639935
  • DQMHistoTests: Total failures: 12
  • DQMHistoTests: Total nulls: 1
  • DQMHistoTests: Total successes: 2639900
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.004 KiB( 36 files compared)
  • DQMHistoSizes: changed ( 312.0 ): 0.004 KiB MessageLogger/Warnings
  • Checked 155 log files, 37 edm output root files, 37 DQM output files
  • TriggerResults: no differences found

@jpata
Copy link
Contributor

jpata commented Mar 29, 2021

+reconstruction

  • technical, EcalClusterLazyTools::covariances and localCovariances return array instead of a vector
  • no changes expected or observed

Thank you for this follow-up, @swagata87, and for @VinInn for pointing this out!

@jfernan2
Copy link
Contributor

+1

@Martin-Grunewald
Copy link
Contributor

+1

@santocch
Copy link

+1

@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 Mar 31, 2021

+1

@cmsbuild cmsbuild merged commit bf9409a into cms-sw:master Mar 31, 2021
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

8 participants