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

[NanoAOD] Add PF constituents for AK8 jets #46012

Merged
merged 8 commits into from
Sep 21, 2024

Conversation

nurfikri89
Copy link
Contributor

PR description:

This PR adds PF candidate constituents for AK8 jets with abs(eta) < 2.5. Two tables are added:

  • PFCand : PF candidates with minimal information (pt, eta, phi, mass, pdgId).
  • FatJetPFCand: Mapping information of the candidates in PFCand to the AK8 jets in FatJet.

This new feature allows analyzers to perform Lund Plane Reweighting (DP-2023-046) and calculate substructure variables for AK8 jets, like the Lund Plane itself. The feature was discussed during XPOG meeting (21/08/24), where the event size increase estimate was presented, and NanoAOD Deep Dive (3/09/24).

PR validation:

  • passes the usual runTheMatrix test: runTheMatrix.py -l limited -i all --ibeos
  • 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 Sep 17, 2024

cms-bot internal usage

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-46012/41814

@cmsbuild
Copy link
Contributor

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

It involves the following packages:

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

@cmsbuild, @ftorrresd, @hqucms, @jfernan2, @mandrenguyen can you please review it and eventually sign? Thanks.
@AlexDeMoor, @AnnikaStein, @Ming-Yan, @Senphy, @ahinzmann, @andrzejnovak, @azotz, @castaned, @demuller, @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

@jfernan2
Copy link
Contributor

please test

@cmsbuild
Copy link
Contributor

-1

Failed Tests: Build
Size: This PR adds an extra 44KB to repository
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-78c0c1/41555/summary.html
COMMIT: 9bb7e36
CMSSW: CMSSW_14_2_X_2024-09-17-1100/el8_amd64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/46012/41555/install.sh to create a dev area with all the needed externals and cmssw changes.

Build

I found compilation error when building:

gmake[1]: *** [config/SCRAM/GMake/Makefile.rules:2006: CompilePython] Error 1
>> Plugins of all types refreshed.
gmake[1]: Target 'PostBuild' not remade because of errors.
gmake[1]: Leaving directory '/data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_14_2_X_2024-09-17-1100'
gmake: *** [config/SCRAM/GMake/Makefile.rules:1892: src] Error 2
gmake: Target 'all' not remade because of errors.
gmake: *** [There are compilation/build errors. Please see the detail log above.] Error 2
+ eval scram build outputlog '&&' '(python3' /data/cmsbld/jenkins/workspace/ib-run-pr-tests/cms-bot/buildLogAnalyzer.py --logDir /data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_14_2_X_2024-09-17-1100/tmp/el8_amd64_gcc12/cache/log/src '||' 'true)'
++ scram build outputlog
>> Entering Package PhysicsTools/NanoAOD


@nurfikri89
Copy link
Contributor Author

Apologies. Typo fixed.

Plot1D('mass', 'mass', 10, 0, 1., 'Puppi-weighted mass'),
Plot1D('pdgId', 'pdgId', 44, -220, 220, 'PF candidate type (+/-211 = ChgHad, 130 = NeuHad, 22 = Photon, +/-11 = Electron, +/-13 = Muon, 1 = HFHad, 2 = HFEM)'),
)
),
Copy link
Contributor

Choose a reason for hiding this comment

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

@nurfikri89 Would it make sense to add FatJetPFCand_PFCandIdx and FatJetPFCand_jetIdx to DQM as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Looking at the indices that we store for other objects, we do not make DQM plots for them. I do not see a reason to do anything differently here.

Comment on lines 324 to 325
src = cms.InputTag("finalJetsAK8"),
cut = cms.string("abs(eta) <= 2.5")
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it be better to use the following to ensure consistency?

Suggested change
src = cms.InputTag("finalJetsAK8"),
cut = cms.string("abs(eta) <= 2.5")
src = fatJetTable.src,
cut = fatJetTable.cut

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For src, you are right. I will correct it but for cut, we explicitly set "abs(eta) <= 2.5" to only store the PF candidates for AK8 jets within that eta range.

Copy link
Contributor

Choose a reason for hiding this comment

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

Why explicitly requiring abs(eta) <= 2.5? IIRC in MiniAOD it's already rapidity<2.4, so it's largely similar but there could be some edge cases?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is a selection on the jets which we retrieve the their constituents to run soft-drop grooming:

