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

[JME,Nano] Refactor constituents table, add GloParT WvsQCD score #47206

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

nurfikri89
Copy link
Contributor

PR description:

This PR refactors the PF constituents table by putting the relevant modules in a dedicated cff file (jetsConstituents_cff.py). The main purpose is to streamline the modules used for storing PF constituents information for btvNano. Another PR on revamping btvNano will soon follow. This refactoring will also make it easier for NanoAOD private production with more constituents from other jet collections. In the cff file, I have added two customization functions that can be used to add AK4 and gen-jet constituents. Additionally, the GloParT WvsQCD binarized score is added to the FatJet table.

PR validation:

  • passes the usual runTheMatrix test: runTheMatrix.py -l limited -i all --ibeos with the exception of a few workflows which failed because of missing relval input files.
  • passes MiniAOD workflows: runTheMatrix.py -i all --ibeos -l 2500.021,2500.022,2500.023,2500.024,2500.031,2500.032,2500.033,2500.034

@cmsbuild
Copy link
Contributor

cmsbuild commented Jan 29, 2025

cms-bot internal usage

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-47206/43477

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @nurfikri89 for master.

It involves the following packages:

  • PhysicsTools/NanoAOD (xpog)
  • PhysicsTools/PatAlgos (xpog, reconstruction)

@cmsbuild, @ftorrresd, @hqucms, @jfernan2, @mandrenguyen can you please review it and eventually sign? Thanks.
@AlexDeMoor, @AnnikaStein, @Ming-Yan, @Senphy, @ahinzmann, @andrzejnovak, @azotz, @castaned, @gkasieczka, @gouskos, @gpetruc, @hatakeyamak, @jdamgov, @jdolen, @mariadalfonso, @mbluj, @mmarionncern, @nhanvtran, @rappoccio, @schoef, @seemasharmafnal this is something you requested to watch as well.
@antoniovilela, @mandrenguyen, @rappoccio, @sextonkennedy you are the release manager for this.

cms-bot commands are listed here

@hqucms
Copy link
Contributor

hqucms commented Jan 30, 2025

enable nano

@hqucms
Copy link
Contributor

hqucms commented Jan 30, 2025

please test

@cmsbuild
Copy link
Contributor

+1

Size: This PR adds an extra 56KB to repository
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-77a740/44069/summary.html
COMMIT: 8bb27f0
CMSSW: CMSSW_15_0_X_2025-01-29-2300/el8_amd64_gcc12
Additional Tests: NANO
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/47206/44069/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • You potentially removed 3 lines from the logs
  • ROOTFileChecks: Some differences in event products or their sizes found
  • Reco comparison results: 34 differences found in the comparisons
  • DQMHistoTests: Total files compared: 50
  • DQMHistoTests: Total histograms compared: 4016770
  • DQMHistoTests: Total failures: 3
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 4016747
  • DQMHistoTests: Total skipped: 20
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 2.838 KiB( 49 files compared)
  • DQMHistoSizes: changed ( 11634.0,... ): 0.129 KiB Physics/NanoAODDQM
  • Checked 218 log files, 189 edm output root files, 50 DQM output files
  • TriggerResults: no differences found

NANO Comparison Summary

