Skip to content

Add filter to skip events without scouting objects in ScoutingNano for ScoutingPFMonitor dataset #47739

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

Merged

Conversation

patinkaew
Copy link
Contributor

PR description:

This PR supersedes cms-sw/cmssw#47302 on filter implementation (Another part on era modifier implemented in cms-sw/cmssw#47302 will be superseded by another PR).

In 2022-24, ScoutingPFMonitor dataset consists of logical-OR of scouting and standard HLT paths. However, only scouting objects are reconstructed on scouting paths. Events passing only standard HLT paths, but not scouting paths, will not contain scouting products. This gives a proper treatment to the issue with EDFilter instead of previous solution introduced in cms-sw/cmssw#46516.

This is not an issue in 2025 following CMSHLT-3089.

For more technical details,

  • this PR adds customisation to add check and skip events without scouting which can be included in cmsDriver.py by adding--customise PhysicsTools/NanoAOD/custom_run3scouting_cff.skipEventsWithoutScouting.
  • this PR adds @ScoutMonitor flavour similar to @Scout with the above customisation added.
  • this PR also removes L1TRAWToDigi sequence (defined in L1TRawToDigi_cff.py) as it contains additional modules not used by ScoutingNano.

PR validation:

Pass all tests from scram b runtests use-ibeos.
Pass all ScoutingNano-related relval_nano workflows from

runTheMatrix.py --ibeos -l 2500.131,2500.227,2500.228,2500.237,2500.238

In addition, several cmsDriver.py commands have been tested on data and MC samples documented in [1].
In brief, concerning data:

  • @Scout works for ScoutingPFRun3 2022-24
  • @ScoutMonitor works for ScoutingPFMonitor 2022-24
  • @ScoutFromMini works for ScoutingPFMonitor 2024 (Scouting objects are in MiniAOD starting in Prompt 2024)
  • @Prompt+@ScoutMonitor works for ScoutingPFMonitor 2023. Input 2022 fails because of Tau.
  • @Prompt+@ScoutFromMiniworks for ScoutingPFMonitor 2024 (Scouting objects are in MiniAOD starting in Prompt 2024)
    Please see commands in [1]. Relevant test results (python config, root, event content, size report, log) are included in [2]. Summary of size report is in [3].

Moreover, since this might be used for prompt reconstruction, to simulate the prompt reconstruction workflow, we ran RunPromptReco.py (with modified n=1000) with the following command:

RunPromptReco.py --scenario ppEra_Run3_2024 --reco --aod --miniaod --nanoaod --dqmio --global-tag 140X_dataRun3_Prompt_v4 --nanoFlavours=@PHYS+@L1+@ScoutMonitor --lfn=fileIn.root

This step reconstructs fileIn.root in RAW tier to RECO, AOD, MINIAOD, NANOAOD, and DQMIO. The output files in RECO, AOD, and MINIAOD have 1000 events while NANOAOD (in NANOAODEDM) has 986 events. This is expected since the filter is applied for NANOAOD.
Finally, merge step is run with

RunMerge.py --mergeNANO --input-files=output_inNANOAOD.root --output-file=output_inNANOAOD_merged.root

The output file is now in final NANOAOD format (TTree with all primitives) and has 986 events. The event content contains standard, L1, and scouting objects as expected (@PHYS+@L1+@ScoutMonitor).

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.

[1] https://codimd.web.cern.ch/PTeusxQURcmBaS7Ilfv9GQ?view
[2] https://cernbox.cern.ch/s/J64vQTyn6J5FgRC
[3] https://docs.google.com/spreadsheets/d/10UFlWqurxMTuXy0HeulFTjbx5lUca9ZeM4CAXkC12Wo/edit?usp=sharing

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 31, 2025

cms-bot internal usage

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-47739/44312

@cmsbuild
Copy link
Contributor

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

It involves the following packages:

  • Configuration/PyReleaseValidation (upgrade, pdmv)
  • PhysicsTools/NanoAOD (xpog)

@AdrianoDee, @Moanwar, @cmsbuild, @DickyChant, @ftorrresd, @hqucms, @miquork, @srimanob, @subirsarkar can you please review it and eventually sign? Thanks.
@Martin-Grunewald, @fabiocos, @gpetruc, @makortel, @missirol, @slomeo 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