(_run2_miniAOD_ANY | pA_2016 | run3_miniAOD_12X ).toModify(getattr(process,'ak8PFJetsPuppiConstituents'+postfix),
cut = cms.string('pt > 170.0 && abs(rapidity()) < 2.4'))

and then a pt > 100 selection to store slimmedJetsAK8:

getattr(process,"selectedPatJetsAK8Puppi"+postfix).cut = cms.string("pt > 100")

so we can still have AK8 jets in the forward region as I cannot find any explicit eta cut for AK8 puppi jets in CMSSW.

Copy link
Contributor

Choose a reason for hiding this comment

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

OK I see -- then please keep this abs(eta) <= 2.5 cut.
Thanks a lot for the clarification, @nurfikri89 !

candIdxDoc = cms.string("Index in the PFCand table"),
jets = fatJetTable.src,
candidates = pfCandidatesTable.src,
jetCut = cms.string("")
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it be better to use

Suggested change
jetCut = cms.string("")
jetCut = fatJetTable.cut

to ensure consistency? It does not matter now as both finalJetsAK8 and fatJetTable apply pt > 170, but just to be on the safe side.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will correct this also.

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-46012/41861

@cmsbuild
Copy link
Contributor

Pull request #46012 was updated. @cmsbuild, @ftorrresd, @hqucms can you please check and sign again.

@hqucms
Copy link
Contributor

hqucms commented Sep 20, 2024

please test

@cmsbuild
Copy link
Contributor

+1

Size: This PR adds an extra 24KB to repository
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-78c0c1/41660/summary.html
COMMIT: 7797075
CMSSW: CMSSW_14_2_X_2024-09-19-2300/el8_amd64_gcc12
Additional Tests: NANO
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/46012/41660/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: 94 differences found in the comparisons
  • DQMHistoTests: Total files compared: 44
  • DQMHistoTests: Total histograms compared: 3331158
  • DQMHistoTests: Total failures: 5130
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3326008
  • DQMHistoTests: Total skipped: 20
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 11.28 KiB( 43 files compared)
  • DQMHistoSizes: changed ( 11634.0,... ): 0.705 KiB Physics/NanoAODDQM
  • Checked 193 log files, 163 edm output root files, 44 DQM output files
  • TriggerResults: no differences found

NANO Comparison Summary

Summary:

  • You potentially added 47 lines to the logs
  • ROOTFileChecks: Some differences in event products or their sizes found
  • Reco comparison results: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 21
  • DQMHistoTests: Total histograms compared: 55132
  • DQMHistoTests: Total failures: 0
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 55132
  • DQMHistoTests: Total skipped: 0
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 8.459999999999999 KiB( 20 files compared)
  • DQMHistoSizes: changed ( 2500.001,... ): 0.705 KiB Physics/NanoAODDQM
  • Checked 102 log files, 58 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 2.947 2.841 0.105 ( +3.7% ) 3.11 3.13 -0.3% 6.048 6.041