Summary:

  • You potentially added 46 lines to the logs
  • ROOTFileChecks: Some differences in event products or their sizes found
  • Reco comparison results: 20 differences found in the comparisons
  • DQMHistoTests: Total files compared: 21
  • DQMHistoTests: Total histograms compared: 75127
  • DQMHistoTests: Total failures: 0
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 75127
  • DQMHistoTests: Total skipped: 0
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 1.548 KiB( 20 files compared)
  • DQMHistoSizes: changed ( 2500.001,... ): 0.129 KiB Physics/NanoAODDQM
  • Checked 106 log files, 61 edm output root files, 21 DQM output files
  • TriggerResults: no differences found

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.001 3.116 3.114 0.001 ( +0.0% ) 6.14 6.17 -0.4% 2.552 2.544
2500.002 3.232 3.230 0.001 ( +0.0% ) 5.54 5.49 +1.1% 2.983 2.989
2500.003 3.172 3.171 0.001 ( +0.0% ) 5.78 5.72 +1.0% 2.961 2.958
2500.011 1.645 1.644 0.001 ( +0.1% ) 9.66 9.93 -2.7% 2.626 2.622
2500.012 2.185 2.184 0.001 ( +0.1% ) 5.79 5.76 +0.4% 2.814 2.812
2500.013 2.001 2.000 0.002 ( +0.1% ) 8.05 8.25 -2.5% 2.730 2.731
2500.021 0.022 0.022 0.000 ( +0.0% ) 1.98 2.03 -2.6% 2.602 2.598
2500.022 0.022 0.022 0.000 ( +0.0% ) 1.87 1.94 -3.7% 2.594 2.596
2500.023 0.022 0.022 0.000 ( +0.0% ) 1.88 1.90 -0.6% 2.471 2.473
2500.024 0.022 0.022 0.000 ( +0.0% ) 1.47 1.54 -4.5% 2.710 2.700
2500.031 0.035 0.035 0.000 ( +0.0% ) 1.72 1.75 -1.7% 2.666 2.659
2500.032 0.036 0.036 0.000 ( +0.0% ) 1.73 1.73 -0.1% 2.622 2.625
2500.033 0.037 0.037 0.000 ( +0.0% ) 1.68 1.68 -0.3% 2.710 2.698
2500.034 0.036 0.036 0.000 ( +0.0% ) 1.66 1.68 -1.6% 2.687 2.674
2500.101 2.844 2.844 -0.000 ( -0.0% ) 15.98 16.16 -1.1% 2.642 2.639
2500.111 1.463 1.463 0.000 ( +0.0% ) 29.98 30.57 -1.9% 2.336 2.332
2500.112 1.883 1.883 0.000 ( +0.0% ) 25.02 25.23 -0.8% 2.404 2.403
2500.131 0.750 0.750 0.000 ( +0.0% ) 36.05 37.11 -2.9% 1.513 1.503
2500.201 2.674 2.674 0.000 ( +0.0% ) 13.07 13.73 -4.8% 2.208 2.207
2500.211 1.806 1.806 -0.000 ( -0.0% ) 26.25 26.76 -1.9% 2.400 2.402
2500.212 2.203 2.203 0.000 ( +0.0% ) 21.73 21.78 -0.2% 2.491 2.487
2500.221 2.115 2.038 0.077 ( +3.8% ) 13.65 13.97 -2.3% 2.124 2.123
2500.222 3.479 3.479 0.000 ( +0.0% ) 12.77 12.94 -1.3% 2.220 2.214
2500.223 9.445 9.444 0.000 ( +0.0% ) 4.12 4.24 -2.8% 2.294 2.292
2500.224 6.481 6.480 0.000 ( +0.0% ) 1.36 1.39 -2.8% 2.284 2.281
2500.225 6.528 6.527 0.001 ( +0.0% ) 1.25 1.29 -3.4% 2.495 2.499
2500.226 3.173 3.172 0.000 ( +0.0% ) 13.10 13.84 -5.3% 2.217 2.213
2500.227 1.442 1.442 0.000 ( +0.0% ) 23.39 23.91 -2.2% 1.450 1.440
2500.228 3.957 3.957 0.000 ( +0.0% ) 8.73 8.96 -2.5% 2.307 2.318
2500.231 1.512 1.457 0.054 ( +3.7% ) 21.76 23.06 -5.6% 2.313 2.302
2500.232 2.462 2.462 0.000 ( +0.0% ) 19.99 21.20 -5.7% 2.397 2.395
2500.233 4.954 4.954 0.000 ( +0.0% ) 6.06 6.19 -2.2% 2.471 2.480
2500.234 3.845 3.844 0.000 ( +0.0% ) 1.72 1.77 -2.7% 2.426 2.428
2500.235 3.877 3.876 0.001 ( +0.0% ) 1.61 1.65 -2.1% 2.610 2.624
2500.236 2.252 2.252 0.000 ( +0.0% ) 21.66 22.14 -2.1% 2.385 2.395
2500.237 1.018 1.018 0.000 ( +0.0% ) 34.09 34.66 -1.7% 1.448 1.459
2500.238 2.444 2.444 0.001 ( +0.0% ) 16.41 16.85 -2.6% 2.480 2.482
2500.241 9.404 9.404 0.000 ( +0.0% ) 7.14 6.89 +3.6% 1.919 1.924
2500.242 10.331 10.331 0.000 ( +0.0% ) 1.64 1.70 -3.6% 1.726 1.726
2500.243 2.712 2.712 0.000 ( +0.0% ) 15.42 15.85 -2.7% 1.060 1.060
2500.244 486.016 486.016 0.000 ( +0.0% ) 1.13 1.15 -2.1% 1.699 1.688
2500.245 826.413 826.413 0.000 ( +0.0% ) 1.49 1.53 -2.4% 1.685 1.673
2500.251 645.333 645.333 0.000 ( +0.0% ) 1.56 1.65 -5.7% 1.786 1.786
2500.901 1.819 1.819 0.000 ( +0.0% ) 43.28 45.19 -4.2% 1.445 1.443
2500.902 1.665 1.665 0.000 ( +0.0% ) 42.11 45.27 -7.0% 1.334 1.338
2500.911 14.345 14.345 0.000 ( +0.0% ) 7.77 7.56 +2.7% 1.087 1.089
2500.912 0.199 0.199 0.000 ( +0.0% ) 1.70 2.25 -24.5% 0.845 0.849
2500.913 0.110 0.110 0.000 ( +0.0% ) 2.48 2.50 -0.7% 0.850 0.850

