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

Add support for adding variable-size attributes (std::vector) within objects for NanoAOD #46702

Merged

Conversation

patinkaew
Copy link
Contributor

PR description:

Add support for adding variable-size attributes (std::vector) within objects for NanoAOD. Presented at XPOG meeting on 13.11.2024. In addition, after the presentation, lazy evaluation functionality has been added.

Tested mainly in context of ScoutingNano, but this functionality is generic and can be useful for any custom NanoAOD. Hence, we decided to make this PR with only variable-size attributes support in NanoAOD. For usage in ScoutingNano, we will prepare another PR later after discussion with scouting group.

PR validation:

Tested with ScoutingNano (for ScoutingMuon and ScoutingElectron) with workflow 2500.227(RelValTTbar/2024/MINIAODSIM) and 2500.237 (ScoutingPFRun3/2024D/HLTSCOUT) as presented in the slide.

For lazy evaluation, test with workflow 2500.237 by setting ScoutingMuon's hitPattern variable with lazyEval=True. The output step2.root looks the same as output step2.root when setting lazyEval=False.

Pass all tests when running: scram b runtests use-ibeos

Pass    0s ... CommonTools/Utils/ExprEvalPopen_t
Pass   12s ... CommonTools/Utils/ExpressionEvaluatorUnitTest
Pass    7s ... CommonTools/Utils/testCommonToolsUtil
Pass    3s ... CommonTools/Utils/testCommonToolsUtilThreaded
Pass    0s ... CommonTools/Utils/testDynArray
Pass   17s ... CommonTools/Utils/testExpressionEvaluator
Pass   15s ... PhysicsTools/NanoAOD/testPhysicsToolsNanoAODTP
>> Test sequence completed for CMSSW CMSSW_14_2_0_pre3

When running runTheMatrix.py -l limited -i all --ibeos, some workflows failed due to file open errors. Tested 3 times and got the similar file open errors.

45 41 39 35 17 1 1 1 1 1 1 tests passed, 1 3 0 0 0 0 0 0 0 0 0 failed

Failed workflows are:

  • failed at step-0: 312.0
  • failed at step-1: 25202.0, 14234.0, 250202.181
    which are all due to file open errors.

If this PR is a backport please specify the original PR and why you need to backport that PR. If this PR will be backported please specify to which release cycle the backport is meant for:

This is not a backport and there is no plan for a backport.

…pleCollectionFlatTableProducer as an extension to SimpleFlatTableProducer to handle collection attributes of objects
@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 14, 2024

cms-bot internal usage

@cmsbuild
Copy link
Contributor

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-46702/42652

Code check has found code style and quality issues which could be resolved by applying following patch(s)

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

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

It involves the following packages:

  • CommonTools/Utils (reconstruction)
  • PhysicsTools/NanoAOD (xpog)

@cmsbuild, @ftorrresd, @hqucms, @jfernan2, @mandrenguyen can you please review it and eventually sign? Thanks.
@AnnikaStein, @gpetruc, @missirol 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

Size: This PR adds an extra 12KB to repository
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-2cde3c/42887/summary.html
COMMIT: a71d8ca
CMSSW: CMSSW_14_2_X_2024-11-15-1100/el8_amd64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/46702/42887/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

@jfernan2
Copy link
Contributor

enable nano

@jfernan2
Copy link
Contributor

please test

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

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

@@ -3,6 +3,8 @@
#include "DataFormats/Candidate/interface/Candidate.h"
typedef SimpleFlatTableProducer<reco::Candidate> SimpleCandidateFlatTableProducer;

typedef SimpleCollectionFlatTableProducer<reco::Candidate> SimpleCandidateCollectionFlatTableProducer;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Generic producer based on reco::Candidate for testing this PR.

@ftorrresd
Copy link
Contributor

please test

@cmsbuild
Copy link
Contributor

+1

Size: This PR adds an extra 16KB to repository
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-2cde3c/43380/summary.html
COMMIT: 4245ed3
CMSSW: CMSSW_15_0_X_2024-12-11-0800/el8_amd64_gcc12
Additional Tests: NANO
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/46702/43380/install.sh to create a dev area with all the needed externals and cmssw changes.

  • DAS Queries: The DAS query tests failed, see the summary page for details.

Comparison Summary

Summary:

  • You potentially added 1 lines to the logs
  • Reco comparison results: 4 differences found in the comparisons
  • DQMHistoTests: Total files compared: 46
  • DQMHistoTests: Total histograms compared: 3510017
  • DQMHistoTests: Total failures: 444
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3509553
  • DQMHistoTests: Total skipped: 20
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 45 files compared)
  • Checked 202 log files, 172 edm output root files, 46 DQM output files
  • TriggerResults: no differences found

NANO Comparison Summary

Summary:

  • You potentially removed 724 lines from 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: 74922
  • DQMHistoTests: Total failures: 0
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 74922
  • DQMHistoTests: Total skipped: 0
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 20 files compared)
  • 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 3.076 3.076 0.000 ( +0.0% ) 5.96 5.90 +1.0% 2.522 2.517
