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

optimize and clean up EventShapeVariables code, add Fox-Wolfram moments #22559

Merged
merged 1 commit into from Mar 15, 2018

Conversation

kpedro88
Copy link
Contributor

@kpedro88 kpedro88 commented Mar 9, 2018

I was looking at these variables for an analysis and became dissatisfied with inefficiencies in the code. My changes include:

  • remove commented-out code
  • update documentation in comments
  • use range-based loops
  • avoid repeated computations of momentum tensor and eigenvalues
  • avoid unnecessary use of TVectorD::operator() (incredibly slow for some reason, thanks ROOT)
    • assignment of ROOT matrix objects is also slow, so tried to avoid that
  • avoid repeated trig computations

In addition, @owen234 had introduced the calculation of Fox-Wolfram moments in a private version of this code. I optimized it as follows:

  • calculate Legendre polynomials using recursive definition (minimize computation)
  • use symmetry factor to reduce summation (i,j term same as j,i term)

The updates are propagated to the associated producer.

attn: @justinrpilot @nstrobbe

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 9, 2018

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 9, 2018

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 9, 2018

A new Pull Request was created by @kpedro88 (Kevin Pedro) for master.

It involves the following packages:

PhysicsTools/CandAlgos
PhysicsTools/CandUtils

@gpetruc, @cmsbuild, @arizzi, @monttj can you please review it and eventually sign? Thanks.
@davidlange6, @slava77, @fabiocos you are the release manager for this.

cms-bot commands are listed here

@kpedro88
Copy link
Contributor Author

kpedro88 commented Mar 9, 2018

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 9, 2018

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/26745/console Started: 2018/03/09 20:29

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 9, 2018

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 9, 2018

Comparison job queued.

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 9, 2018

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

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 2 differences found in the comparisons
  • DQMHistoTests: Total files compared: 29
  • DQMHistoTests: Total histograms compared: 2484711
  • DQMHistoTests: Total failures: 1
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 2484534
  • DQMHistoTests: Total skipped: 176
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 1.12 KiB( 23 files compared)
  • Checked 118 log files, 9 edm output root files, 29 DQM output files

@kpedro88
Copy link
Contributor Author

@gpetruc, @arizzi can you sign for analysis?

@gpetruc
Copy link
Contributor

gpetruc commented Mar 13, 2018 via email

@kpedro88
Copy link
Contributor Author

@monttj ping (probably hopeless)

@fabiocos
Copy link
Contributor

@kpedro88 at present the category analysis is practically uncovered, but for the AN branch and NanoAOD where we agreed with @arizzi and @gpetruc to take responsibility.
So effectively the ultimate responsibility is on the release manager

@fabiocos
Copy link
Contributor

@kpedro88 looking at the code the behaviour should be unchanged in the proposed configuration (FW moments are not computed). Where has this been tested?

@kpedro88
Copy link
Contributor Author

I tested it privately on one of my analysis ntuples (compared distributions before and after, saw they were identical). This code isn't run in a standard sequence in CMSSW, but is used by some people offline (e.g. for the BEST tagger).

@fabiocos
Copy link
Contributor

@kpedro88 thanks, this is way I was asking

@fabiocos
Copy link
Contributor

+1

@fabiocos
Copy link
Contributor

merge

@cmsbuild cmsbuild merged commit 19c3d8d into cms-sw:master Mar 15, 2018
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

4 participants