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

L1 matching module for VBF+dijet HLT #41004

Merged
merged 1 commit into from
Mar 18, 2023

Conversation

portalesHEP
Copy link
Contributor

PR description:

This PR introduces a new matching module for the VBF+dijet trigger that would be implemented in the VBF parking proposal. It based on the already existing L1 VBF jet matching modules that was limited to "3 jet" matching, but here allowing to match 4 to 6 jets.

PR validation:

The module has been implemented and tested with the paths introduced in the menu /users/lportale/VBFparking_13_0_0_pre4/V29.

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 9, 2023

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-41004/34520

  • This PR adds an extra 12KB to repository

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

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 9, 2023

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-41004/34526

  • This PR adds an extra 16KB to repository

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 9, 2023

A new Pull Request was created by @portalesHEP (Louis Portales) for master.

It involves the following packages:

  • RecoTauTag/HLTProducers (hlt)

@cmsbuild, @missirol, @Martin-Grunewald can you please review it and eventually sign? Thanks.
@silviodonato, @missirol, @azotz, @mbluj 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

@missirol
Copy link
Contributor

missirol commented Mar 9, 2023

Will send review comments by the end of the week.

@missirol
Copy link
Contributor

@portalesHEP

In my opinion, the new plugin is too similar to the old one (e.g. the configuration parameters are identical).

I think it would be better to extend L1TJetsMatching adding an option to support this new use case, e.g.

selection = cms.string("VBFPlus2CentralJets")

, where the default value of "selection" (name tbd) would correspond to the current behaviour of L1TJetsMatching.

Could you please update the PR accordingly?

@missirol
Copy link
Contributor

@portalesHEP

For what I understand from CMSHLT-2702, the latter can be implemented only once (1) the backport of this PR is integrated in CMSSW_13_0_X, (2) a new CMSSW_13_0_X release is built, and (3) said release is parsed in ConfDB to make the new/updated plugin available in ConfDB.

Since this will take several days, this PR needs to converge very soon, if CMSHLT-2702 is targeting the version "V1.0" of the 2023 HLT menu.

@portalesHEP
Copy link
Contributor Author

Thanks for the suggestion @missirol ! The new module has been merged to L1TJetsMatching. It did not seem to me that a dedicated flag was needed, so I did not implement one. The module has been re-tested in the context of the VBF parking studies, with all the versions (TwoJets, ... , SixJets) working as intended. Let me know if you think a flag should still be added to differenciate between the "old" and "new" matchings, I'll try to add it as fast as possible.

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-41004/34588

  • This PR adds an extra 12KB to repository

  • Found files with invalid states:

    • RecoTauTag/HLTProducers/src/L1TPFJetsMatchingVBFPlus2CentralJets.cc:
    • RecoTauTag/HLTProducers/interface/L1TJetsMatchingVBFPlus2CentralJets.h:

Comment on lines 235 to 246
output = categorise(*pfMatchedJets, pt1Min_, pt2Min_, pt3Min_, mjjMin_);
unique_ptr<std::vector<T>> output1(new std::vector<T>(output.first));
unique_ptr<std::vector<T>> output2(new std::vector<T>(output.second));
unique_ptr<std::vector<T>> output1(new std::vector<T>(std::get<0>(output)));
unique_ptr<std::vector<T>> output2(new std::vector<T>(std::get<1>(output)));
unique_ptr<std::vector<T>> output3(new std::vector<T>(std::get<2>(output)));
unique_ptr<std::vector<T>> output4(new std::vector<T>(std::get<3>(output)));
unique_ptr<std::vector<T>> output5(new std::vector<T>(std::get<4>(output)));

iEvent.put(std::move(output1), "TwoJets");
iEvent.put(std::move(output2), "ThreeJets");
iEvent.put(std::move(output3), "FourJets");
iEvent.put(std::move(output4), "FiveJets");
iEvent.put(std::move(output5), "SixJets");
Copy link
Contributor

Choose a reason for hiding this comment

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

This does not follow the suggestion in #41004 (comment).

The idea is to leave the current behaviour of the module unchanged, and add a parameter (e.g. selectionMode) to steer the behaviour of the plugin, along the lines of the following pseudo-code