2500.002 3.192 3.192 0.000 ( +0.0% ) 5.35 5.31 +0.7% 2.948 2.948
2500.003 3.133 3.133 0.000 ( +0.0% ) 5.59 5.52 +1.2% 2.932 2.923
2500.011 1.644 1.644 0.000 ( +0.0% ) 9.08 9.39 -3.3% 2.599 2.598
2500.012 2.184 2.184 0.000 ( +0.0% ) 5.60 5.53 +1.2% 2.785 2.792
2500.013 1.999 1.999 0.000 ( +0.0% ) 7.75 7.75 +0.1% 2.699 2.701
2500.021 0.022 0.022 0.000 ( +0.0% ) 1.78 2.01 -11.7% 2.575 2.568
2500.022 0.022 0.022 0.000 ( +0.0% ) 1.74 1.91 -8.8% 2.566 2.566
2500.023 0.022 0.022 0.000 ( +0.0% ) 1.71 1.83 -6.5% 2.434 2.437
2500.024 0.022 0.022 0.000 ( +0.0% ) 1.25 1.49 -16.2% 2.672 2.678
2500.031 0.035 0.035 0.000 ( +0.0% ) 1.45 1.72 -15.7% 2.648 2.637
2500.032 0.036 0.036 0.000 ( +0.0% ) 1.41 1.73 -18.6% 2.599 2.599
2500.033 0.037 0.037 0.000 ( +0.0% ) 1.47 1.63 -9.8% 2.675 2.684
2500.034 0.036 0.036 0.000 ( +0.0% ) 1.44 1.65 -12.8% 2.654 2.658
2500.101 2.809 2.809 0.000 ( +0.0% ) 14.56 15.58 -6.6% 2.611 2.607
2500.111 1.462 1.462 0.000 ( +0.0% ) 26.46 29.75 -11.1% 2.309 2.295
2500.112 1.882 1.882 0.000 ( +0.0% ) 22.56 24.22 -6.9% 2.378 2.378
2500.131 0.747 0.747 0.000 ( +0.0% ) 34.52 36.06 -4.3% 1.497 1.494
2500.201 2.638 2.638 0.000 ( +0.0% ) 12.72 12.31 +3.3% 2.175 2.173
2500.211 1.805 1.805 0.000 ( +0.0% ) 24.08 25.34 -5.0% 2.371 2.371
2500.212 2.201 2.201 0.000 ( +0.0% ) 17.45 21.36 -18.3% 2.459 2.462
2500.221 2.037 2.037 0.000 ( +0.0% ) 13.11 13.90 -5.7% 2.088 2.084
2500.222 3.439 3.439 0.000 ( +0.0% ) 11.40 12.93 -11.8% 2.182 2.180
2500.223 9.405 9.405 0.000 ( +0.0% ) 3.82 4.11 -7.2% 2.253 2.258
2500.224 6.265 6.265 0.000 ( +0.0% ) 1.32 1.29 +2.0% 2.195 2.233
2500.225 6.312 6.312 0.000 ( +0.0% ) 1.23 1.21 +1.9% 2.412 2.454
2500.226 3.133 3.133 0.000 ( +0.0% ) 12.78 13.46 -5.1% 2.179 2.173
2500.227 1.437 1.437 0.000 ( +0.0% ) 22.41 22.42 -0.0% 1.432 1.425
2500.231 1.455 1.455 0.000 ( +0.0% ) 21.33 22.05 -3.2% 2.257 2.261
2500.232 2.461 2.461 0.000 ( +0.0% ) 19.82 20.20 -1.9% 2.372 2.368
2500.233 4.953 4.953 0.000 ( +0.0% ) 5.70 5.81 -1.9% 2.445 2.439
2500.234 3.841 3.841 0.000 ( +0.0% ) 1.69 1.62 +4.5% 2.164 2.410
2500.235 3.873 3.873 0.000 ( +0.0% ) 1.60 1.53 +4.5% 2.355 2.606
2500.236 2.251 2.251 0.000 ( +0.0% ) 20.73 21.15 -2.0% 2.367 2.370
2500.237 1.016 1.016 0.000 ( +0.0% ) 33.16 31.57 +5.0% 1.435 1.439
2500.241 9.404 9.404 0.000 ( +0.0% ) 7.70 6.41 +20.1% 1.892 1.895
2500.242 10.331 10.331 0.000 ( +0.0% ) 1.56 1.47 +5.9% 1.689 1.690
2500.243 2.712 2.712 0.000 ( +0.0% ) 15.66 14.67 +6.8% 1.048 1.052
2500.244 486.016 486.016 0.000 ( +0.0% ) 1.10 0.99 +11.0% 1.663 1.670
2500.245 826.413 826.413 0.000 ( +0.0% ) 1.46 1.33 +10.0% 1.641 1.649
2500.901 1.778 1.778 0.000 ( +0.0% ) 43.35 36.78 +17.8% 1.409 1.409
2500.902 1.628 1.628 0.000 ( +0.0% ) 44.90 40.62 +10.5% 1.302 1.304
2500.911 14.041 14.041 0.000 ( +0.0% ) 8.29 7.28 +13.8% 1.068 1.068
2500.912 0.150 0.729 -0.579 ( -79.4% ) 2.42 2.31 +5.2% 0.830 0.837
2500.913 0.110 0.110 0.000 ( +0.0% ) 2.41 1.92 +25.7% 0.834 0.836

@patinkaew
Copy link
Contributor Author

Dear @ftorrresd and @jfernan2,

Sorry for pining you. Based on the latest test, I don't notice any problems. The code complies with added generic producer for reco::Candidate. The size of all relval nano workflows are the same as expected, except 2500.912. I tried to look into the actual workflow to see why, but this workflow seems to produce different event size for reference differently across the test runs, so maybe this is ok. There is no large changes in diff rate, either.

Do you have any further comments? Could you please check and please consider signing the PR if everything looks ok to you?

Best,
Patin

@jfernan2
Copy link
Contributor

+1

@patinkaew
Copy link
Contributor Author

Dear @ftorrresd,

Hope you had a good vacation. I'm sorry for pinging you. Do you think you can check this PR and kindly sign if you don't have further comments?

Best,
Patin

@ftorrresd
Copy link
Contributor

+1

@cmsbuild
Copy link
Contributor

cmsbuild commented Jan 7, 2025

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

@mandrenguyen
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit 6eea5fa into cms-sw:master Jan 9, 2025
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.

6 participants