-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Dynamic Reduction Network for photon energy regression in miniAOD using the SonicTriton service #37134
Conversation
-code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-37134/28667
Code check has found code style and quality issues which could be resolved by applying following patch(s)
|
@ssrothman while you're code-formatting, typo: DRNCorrectionProducertT.cc -> DRNCorrectionProducerT.cc |
-code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-37134/28671
Code check has found code style and quality issues which could be resolved by applying following patch(s)
|
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-37134/28672 |
A new Pull Request was created by @ssrothman for master. It involves the following packages:
@jpata, @cmsbuild, @clacaputo, @slava77 can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
Hi @ssrothman , do I understand correctly that the DRN is turned on for photons and that there isn't a PR in |
PhysicsTools/PatAlgos/python/slimming/patElectronDRNCorrector_cfi.py
Outdated
Show resolved
Hide resolved
PhysicsTools/PatAlgos/python/slimming/patPhotonDRNCorrector_cfi.py
Outdated
Show resolved
Hide resolved
We have reviewed this PR mostly from physics point of view, and as long as it is not enabled as default right now, it is okay for us. We understand that the plan is to integrate the PR to facilitate further checks/validation, based on which we can decide when to enable it as default egamma regression. We would still like to stress a few points, most of them need to be addressed before DRN can be default:
Thanks, |
Indeed this is the case at the moment. I am putting together the cms-data PR this afternoon. In the meantime one can manually clone the repo from my personal git with the necessary configs. |
+upgrade
|
type egamma |
please test |
@cms-sw/pdmv-l2 this PR only misses the PDMV signature. Could you please have a look at your earliest convenience, and either approve or comment otherwise? Thank you. |
+pdmv |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-4827ab/24296/summary.html The following merge commits were also included on top of IB + this PR after doing git cms-merge-topic:
You can see more details here: Comparison Summary@slava77 comparisons for the following workflows were not done due to missing matrix map:
Summary:
|
+1 |
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. |
@cms-sw/egamma-pog-l2, quite likely unrelated to this PR, but in the log outputs of the newly added wfs the following warning messages annoyingly show up at every event:
This is probably something that you want to look at, and fix |
@perrotta this looks like there's something wrong with how the "tracking POG" filters in: cmssw/RecoMET/METFilters/python/trackingPOGFilters_cfi.py Lines 44 to 58 in 6d2f660
are configured. Would you mind opening an issue so that it doesn't get lost? |
PR description:
This PR builds on our previous PR #35839 and contains the code to apply our Dynamic Reduction Network (DRN) energy regression for electron and photon objects. The target for this round of code is to apply our new energy corrections to photons in the AOD -> miniAOD step run on Tier 2. This PR also contains the identical code to do the same for electrons, but the electron regression has not been enabled pending the addition of the necessary ECAL/tracker energy combination. This will the the subject of a separate future PR.
The regression is computed with the SonicTriton service, requiring the top-level producer to use the ExternalWork interface and inherit from TritonEDProducer rather than EDProducer. We therefore decided to split the computation and application of the regression in order to avoid having to make modifications to the existing photon/electron producers. This PR consists of two main c++ objects:
The regression can be enabled in a miniAOD workflow with the modifier in PhysicsTools/PatAlgos/python/slimming/enableDRN.py
The regression config file and weights are intended to be hosted on git cms-data, and will be the subject of an upcoming PR there. Until that time, they may be found at https://github.com/ssrothman/RecoEgamma.EgammaPhotonProducers.TritonModels
A summary of our new energy regression and the novel ML architecture underlying it can be found here.
PR validation:
Validation of this PR has been performed by enabling the DRN with the included modifier on top of a standard 2018UL AOD->miniAOD config, as can be found in PhysicsTools/PatAlgos/test/DRNtest_Hgg.py. We have performed testing on two samples: a ggH->gamma gamma sample (enabled in the included test config) and a ttH sample (/TTJets_TuneCP5_13TeV-amcatnloFXFX-pythia8/RunIISummer20UL18RECO-106X_upgrade2018_realistic_v11_L1v1-v1/AODSIM). On both samples we have run our regression on 10,000 events and examined the computational and physics performance of our PR.
Physics Performance:
We have validated that our producer yields identical output to the standalone python code used for training and validation of our model (e.g. as seen in the slides linked above). In addition, we have checked this performance on the two samples mentioned above. Histograms of the predicted energy divided by the gen energy for photons in these samples for both our regression and the existing 2018UL BDT regression are here:
Computational Performance:
On both samples we have profiled the computational performance of our model by enabling the TimerService and by monitoring resource usage in top. The overall performance picture is identical in both samples. These tests were performed on interactive nodes at LPC and therefore there was substantial variance in the absolute speed of the test workflow, but in all cases we observed that the DRN regression accounted for about 8% of the total event time in this AOD->miniAOD workflow. For a typical run, this is something like 40ms out of a total event time of 600ms. This is within expected parameters, and it is our understanding that ParticleNet (a similar architecture) takes a similar amount of time to run. While our test workflow was running, we observed a typical CPU utilization in top of ~100% by the cmsRun process and an additional utilization of ~20% by the SonicTriton process.
We have also included a unit test in PhysicsTools/PatAlgos/test
if this PR is a backport please specify the original PR and why you need to backport that PR:
NA
Before submitting your pull requests, make sure you followed this checklist:
@Sam-Harper @lgray @kpedro88 @rchatter @lfinco @swagata87 @jainshilpi @SohamBhattacharya @simonepigazzini @violatingcp