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

[BTV] PUPPI ValueMap-compatible Deep taggers info producers #40803

Merged

Conversation

nurfikri89
Copy link
Contributor

PR description:

The main goal of this PR is to modify several BTV Deep taggers info producers, which are used to retrieve the features of each jet , to retrieve the puppi weight for each PF candidate from a ValueMap<float> produced by PuppiProducer. The (fallback) puppi weight value is set to be 1.0 before accessing the weight from the ValueMap. If users do not set the fallback_puppi_weight flag to be true and does not specify a source for puppi_value_map, an exception is thrown. A new optional flag is_weighted_jet is introduced so that users can make specify to apply the puppi weights on the PF constituents' four-vector. The flag should be set to true for Puppi jets.

A new function, setupPackedPuppi(), is defined in PhysicsTools/PatAlgos/python/tools/jetTools.py that can be called to setup a PuppiProducer instance and provides a common puppi weight ValueMap for any module which requires one.

PR validation:

  • Validation plots comparing the input variables before and after the fix can be found in this JMAR meeting virtual contribution.
  • passes the usual runTheMatrix test: runTheMatrix.py -l limited -i all --ibeos
  • passes JMENanoAOD workflows: runTheMatrix.py -i all --ibeos -l 10224.15,11024.15,25202.15,11634.15
  • passes reMiniAOD and reNanoAOD workflows: runTheMatrix.py -i all --ibeos -l 1325.518,2500.312

@nurfikri89
Copy link
Contributor Author

nurfikri89 commented Feb 17, 2023

FYI @AnnikaStein, @AlexDeMoor and @demuller

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-40803/34234

  • This PR adds an extra 52KB to repository

  • There are other open Pull requests which might conflict with changes you have proposed:

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @nurfikri89 (Nurfikri Norjoharuddeen) for master.

It involves the following packages:

  • PhysicsTools/PatAlgos (xpog, reconstruction)
  • RecoBTag/FeatureTools (reconstruction)

@cmsbuild, @mandrenguyen, @clacaputo, @swertz, @vlimant can you please review it and eventually sign? Thanks.
@rappoccio, @gouskos, @hatakeyamak, @emilbols, @mbluj, @demuller, @seemasharmafnal, @mmarionncern, @missirol, @ahinzmann, @jdolen, @azotz, @hqucms, @jdamgov, @nhanvtran, @gkasieczka, @schoef, @andrzejnovak, @AlexDeMoor, @AnnikaStein, @JyothsnaKomaragiri, @gpetruc, @mariadalfonso this is something you requested to watch as well.
@perrotta, @dpiparo, @rappoccio you are the release manager for this.

cms-bot commands are listed here

@AnnikaStein
Copy link
Contributor

Hi @nurfikri89
as discussed via email, I support the modifications as they

  • are first of all necessary to actually use the weights from PuppiProducer for a potential re-NANO, in the packed_cand case
  • and second as this forces users to be explicit about what kind of weights they want to use.

Would we need a backport to 130X, given that one goal for this release reads „Possible re-miniAOD in EOY 2022“?

Best regards and thanks,
Annika

@swertz
Copy link
Contributor

swertz commented Feb 17, 2023

enable nano

@swertz
Copy link
Contributor

swertz commented Feb 17, 2023

please test

@cmsbuild
Copy link
Contributor

-1

Failed Tests: RelVals-INPUT
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-8ee623/30698/summary.html
COMMIT: 79f3a5b
CMSSW: CMSSW_13_1_X_2023-02-16-2300/el8_amd64_gcc11
Additional Tests: NANO
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/40803/30698/install.sh to create a dev area with all the needed externals and cmssw changes.

RelVals-INPUT

The relvals timed out after 4 hours.

Comparison Summary

Summary:

  • You potentially added 5 lines to the logs
  • Reco comparison results: 164 differences found in the comparisons
  • DQMHistoTests: Total files compared: 49
  • DQMHistoTests: Total histograms compared: 3556272
  • DQMHistoTests: Total failures: 20
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3556230
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 48 files compared)
  • Checked 213 log files, 164 edm output root files, 49 DQM output files
  • TriggerResults: no differences found

NANO Comparison Summary

Summary:

  • You potentially added 3 lines to the logs
  • Reco comparison results: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 11
  • DQMHistoTests: Total histograms compared: 10829
  • DQMHistoTests: Total failures: 0
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 10829
  • DQMHistoTests: Total skipped: 0
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 10 files compared)
  • Checked 23 log files, 10 edm output root files, 11 DQM output files

Nano size comparison Summary:

