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

streamline the configuration of TriggerObjectTableProducer #40145

Merged
merged 14 commits into from
Nov 29, 2022

Conversation

vlimant
Copy link
Contributor

@vlimant vlimant commented Nov 24, 2022

PR description:

the initial design of the configuration for TriggerObjectTableProducer is a bit error prone. This is an attempt at making it simpler. Backward compatibility was kept so as to support the V10 configuration without touching it.

PR validation:

elements of the nano matrix function

@vlimant
Copy link
Contributor Author

vlimant commented Nov 24, 2022

@silviodonato your feedback is welcome

@cmsbuild
Copy link
Contributor

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-40145/33137

  • This PR adds an extra 20KB to repository

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

@silviodonato
Copy link
Contributor

Thanks @vlimant , it look much much better now. Adding also @cms-sw/hlt-l2

I think that you could further simplify the configuration to support the manual description in expsel . Eg. From

mksel("max(filter('hltL3fL1sMu*L3Filtered50*'),filter('hltL3fL1sMu*TkFiltered50*'))","1mu (Mu50)")

to

expsel("hltL3fL1sMu*L3Filtered50* OR hltL3fL1sMu*TkFiltered50*","1mu (Mu50)")

In addition, I would prefer to pass a list ["hltL3fL1sMu*L3Filtered50*","hltL3fL1sMu*TkFiltered50*"] instead of "hltL3fL1sMu*L3Filtered50* OR hltL3fL1sMu*TkFiltered50*" (even for a single filter), but it is just matter of taste.

You might even consider to pass everything as a map read by a single function:

qualityBits = cms.VPSet(expsel({
    "L2p5 pixel iso":["hltL2TauIsoFilter"],
    "1mu (Mu50)": ["hltL3fL1sMu*L3Filtered50*","hltL3fL1sMu*TkFiltered50*"]
    "hltEG40HEFilter":["hltEG40HEFilter"],
    "hltEG90HEFilter":["hltEG90HEFilter"],
}))

I see that there are only two "non-standard" formulas:

mksel("min(filter('hltEle32L1DoubleEGWPTightGsfTrackIsoFilter'),filter('hltEGL1SingleEGOrFilter'))","1e (32_L1DoubleEG_AND_L1SingleEGOr)"),
mksel("path('HLT_Ele*PFJet*')","1e (PFJet)"),

I think that both cases are a kind of "abuse" of the NanoAOD trigger object tool:

  • min(filter(...),filter(...)) is simply the AND of two trigger filters, which I think should be kept separated (even if we pay the price of an additional bit)
  • 'HLT_Ele*PFJet*' this can be clearly obtained at analysis level, and then it is a "wasted" bit.

I would stop supporting this kind of non-standard trigger objects formulas.

Btw. Shall this code be compatible to both Run-2 and Run-3, or only Run-3?

@vlimant
Copy link
Contributor Author

vlimant commented Nov 25, 2022

Thanks @silviodonato ; I made a few changes to allow for [] (means OR) or () (means AND) or full expression.
I don't find the top level function practical enough, and would live it to single entry configuration.

That code / configuration does not address yet run II/III issue

@cmsbuild
Copy link
Contributor

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-40145/33143

ERROR: Build errors found during clang-tidy run.

PhysicsTools/NanoAOD/plugins/TriggerObjectTableProducer.cc:119:36: error: reference to non-static member function must be called; did you mean to call it with no arguments? [clang-diagnostic-error]
        if (!qualityBitsFunc.str().empty) {
                                   ^
                                        ()
--
gmake: *** [config/SCRAM/GMake/Makefile.coderules:129: code-checks] Error 2
gmake: *** [There are compilation/build errors. Please see the detail log above.] Error 2

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-40145/33144

  • This PR adds an extra 24KB to repository

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @vlimant (vlimant) for master.

It involves the following packages:

  • PhysicsTools/NanoAOD (xpog)

@cmsbuild, @swertz, @vlimant can you please review it and eventually sign? Thanks.
@gpetruc 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

@vlimant
Copy link
Contributor Author

vlimant commented Nov 29, 2022

please test

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-40145/33182

  • This PR adds an extra 20KB to repository

@cmsbuild
Copy link
Contributor

Pull request #40145 was updated. @swertz, @vlimant can you please check and sign again.

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-f64bb5/29316/summary.html
COMMIT: b753024
CMSSW: CMSSW_13_0_X_2022-11-28-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/40145/29316/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: 23 differences found in the comparisons
  • DQMHistoTests: Total files compared: 48
  • DQMHistoTests: Total histograms compared: 3421159
  • DQMHistoTests: Total failures: 46
  • DQMHistoTests: Total nulls: 53
  • DQMHistoTests: Total successes: 3421038
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 47 files compared)
  • Checked 206 log files, 48 edm output root files, 48 DQM output files
  • TriggerResults: no differences found

NANO Comparison Summary

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 132 differences found in the comparisons
  • DQMHistoTests: Total files compared: 15
  • DQMHistoTests: Total histograms compared: 14933
  • DQMHistoTests: Total failures: 240
  • DQMHistoTests: Total nulls: 98
  • DQMHistoTests: Total successes: 14595
  • DQMHistoTests: Total skipped: 0
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 14 files compared)
  • Checked 31 log files, 0 edm output root files, 15 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.213 2.212 0.000 ( +0.0% ) 9.33 9.33 -0.0% 1.548 1.570
2500.311 2.334 2.333 0.001 ( +0.0% ) 8.88 9.01 -1.4% 1.920 1.942
2500.312 2.288 2.287 0.001 ( +0.0% ) 9.07 9.08 -0.1% 1.908 1.950
2500.33 1.103 1.103 -0.000 ( -0.0% ) 20.79 21.05 -1.2% 1.681 1.682
2500.331 1.403 1.402 0.000 ( +0.0% ) 15.19 15.53 -2.2% 1.844 1.844
2500.332 1.336 1.335 0.001 ( +0.0% ) 17.19 17.38 -1.1% 1.785 1.787
2500.4 2.109 2.107 0.001 ( +0.1% ) 10.07 10.08 -0.2% 1.447 1.483
2500.401 2.136 2.135 0.000 ( +0.0% ) 10.06 10.10 -0.4% 1.262 1.289
2500.5 0.301 0.301 0.000 ( +0.0% ) 51.30 53.73 -4.5% 1.189 1.214
2500.501 0.301 0.301 0.000 ( +0.0% ) 51.54 52.70 -2.2% 1.207 1.233
2500.51 1.075 1.074 0.000 ( +0.0% ) 27.52 28.02 -1.8% 1.448 1.470
2500.511 1.107 1.107 0.000 ( +0.0% ) 26.96 27.09 -0.5% 1.481 1.504
2500.6 1.413 1.413 0.000 ( +0.0% ) 22.86 23.01 -0.6% 1.145 1.175
2500.601 1.445 1.444 0.001 ( +0.1% ) 22.53 22.89 -1.6% 1.174 1.202

@vlimant
Copy link
Contributor Author

vlimant commented Nov 29, 2022

+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)

@vlimant
Copy link
Contributor Author

vlimant commented Nov 29, 2022

backport to 12.6 in #40173

@rappoccio
Copy link
Contributor

+1

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