if (selectionMode_ == "VBF") { // default behaviour

  output = categoriseVBF(*pfMatchedJets, pt1Min_, pt2Min_, pt3Min_, mjjMin_);
  unique_ptr<std::vector<T>> output1(new std::vector<T>(output.first));
  unique_ptr<std::vector<T>> output2(new std::vector<T>(output.second));
  iEvent.put(std::move(output1), "TwoJets");
  iEvent.put(std::move(output2), "ThreeJets");
}
else if (selectionMode_ == "VBFPlus2CentralJets") {

  output = categoriseVBFPlus2CentralJets(*pfMatchedJets, pt1Min_, pt2Min_, pt3Min_, mjjMin_);
  unique_ptr<std::vector<T>> output1(new std::vector<T>(std::get<0>(output)));
  unique_ptr<std::vector<T>> output2(new std::vector<T>(std::get<1>(output)));
  unique_ptr<std::vector<T>> output3(new std::vector<T>(std::get<2>(output)));

  iEvent.put(std::move(output1), "FourJets");
  iEvent.put(std::move(output2), "FiveJets");
  iEvent.put(std::move(output3), "SixJets");
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Flag is now introduced, and preserves original functionality when default value is used. Re-tested in the context of VBF parking studies with no apparent changes in the results

@cmsbuild
Copy link
Contributor

Pull request #41004 was updated. @cmsbuild, @missirol, @Martin-Grunewald can you please check and sign again.

@missirol
Copy link
Contributor

Thanks for the suggestion @missirol ! The new module has been merged to L1TJetsMatching. It did not seem to me that a dedicated flag was needed, so I did not implement one. The module has been re-tested in the context of the VBF parking studies, with all the versions (TwoJets, ... , SixJets) working as intended. Let me know if you think a flag should still be added to differenciate between the "old" and "new" matchings, I'll try to add it as fast as possible.

Sorry, I saw this after my latest review comment. It's better to have the flag to keep the current behaviour unchanged; otherwise the modules in the current HLT will do more work than they should (and produce output collections that would not be used). Thanks in advance for addressing the comment.

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-41004/34624

  • This PR adds an extra 12KB to repository

@cmsbuild
Copy link
Contributor

Pull request #41004 was updated. @cmsbuild, @missirol, @Martin-Grunewald can you please check and sign again.

@missirol
Copy link
Contributor

please test

@portalesHEP , looks okay to me. Thanks for addressing comments quickly. Please make sure the latest version of this PR works as intended for your use case (e.g. CMSHLT-2702), since the PR tests won't really test the new functionalities of the plugin.

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-2f4c7e/31270/summary.html
COMMIT: 72149dd
CMSSW: CMSSW_13_1_X_2023-03-14-1100/el8_amd64_gcc11
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/41004/31270/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • You potentially removed 19 lines from the logs
  • Reco comparison results: 4 differences found in the comparisons
  • DQMHistoTests: Total files compared: 49
  • DQMHistoTests: Total histograms compared: 3550756
  • DQMHistoTests: Total failures: 4
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3550730
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 48 files compared)
  • Checked 213 log files, 164 edm output root files, 49 DQM output files
  • TriggerResults: no differences found

@missirol
Copy link
Contributor

+hlt

  • extends an existing producer used at HLT, without changing its default behaviour, and without changing the results of the current Run-3 HLT menu

@missirol
Copy link
Contributor

hold

@portalesHEP , please let us know if you verified that the latest version of this PR works as intended.

@cmsbuild
Copy link
Contributor

Pull request has been put on hold by @missirol
They need to issue an unhold command to remove the hold state or L1 can unhold it for all

@portalesHEP
Copy link
Contributor Author

@portalesHEP , please let us know if you verified that the latest version of this PR works as intended.

Sorry for the delay, I have been having issues with condor this morning. I am not expecting any particular issues from quick interactive tests,and I should be able to confirm with more confidence by the end of the day hopefully

@missirol
Copy link
Contributor

@portalesHEP , kind ping on this PR.

for (unsigned int j = i + 1; j < pfMatchedJets.size(); j++) {
const T& myJet2 = (pfMatchedJets)[j];

const double mjj_test = (myJet1.p4() + myJet2.p4()).M();
Copy link
Contributor

Choose a reason for hiding this comment

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

To improve performance, you could replace M() with M2() (even in another cleanup PR):

Suggested change
const double mjj_test = (myJet1.p4() + myJet2.p4()).M();
const double mjj_test = (myJet1.p4() + myJet2.p4()).M();
Suggested change
const double mjj_test = (myJet1.p4() + myJet2.p4()).M();
const double m2jj_test = (myJet1.p4() + myJet2.p4()).M2();

@portalesHEP
Copy link
Contributor Author

again sorry for the delays. I could run some tests and everything seems to run as expected.

@missirol
Copy link
Contributor

unhold

I'm taking #41004 (comment) as validation of this PR by the proponents.

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

@perrotta
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.

4 participants