@jfernan2
Copy link
Contributor

label btv

@jfernan2
Copy link
Contributor

assign btv-pog

@cmsbuild
Copy link
Contributor

New categories assigned: btv-pog

@mondalspandan,@SWuchterl you have been requested to review this Pull request/Issue and eventually sign? Thanks

@@ -73,6 +73,8 @@
globalParT3_TopbWmv = Var("bDiscriminator('pfGlobalParticleTransformerAK8JetTags:probTopbWmv')",float,doc="Mass-decorrelated GlobalParT-3 Top->bWmv score",precision=10),
globalParT3_TopbWtauhv = Var("bDiscriminator('pfGlobalParticleTransformerAK8JetTags:probTopbWtauhv')",float,doc="Mass-decorrelated GlobalParT-3 Top->bWtauhv score",precision=10),
globalParT3_QCD = Var("bDiscriminator('pfGlobalParticleTransformerAK8JetTags:probQCD')",float,doc="Mass-decorrelated GlobalParT-3 QCD score.",precision=10),
globalParT3_WvsQCD = Var("?bDiscriminator('pfGlobalParticleTransformerAK8JetTags:probXqq')+bDiscriminator('pfGlobalParticleTransformerAK8JetTags:probXcs')+bDiscriminator('pfGlobalParticleTransformerAK8JetTags:probQCD')>0?(bDiscriminator('pfGlobalParticleTransformerAK8JetTags:probXqq')+bDiscriminator('pfGlobalParticleTransformerAK8JetTags:probXcs'))/(bDiscriminator('pfGlobalParticleTransformerAK8JetTags:probXqq')+bDiscriminator('pfGlobalParticleTransformerAK8JetTags:probXcs')+bDiscriminator('pfGlobalParticleTransformerAK8JetTags:probQCD')):-1",
Copy link
Contributor

Choose a reason for hiding this comment

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

Isn't this redundant as probXqq, probXcs and probQCD are already stored?


process.selectedGenJetAK8Constituents = cms.EDFilter("PATPackedGenParticlePtrSelector",
src = cms.InputTag("genJetAK8Constituents", "constituents"),
cut = cms.string(genJetConstCut)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
cut = cms.string(genJetConstCut)
cut = cms.string(genJetAK8ConstCut)

name = cms.string(process.genJetTable.name.value()+"GenPartCand"),
candIdxName = cms.string("genPartCandIdx"),
candIdxDoc = cms.string("Index in the GenPartCand table"),
candidates = pfCandidatesTable.src,
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
candidates = pfCandidatesTable.src,
candidates = process.genPartCandidatesTable.src,

name = cms.string(process.genJetAK8Table.name.value()+"GenPartCand"),
candIdxName = cms.string("genPartCandIdx"),
candIdxDoc = cms.string("Index in the GenPartCand table"),
candidates = pfCandidatesTable.src,
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
candidates = pfCandidatesTable.src,
candidates = process.genPartCandidatesTable.src,

candidates = pfCandidatesTable.src,
jets = process.genJetAK8Table.src,
jetCut = process.genJetAK8Table.cut,
jetConstCut = process.selectedGenJetConstituents.cut
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
jetConstCut = process.selectedGenJetConstituents.cut
jetConstCut = process.selectedGenJetAK8Constituents.cut

process = SaveGenJetConstituents(process,True,False)
return process
def SaveGenJetAK8Constituents(process):
process = SaveGenJetConstituents(process,True,False)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
process = SaveGenJetConstituents(process,True,False)
process = SaveGenJetConstituents(process,False,True)

Or better:

Suggested change
process = SaveGenJetConstituents(process,True,False)
process = SaveGenJetConstituents(process, addGenJetConst=False, addGenJetAK8Const=True)

)
process.genjetConstituentsTask.add(process.selectedGenJetAK8Constituents)

if addGenJetConst or addGenJetConst:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if addGenJetConst or addGenJetConst:
if addGenJetConst or addGenJetAK8Const:

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.

4 participants