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

Fixing a BS Issue affecting the Egamma HLT #19884

Merged
merged 3 commits into from Jul 29, 2017

Conversation

Sam-Harper
Copy link
Contributor

@Sam-Harper Sam-Harper commented Jul 24, 2017

Dear All,

The online beamspot issues persist and this is impacting data taking efficiency for electrons. As such I have added more flexibility to the E/gamma code to deal with this. We now have various options available to us for tracking regions.

  1. use the primary vertex +/- X (existing)
  2. use the beamspot z +/- N*sigmaZ (the N being configurable is the new part, it was annoyingly hardcoded to 3
  3. use X+/-Y , eg 0 +/-20cm (my favoured solution however there are currently timing issues)
  4. use the beamspot z+/- N *sigmaZ where sigmaZ has a minimum allowed value, say 5cm

The TSG will decide which one we use, however having the options of all 4 are useful.

We really need this online as soon as possible as we are losing efficiency in electron triggers in a nasty way which is impossible to detect using t&p.

This code does not run at reco, it is HLT exclusive so far. It may well run in RECO in the future.

Validation:

  • run on the DoubleEG dataset of 299480 (about a million events, also includes a triggers which do not use tracking)
    • when used with an existing config, no changes to unprescaled paths are observed which is what I was testing
  • run on 100K Z->ee MC events (83X samples) with the online beamspot forced to have a too small deltaZ
    • the fixes successfully recovered the efficiency

Will run over data as soon possible but this is more the TSG, the MC tests show the code is functioning as expected.

Passes the scramv1 b run tests and runTheMatrix.py -l limited -i all

@Martin-Grunewald

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @Sam-Harper for master.

It involves the following packages:

RecoEgamma/EgammaElectronProducers

@perrotta, @cmsbuild, @slava77, @davidlange6 can you please review it and eventually sign? Thanks.
@rafaellopesdesa, @lgray this is something you requested to watch as well.
@davidlange6 you are the release manager for this.

cms-bot commands are listed here

@slava77
Copy link
Contributor

slava77 commented Jul 24, 2017

The online beamspot issues persist and this is impacting data taking efficiency for electrons

is there a link to slides or HN for this?

@slava77
Copy link
Contributor

slava77 commented Jul 24, 2017

@cmsbuild please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Jul 24, 2017

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/21714/console Started: 2017/07/24 18:16

@Martin-Grunewald
Copy link
Contributor

please test

@Martin-Grunewald
Copy link
Contributor

@Sam-Harper
Please prepare a 92X backport PR as well.

@Sam-Harper
Copy link
Contributor Author

@slava77 the slides are coming.
@Martin-Grunewald will do shortly as soon as those tests complete.

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

Comparison job queued.

@cmsbuild
Copy link
Contributor

Comparison is ready
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-19884/21714/summary.html

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 23
  • DQMHistoTests: Total histograms compared: 2355459
  • DQMHistoTests: Total failures: 231
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 2355062
  • DQMHistoTests: Total skipped: 166
  • DQMHistoTests: Total Missing objects: 0
  • Checked 93 log files, 14 edm output root files, 23 DQM output files

@Martin-Grunewald
Copy link
Contributor

@perrotta @slava77
please have a look and sign

@@ -147,9 +154,16 @@ TrackingRegionsFromSuperClustersProducer(const edm::ParameterSet& cfg,
deltaPhiRegion_ = regionPSet.getParameter<double>("deltaPhiRegion");
deltaEtaRegion_ = regionPSet.getParameter<double>("deltaEtaRegion");
useZInVertex_ = regionPSet.getParameter<bool>("useZInVertex");
useZInBeamspot_ = regionPSet.getParameter<bool>("useZInBeamspot");
useDefaultZ_ = regionPSet.getParameter<bool>("useDefaultZ");
Copy link
Contributor

Choose a reason for hiding this comment

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

useDefaultZ_ is never used as such in the code, and it looks redundant here. And, by the way, it is not even the "default", as it is false by default in the fillDescriptions method.

If you get rid of it, the check implemented now in validateConfigSettings() can simply become

if (useZInVertex_ && useZInBeamspot_) throw ...

And, to follow the flow that doesn't use neither the vertex or the beamspot one can just (more intuitively) set both those two flags as false.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed. I tried to think of a justification for my choice here and I found none. This is better

return GlobalPoint(bsPos.x(),bsPos.y(),bsPos.z());
//return GlobalPoint(bsPos.x(),bsPos.y(),0);

if(useZInBeamspot_){
Copy link
Contributor

@perrotta perrotta Jul 26, 2017

Choose a reason for hiding this comment

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

The comment at line 257-258 is not true any more: now if the vertex collection is empty we fall back to "default" (not beamspot) mode.

Depending on what was your original intention, either modify that comment, or modify the code accordingly (e.g. by defining another bool "verticesHandle->empty()" and put it in OR at L262)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I hate silent fall backs and not sure how this one slipped past me. An exception will now be thrown if the vertex collection is not there and we were expecting it to be. Thanks for the spot

@@ -181,6 +195,11 @@ fillDescriptions(edm::ConfigurationDescriptions& descriptions)
desc.add<double>("deltaPhiRegion",0.4);
desc.add<double>("deltaEtaRegion",0.1);
desc.add<bool>("useZInVertex", false);
Copy link
Contributor

Choose a reason for hiding this comment

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

You coud add a comment here explaining that "useZInVertex" and "useZInVertex" cannot be both true, see https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideConfigurationValidationAndHelp#Adding_Comments

@@ -181,6 +195,11 @@ fillDescriptions(edm::ConfigurationDescriptions& descriptions)
desc.add<double>("deltaPhiRegion",0.4);
desc.add<double>("deltaEtaRegion",0.1);
desc.add<bool>("useZInVertex", false);
desc.add<bool>("useZInBeamspot", true);
desc.add<bool>("useDefaultZ", false);
Copy link
Contributor

Choose a reason for hiding this comment

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

As already said, I would remove this parameter as it is both useless and confusing

if(useZInBeamspot_) nrSetTrue++;
if(useDefaultZ_) nrSetTrue++;
if(nrSetTrue!=1){
throw cms::Exception("InvalidConfiguration") <<" when constructing TrackingRegionsFromSuperClustersProducer there much be exactly one of useZInVertex(="<<useZInVertex_<<") useZInBeampot(="<<useZInBeamspot_<<") useDefaultZ(="<<useDefaultZ_<<") set";
Copy link
Contributor

Choose a reason for hiding this comment

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

(Very minor, but in case you touch this PR you can fix "much" -> "must" in the text...

@@ -181,6 +195,11 @@ fillDescriptions(edm::ConfigurationDescriptions& descriptions)
desc.add<double>("deltaPhiRegion",0.4);
desc.add<double>("deltaEtaRegion",0.1);
desc.add<bool>("useZInVertex", false);
desc.add<bool>("useZInBeamspot", true);
Copy link
Contributor

Choose a reason for hiding this comment

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

You could add a comment here explaining that "useZInVertex" and "useZInVertex" cannot be both true, see https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideConfigurationValidationAndHelp#Adding_Comments

@cmsbuild
Copy link
Contributor

Pull request #19884 was updated. @perrotta, @cmsbuild, @slava77, @davidlange6 can you please check and sign again.

@perrotta
Copy link
Contributor

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Jul 27, 2017

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/21817/console Started: 2017/07/27 13:53

@Martin-Grunewald
Copy link
Contributor

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Jul 28, 2017

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/21844/console Started: 2017/07/28 09:08

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

Comparison job queued.

@cmsbuild
Copy link
Contributor

Comparison is ready
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-19884/21844/summary.html

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 23
  • DQMHistoTests: Total histograms compared: 2376534
  • DQMHistoTests: Total failures: 55018
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 2321350
  • DQMHistoTests: Total skipped: 166
  • DQMHistoTests: Total Missing objects: 0
  • Checked 93 log files, 14 edm output root files, 23 DQM output files

@Sam-Harper
Copy link
Contributor Author

So I see there is a patch release needed for the muons. Could this PR be a part of that please. It does no harm, it gives identical results with existing configs

It also appears on MC to do exactly what I intend it to do

You would have data plots by now but the grid had issues last night and then RAL computing died today

https://indico.cern.ch/event/656640/contributions/2675712/attachments/1500702/2337031/egHLTBSIssue.pdf

@perrotta
Copy link
Contributor

+1
While adding new possibililities to be used in HLT, the default config does not modify what was in the previous version of the code. Jenkins results show no difference, in fact.

@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 requires discussion in the ORP meeting before it's merged. @davidlange6, @smuzaffar

@davidlange6
Copy link
Contributor

merge

@cmsbuild cmsbuild merged commit 8e59646 into cms-sw:master Jul 29, 2017
@Sam-Harper
Copy link
Contributor Author

A little late but here are the slides requested:
https://indico.cern.ch/event/650788/contributions/2677662/attachments/1501123/2337916/egHLTBSIssue310817.pdf

You would be most interested in slide 7 and 17-21

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.

None yet

6 participants