@ftorrresd
Copy link
Contributor

enable nano

@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-40fa24/45293/summary.html
COMMIT: 7b71cf5
CMSSW: CMSSW_15_1_X_2025-03-31-1100/el8_amd64_gcc12
Additional Tests: NANO
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/47739/45293/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • You potentially removed 1 lines from the logs
  • Reco comparison results: 6 differences found in the comparisons
  • DQMHistoTests: Total files compared: 50
  • DQMHistoTests: Total histograms compared: 3908474
  • DQMHistoTests: Total failures: 61
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3908393
  • DQMHistoTests: Total skipped: 20
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 49 files compared)
  • Checked 215 log files, 184 edm output root files, 50 DQM output files
  • TriggerResults: no differences found

NANO Comparison Summary

Summary:

  • You potentially removed 2531 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: 23
  • DQMHistoTests: Total histograms compared: 90509
  • DQMHistoTests: Total failures: 0
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 90509
  • DQMHistoTests: Total skipped: 0
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 22 files compared)
  • Checked 113 log files, 65 edm output root files, 23 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.115 3.115 0.000 ( +0.0% ) 6.58 6.49 +1.4% 2.558 2.577
2500.002 3.231 3.231 0.000 ( +0.0% ) 5.87 5.76 +1.9% 2.583 3.005
2500.003 3.172 3.172 0.000 ( +0.0% ) 6.11 6.00 +1.7% 2.587 2.995
2500.011 1.647 1.647 0.000 ( +0.0% ) 10.80 11.04 -2.2% 2.394 2.656
2500.012 2.185 2.185 0.000 ( +0.0% ) 6.13 6.03 +1.5% 2.410 2.849
2500.013 2.002 2.002 0.000 ( +0.0% ) 8.63 8.56 +0.8% 2.441 2.757
2500.021 0.022 0.022 0.000 ( +0.0% ) 1.80 1.86 -3.1% 2.702 2.707
2500.022 0.022 0.022 0.000 ( +0.0% ) 1.68 1.79 -6.3% 2.701 2.706
2500.023 0.022 0.022 0.000 ( +0.0% ) 1.70 1.75 -3.0% 2.563 2.563
2500.024 0.022 0.022 0.000 ( +0.0% ) 1.34 1.47 -8.9% 2.776 2.802
2500.031 0.035 0.035 0.000 ( +0.0% ) 1.50 1.65 -8.7% 2.754 2.761
2500.032 0.036 0.036 0.000 ( +0.0% ) 1.52 1.61 -5.3% 2.732 2.714
2500.033 0.037 0.037 0.000 ( +0.0% ) 1.46 1.54 -4.8% 2.789 2.811
2500.034 0.036 0.036 0.000 ( +0.0% ) 1.48 1.57 -5.8% 2.774 2.794
2500.101 2.872 2.872 0.000 ( +0.0% ) 14.48 15.05 -3.7% 2.601 2.635
2500.111 1.474 1.474 0.000 ( +0.0% ) 26.84 28.29 -5.1% 2.335 2.334
2500.112 1.896 1.896 0.000 ( +0.0% ) 23.33 24.60 -5.2% 2.412 2.410
2500.131 0.750 0.750 0.000 ( +0.0% ) 34.64 36.26 -4.4% 1.503 1.502
2500.201 2.706 2.706 0.000 ( +0.0% ) 12.39 12.31 +0.6% 2.214 2.212
2500.211 1.845 1.845 0.000 ( +0.0% ) 24.49 25.47 -3.8% 2.406 2.408
2500.212 2.243 2.243 0.000 ( +0.0% ) 20.72 21.33 -2.9% 2.492 2.493
2500.221 2.141 2.141 0.000 ( +0.0% ) 12.57 13.55 -7.2% 2.127 2.122
2500.222 3.516 3.516 0.000 ( +0.0% ) 11.97 12.33 -2.9% 2.221 2.219
2500.223 10.328 10.328 0.000 ( +0.0% ) 4.28 4.56 -6.2% 2.390 2.387
2500.224 6.622 6.622 0.000 ( +0.0% ) 1.21 1.18 +1.8% 2.341 2.298
2500.225 6.671 6.671 0.000 ( +0.0% ) 1.14 1.10 +3.7% 2.551 2.495
2500.226 3.210 3.210 0.000 ( +0.0% ) 12.41 13.08 -5.2% 2.216 2.216
2500.227 1.442 1.442 0.000 ( +0.0% ) 22.74 23.31 -2.4% 1.438 1.441
2500.228 4.045 4.045 0.000 ( +0.0% ) 8.62 8.38 +2.8% 2.318 2.315
2500.231 1.516 1.516 0.000 ( +0.0% ) 20.87 21.89 -4.6% 2.313 2.325
2500.232 2.502 2.502 0.000 ( +0.0% ) 20.19 19.83 +1.8% 2.404 2.403
2500.233 5.422 5.422 0.000 ( +0.0% ) 6.83 6.76 +1.1% 2.568 2.563
2500.234 3.928 3.928 0.000 ( +0.0% ) 1.56 1.48 +5.1% 2.481 2.245
2500.235 3.960 3.960 0.000 ( +0.0% ) 1.47 1.39 +5.9% 2.683 2.435
2500.236 2.292 2.292 0.000 ( +0.0% ) 21.58 22.11 -2.4% 2.393 2.394
2500.237 1.018 1.018 0.000 ( +0.0% ) 33.90 32.32 +4.9% 1.452 1.435
2500.238 2.477 2.477 0.000 ( +0.0% ) 16.70 15.71 +6.3% 2.470 2.451
2500.241 9.404 9.404 0.000 ( +0.0% ) 7.42 6.95 +6.8% 1.933 1.929
2500.242 10.331 10.331 0.000 ( +0.0% ) 1.62 1.57 +3.4% 1.728 1.726
2500.243 2.712 2.712 0.000 ( +0.0% ) 15.56 15.02 +3.6% 1.066 1.065
2500.244 486.016 486.016 0.000 ( +0.0% ) 1.13 1.08 +4.7% 1.687 1.688
2500.245 826.413 826.413 0.000 ( +0.0% ) 1.50 1.46 +3.1% 1.678 1.369
2500.251 645.333 645.333 0.000 ( +0.0% ) 1.65 1.57 +4.9% 1.781 1.776
2500.301 0.021 0.021 0.000 ( +0.0% ) 1.71 1.63 +4.5% 2.813 2.810
2500.311 0.036 0.036 0.000 ( +0.0% ) 1.66 1.57 +5.7% 2.764 2.752
2500.901 1.819 1.819 0.000 ( +0.0% ) 42.85 40.54 +5.7% 1.438 1.431
2500.902 1.665 1.665 0.000 ( +0.0% ) 47.70 44.09 +8.2% 1.341 1.336
2500.911 14.345 14.345 0.000 ( +0.0% ) 7.41 8.39 -11.8% 1.091 1.088
2500.912 0.199 0.171 0.028 ( +16.5% ) 4.21 1.81 +132.7% 0.846 0.852
2500.913 0.110 0.110 0.000 ( +0.0% ) 2.49 2.53 -1.4% 0.850 0.848

@silviodonato
Copy link
Contributor

@cms-sw/xpog-l2 @cms-sw/pdmv-l2 @cms-sw/upgrade-l2 do you have any comments?

@Moanwar
Copy link
Contributor

Moanwar commented Apr 3, 2025

+Upgrade

@ftorrresd
Copy link
Contributor

+1

@vlimant
Copy link
Contributor

vlimant commented Apr 7, 2025

is there a 15.0 backport already pending for this ?

@AdrianoDee
Copy link
Contributor

+pdmv

@cmsbuild
Copy link
Contributor

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

@mandrenguyen
Copy link
Contributor

+1

@patinkaew
Copy link
Contributor Author

Hi @vlimant

is there a 15.0 backport already pending for this ?

I just opened a backport PR cms-sw/cmssw#7800. Sorry for a delay.

@vlimant
Copy link
Contributor

vlimant commented Apr 7, 2025

no pb. thanks.

cmsbuild added a commit that referenced this pull request Apr 23, 2025
[15_0_X] Backport of #47739 (Add filter to skip events without scouting objects in ScoutingNano for ScoutingPFMonitor dataset)
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.

8 participants