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

fix L1 candidate matching in HLTMuonL1TFilter #37110

Merged
merged 2 commits into from
Mar 2, 2022

Conversation

JanFSchulte
Copy link
Contributor

(split from #37086)

Fix to the L1 candidate matching in HLTMuonL1TFilter. In this filter a match between L1 muons before and after different filters is performed. Currently the code expects the muons that are compared to be in the same collection. However, there are use cases in the current menu where the matching is performed with a copy of the L1 muon collection and thus always fails. This causes an inefficiency for low pT muons that are reconstructed only by L1-seeded reconstruction steps. Impact is mostly negligible, showing tiny efficiency improvements for high-pT muon from the Z:
image

Effect gets more visible for lower pT muons, for example in the turnon of the double-muon trigger:
image

However, the effect is significant for very low pT leptons. For the muon Bs -> mumu trigger (HLT_DoubleMu4_3_Bs_v14) we find a ~20% improvement of HLT efficiency on a sample of signal events provided by BPH.

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 1, 2022

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-37110/28605

  • This PR adds an extra 16KB to repository

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 1, 2022

A new Pull Request was created by @JanFSchulte (Jan-Frederik Schulte) for master.

It involves the following packages:

  • HLTrigger/Muon (hlt)

@cmsbuild, @missirol, @Martin-Grunewald can you please review it and eventually sign? Thanks.
@Fedespring, @HuguesBrun, @calderona, @silviodonato, @abbiendi, @jhgoh, @Martin-Grunewald, @missirol, @sscruz, @CeliaFernandez, @trocino, @cericeci this is something you requested to watch as well.
@perrotta, @dpiparo, @qliphy you are the release manager for this.

cms-bot commands are listed here

bool matchPrevL1 = false;
int prevSize = prevMuons.size();
for (int it2 = 0; it2 < prevSize; it2++) {
if (deltaR2(muon->eta(), muon->phi(), prevMuons[it2]->eta(), prevMuons[it2]->phi()) < maxDR_)
Copy link
Contributor

@missirol missirol Mar 1, 2022

Choose a reason for hiding this comment

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

General comment: there is some ambiguity in "deltaR vs deltaR2" (the parameter name suggests it's for DeltaR, while the actual cut is on DeltaR2). As done already here, the actual cut should be on DeltaR^2. My suggestion is
to mimic how this is handled here, reading the "maxDeltaR" value from the configuration, checking that it is positive, and then using the maxDeltaR2 value for the cut. Please also change maxDR to maxDeltaR to improve clarity.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, I have implemented it according to the suggestion.

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 1, 2022

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-37110/28607

  • This PR adds an extra 16KB to repository

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 1, 2022

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

Copy link
Contributor

@missirol missirol left a comment

Choose a reason for hiding this comment

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

Here's the (short) review.


//make sure cut parameter for candidate matching is
if (maxDR_ <= 0.) {
throw cms::Exception("HLTPFJetsMatchedToFilteredJetsProducerConfiguration")
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
throw cms::Exception("HLTPFJetsMatchedToFilteredJetsProducerConfiguration")
throw cms::Exception("HLTMuonL1TFilterConfiguration")

@@ -38,7 +41,11 @@ HLTMuonL1TFilter::HLTMuonL1TFilter(const edm::ParameterSet& iConfig)
// }
qualityBitMask_ |= 1 << selectQualitie;
}

//make sure cut parameter for candidate matching is
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
//make sure cut parameter for candidate matching is
//make sure cut parameter for candidate matching is strictly positive

Comment on lines 124 to 126
if (deltaR2(muon->eta(), muon->phi(), prevMuons[it2]->eta(), prevMuons[it2]->phi()) < maxDR2_)
matchPrevL1 = true;
break;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if (deltaR2(muon->eta(), muon->phi(), prevMuons[it2]->eta(), prevMuons[it2]->phi()) < maxDR2_)
matchPrevL1 = true;
break;
if (deltaR2(muon->eta(), muon->phi(), prevMuons[it2]->eta(), prevMuons[it2]->phi()) < maxDR2_) {
matchPrevL1 = true;
break;
}

Careful with brackets :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yikes, I am really not awake enough today to code. Fix incoming...

Copy link
Contributor

Choose a reason for hiding this comment

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

@JanFSchulte , while you are at it, consider squashing into 1 commit (optional).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, done.

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 1, 2022

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-37110/28610

  • This PR adds an extra 16KB to repository

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 1, 2022

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

@missirol
Copy link
Contributor

missirol commented Mar 1, 2022

type bugfix

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 2, 2022

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-37110/28628

  • This PR adds an extra 16KB to repository

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 2, 2022

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

@Martin-Grunewald
Copy link
Contributor

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 2, 2022

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-7c0076/22768/summary.html
COMMIT: e335344
CMSSW: CMSSW_12_3_X_2022-03-01-2300/slc7_amd64_gcc10
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/37110/22768/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: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 49
  • DQMHistoTests: Total histograms compared: 4000857
  • DQMHistoTests: Total failures: 2
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 4000833
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 48 files compared)
  • Checked 204 log files, 45 edm output root files, 49 DQM output files
  • TriggerResults: no differences found

@missirol
Copy link
Contributor

missirol commented Mar 2, 2022

+hlt

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 2, 2022

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

@perrotta
Copy link
Contributor

perrotta commented Mar 2, 2022

+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