2500.002 3.057 2.955 0.102 ( +3.4% ) 2.57 2.79 -7.9% 6.414 6.377
2500.003 3.000 2.901 0.099 ( +3.4% ) 2.90 2.90 +0.1% 6.355 6.363
2500.011 1.536 1.493 0.044 ( +2.9% ) 4.85 4.84 +0.2% 2.141 2.411
2500.012 2.032 1.959 0.073 ( +3.7% ) 2.92 2.94 -0.9% 2.187 2.602
2500.013 1.876 1.809 0.067 ( +3.7% ) 4.16 4.15 +0.3% 2.208 2.509
2500.021 0.022 0.022 0.000 ( +0.0% ) 0.97 0.96 +1.8% 2.227 2.225
2500.022 0.022 0.022 0.000 ( +0.0% ) 0.94 0.93 +0.9% 2.235 2.227
2500.023 0.022 0.022 0.000 ( +0.0% ) 0.93 0.93 +0.4% 2.201 2.181
2500.024 0.022 0.022 0.000 ( +0.0% ) 0.71 0.70 +1.8% 2.235 2.329
2500.031 0.035 0.035 0.000 ( +0.0% ) 0.87 0.86 +1.1% 2.353 2.322
2500.032 0.036 0.036 0.000 ( +0.0% ) 0.89 0.89 +0.4% 2.340 2.291
2500.033 0.037 0.037 0.000 ( +0.0% ) 0.81 0.79 +1.9% 2.378 2.381
2500.034 0.036 0.036 0.000 ( +0.0% ) 0.81 0.82 -0.1% 2.352 2.349
2500.101 2.746 2.660 0.086 ( +3.2% ) 9.02 9.06 -0.4% 6.293 6.281
2500.111 1.390 1.342 0.048 ( +3.6% ) 19.31 19.72 -2.1% 2.223 2.229
2500.112 1.808 1.749 0.059 ( +3.4% ) 13.90 14.45 -3.8% 2.148 2.110
2500.131 0.747 0.747 0.000 ( +0.0% ) 18.53 18.16 +2.1% 1.485 1.505
2500.201 2.572 2.490 0.081 ( +3.3% ) 7.69 7.68 +0.1% 5.528 5.520
2500.211 1.714 1.612 0.102 ( +6.3% ) 17.65 17.49 +0.9% 2.115 2.113
2500.212 2.109 2.055 0.054 ( +2.7% ) 13.43 14.16 -5.2% 2.148 2.136
2500.221 2.003 2.003 0.000 ( +0.0% ) 7.94 7.85 +1.1% 2.445 2.313
2500.222 3.299 3.222 0.077 ( +2.4% ) 7.66 7.62 +0.5% 2.386 2.343
2500.223 8.986 8.909 0.077 ( +0.9% ) 2.62 2.64 -1.0% 2.158 2.337
2500.224 5.757 5.680 0.077 ( +1.4% ) 0.60 0.58 +4.8% 1.962 2.150
2500.225 5.775 5.698 0.077 ( +1.3% ) 0.59 0.58 +1.2% 1.954 2.000
2500.226 3.065 2.988 0.077 ( +2.6% ) 7.61 7.49 +1.5% 2.316 2.343
2500.227 1.437 1.437 0.000 ( +0.0% ) 12.05 12.10 -0.4% 1.318 1.405
2500.231 1.403 1.403 0.000 ( +0.0% ) 13.61 13.87 -1.9% 1.674 1.944
2500.232 2.314 2.260 0.054 ( +2.4% ) 13.78 13.26 +3.9% 2.036 2.015
2500.233 4.761 4.707 0.054 ( +1.2% ) 4.26 4.25 +0.2% 2.055 1.786
2500.234 3.469 3.415 0.054 ( +1.6% ) 0.76 0.76 -0.0% 1.859 1.847
2500.235 3.481 3.426 0.054 ( +1.6% ) 0.75 0.74 +1.2% 1.891 1.511
2500.236 2.161 2.107 0.054 ( +2.6% ) 14.02 13.12 +6.9% 2.083 2.007
2500.237 1.016 1.016 0.000 ( +0.0% ) 16.20 16.45 -1.5% 1.235 1.239
2500.241 9.404 9.404 0.000 ( +0.0% ) 2.82 2.73 +3.3% 1.817 1.786
2500.242 10.331 10.331 0.000 ( +0.0% ) 0.82 0.85 -2.6% 1.651 1.616
2500.243 2.712 2.712 0.000 ( +0.0% ) 8.47 8.28 +2.3% 1.074 0.814
2500.244 485.976 485.976 0.000 ( +0.0% ) 0.53 0.58 -7.8% 1.660 1.675
2500.245 823.202 823.202 0.000 ( +0.0% ) 0.76 0.76 -0.2% 1.653 1.662
2500.901 1.777 1.777 0.000 ( +0.0% ) 21.78 21.84 -0.3% 1.834 1.829
2500.902 1.626 1.626 0.000 ( +0.0% ) 22.36 21.83 +2.4% 1.740 1.706
2500.911 13.995 13.995 0.000 ( +0.0% ) 1.05 3.80 -72.4% 1.097 1.099
2500.912 0.199 0.438 -0.239 ( -54.5% ) 1.25 1.56 -19.7% 0.972 0.968
2500.913 0.110 0.110 0.000 ( +0.0% ) 1.17 1.11 +5.0% 0.967 0.975

@hqucms
Copy link
Contributor

hqucms commented Sep 20, 2024

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

@mandrenguyen
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit 19951ad into cms-sw:master Sep 21, 2024
13 checks passed
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.

5 participants