Sample kb/ev ref kb/ev diff kb/ev ev/s/thd ref ev/s/thd diff rate mem/thd ref mem/thd
2500.31 2.232 2.232 0.000 ( +0.0% ) 9.33 9.55 -2.2% 1.460 1.465
2500.311 2.323 2.323 0.000 ( +0.0% ) 9.04 9.07 -0.3% 1.839 1.836
2500.312 2.277 2.277 0.000 ( +0.0% ) 9.18 9.31 -1.5% 1.817 1.825
2500.33 1.100 1.100 0.000 ( +0.0% ) 21.14 21.96 -3.8% 1.648 1.638
2500.331 1.394 1.394 0.000 ( +0.0% ) 15.24 16.18 -5.8% 1.800 1.796
2500.332 1.326 1.326 0.000 ( +0.0% ) 17.13 17.87 -4.2% 1.865 1.851
2500.401 2.139 2.139 0.000 ( +0.0% ) 10.37 10.30 +0.7% 1.142 1.154
2500.501 1.711 1.711 0.000 ( +0.0% ) 16.66 16.64 +0.1% 1.062 1.064
2500.511 1.124 1.124 0.000 ( +0.0% ) 30.37 30.90 -1.7% 1.316 1.307
2500.601 2.050 2.050 0.000 ( +0.0% ) 12.62 12.40 +1.7% 1.134 1.139

@swertz
Copy link
Contributor

swertz commented Feb 17, 2023

please test

@nurfikri89
Copy link
Contributor Author

nurfikri89 commented Mar 23, 2023

But, for DeepDoubleX, the fallback weight of 1 was also used, so I would expect to see changes now that you've fixed that... Also, the weights were previously not used in the feature calculator https://github.com/cms-sw/cmssw/pull/40803/files#diff-0719f859daff442b1afbbf6b419ea2b413559a30f6924abc3c879024acb1e9b5, which is used by both DeepJet and DeepDoubleX/DeepBoostedJet, so I would expect changes to all of them?

@swertz I have updated the (slides) plots with the AK8 jet taggers added together. You are right, the NN taggers do change also with the updates but with the exception of ParticleNet because the use_puppiP4 is set to false for it:

@swertz
Copy link
Contributor

swertz commented Mar 23, 2023

Thanks for the check! I suppose we just didn't see any changes in AK8 jets in the tests because of the lack of statistics... Let me just refresh the tests and then we should be good to go.

@swertz
Copy link
Contributor

swertz commented Mar 23, 2023

please test

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-8ee623/31566/summary.html
COMMIT: 79f3a5b
CMSSW: CMSSW_13_1_X_2023-03-22-2300/el8_amd64_gcc11
Additional Tests: NANO
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/40803/31566/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: 172 differences found in the comparisons
  • DQMHistoTests: Total files compared: 49
  • DQMHistoTests: Total histograms compared: 3552750
  • DQMHistoTests: Total failures: 20
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3552708
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 48 files compared)
  • Checked 213 log files, 164 edm output root files, 49 DQM output files
  • TriggerResults: no differences found

NANO Comparison Summary

Summary:

  • You potentially added 1 lines to the logs
  • Reco comparison results: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 11
  • DQMHistoTests: Total histograms compared: 10829
  • DQMHistoTests: Total failures: 0
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 10829
  • DQMHistoTests: Total skipped: 0
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 10 files compared)
  • Checked 23 log files, 10 edm output root files, 11 DQM output files

Nano size comparison Summary:

Sample kb/ev ref kb/ev diff kb/ev ev/s/thd ref ev/s/thd diff rate mem/thd ref mem/thd
2500.31 2.224 2.224 0.000 ( +0.0% ) 9.49 9.74 -2.5% 1.448 1.497
2500.311 2.323 2.323 0.000 ( +0.0% ) 9.15 9.30 -1.6% 1.826 1.875
2500.312 2.277 2.277 0.000 ( +0.0% ) 8.71 9.43 -7.7% 1.815 1.864
2500.33 1.099 1.099 0.000 ( +0.0% ) 21.23 21.91 -3.1% 1.636 1.631
2500.331 1.394 1.394 0.000 ( +0.0% ) 15.41 16.08 -4.2% 1.776 1.787
2500.332 1.326 1.326 0.000 ( +0.0% ) 17.44 17.98 -3.0% 1.840 1.828
2500.401 2.138 2.138 0.000 ( +0.0% ) 10.51 10.52 -0.1% 1.149 1.191
2500.501 1.711 1.711 0.000 ( +0.0% ) 16.65 16.73 -0.5% 1.069 1.106
2500.511 1.124 1.124 0.000 ( +0.0% ) 31.06 31.10 -0.1% 1.321 1.364
2500.601 2.050 2.050 0.000 ( +0.0% ) 12.48 12.56 -0.6% 1.141 1.174

@swertz
Copy link
Contributor

swertz commented Mar 24, 2023

@mandrenguyen
Copy link
Contributor

+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. @perrotta, @dpiparo, @rappoccio (and backports should be raised in the release meeting by the corresponding L2)

@perrotta
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit ac8fc87 into cms-sw:master Mar 27, 2023
@swertz
Copy link
Contributor

swertz commented Mar 28, 2023

We will need to backport this to 13_0 for NanoV12.

@mandrenguyen
Copy link
Contributor

type btv

@cmsbuild cmsbuild added the btv label Mar 29, 2023
cmsbuild added a commit that referenced this pull request Apr 3, 2023
…iValueMapForMini

[BTV] Backport of #40803 (PUPPI ValueMap-compatible Deep taggers info producers)
@nurfikri89 nurfikri89 deleted the from1300pre4_btv_puppiValueMapForMini branch June 7, 2023 18:38
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.

6 participants