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

Add Muon L1 to prefire weight producer #33758

Merged
merged 28 commits into from Jun 9, 2021

Conversation

JanFSchulte
Copy link
Contributor

@JanFSchulte JanFSchulte commented May 17, 2021

This PR adds the muon L1 prefiring to the L1PrefireWeightProducer (renamed from L1ECALPrefireWeightProducer).

The prefiring probability has been measured to be 1.5% on average in 2016 up to and including Run G, and about 0.5% afterwards. Corrections for this effect as a function of muon eta and pT are derived and are made available via the usual prefiring weight producer.

The measurement of the effect is is documented in https://indico.cern.ch/event/1027400/contributions/4314164/attachments/2225456/3769418/20210413_L1Prefiring_JSchulte.pdf and the proposal for a correction in https://indico.cern.ch/event/1034615/contributions/4344897/attachments/2237683/3793236/20210503_L1Prefiring_JSchulte.pdf. The proposal, together with a validation of the procedure, will be presented in the PPD General Meeting on 5/20/2021: https://indico.cern.ch/event/1034467/.

The prefire weight producer is changed to produce a common prefire weight including both the ECAL and muon system effects. Individual weights for muons, photons, and jets. While for the ECAL prefiring, an eta-pT map is provided as a histogram, for muons TF1s with an analytical parametrization of the pT dependence in multiple bins of muon eta.

A new ROOT file with these parametrizations is added to the corresponding cms-data repository in this PR: cms-data/PhysicsTools-PatUtils#2

@JanFSchulte
Copy link
Contributor Author

@lathomas fyi

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-33758/22709

  • This PR adds an extra 24KB to repository

@cmsbuild
Copy link
Contributor

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

It involves the following packages:

PhysicsTools/NanoAOD
PhysicsTools/PatUtils

@perrotta, @gouskos, @cmsbuild, @fgolf, @slava77, @jpata, @mariadalfonso can you please review it and eventually sign? Thanks.
@mmarionncern, @gouskos, @swertz, @JyothsnaKomaragiri, @ahinzmann, @schoef, @rappoccio, @jdamgov, @jdolen, @nhanvtran, @gkasieczka, @clelange, @emilbols, @hatakeyamak, @ferencek, @gpetruc, @andrzejnovak, @mariadalfonso, @seemasharmafnal this is something you requested to watch as well.
@silviodonato, @dpiparo, @qliphy you are the release manager for this.

cms-bot commands are listed here

@mariadalfonso
Copy link
Contributor

test parameters:

pull_request = cms-data/PhysicsTools-PatUtils#2

@mariadalfonso
Copy link
Contributor

please test

@cmsbuild
Copy link
Contributor

-1

Failed Tests: UnitTests RelVals RelVals-INPUT
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-e4ab93/15145/summary.html
COMMIT: 9f5c940
CMSSW: CMSSW_12_0_X_2021-05-17-1100/slc7_amd64_gcc900
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/33758/15145/install.sh to create a dev area with all the needed externals and cmssw changes.

Unit Tests

I found errors in the following unit tests:

---> test runtestPhysicsToolsNanoAOD had ERRORS
---> test testTauEmbeddingProducers had ERRORS
---> test TestConfigDP had ERRORS

RelVals

  • 136.8523136.8523_RunJetHT2018C_nanoULremini+RunJetHT2018C_nanoULremini+NANOEDM2018_106Xv2+HARVESTNANOAOD2018_106Xv2/step2_RunJetHT2018C_nanoULremini+RunJetHT2018C_nanoULremini+NANOEDM2018_106Xv2+HARVESTNANOAOD2018_106Xv2.log
  • 136.88811136.88811_RunJetHT2018D_reminiaodUL+RunJetHT2018D_reminiaodUL+REMINIAOD_data2018UL+HARVEST2018_REMINIAOD_data2018UL/step2_RunJetHT2018D_reminiaodUL+RunJetHT2018D_reminiaodUL+REMINIAOD_data2018UL+HARVEST2018_REMINIAOD_data2018UL.log
  • 136.8311136.8311_RunJetHT2017F_reminiaod+RunJetHT2017F_reminiaod+REMINIAOD_data2017+HARVEST2017_REMINIAOD_data2017/step2_RunJetHT2017F_reminiaod+RunJetHT2017F_reminiaod+REMINIAOD_data2017+HARVEST2017_REMINIAOD_data2017.log
Expand to see more relval errors ...

RelVals-INPUT

  • 4.64.6_MinimumBias2010A+MinimumBias2010A+RECOSKIMALCA+HARVESTDR1/step2_MinimumBias2010A+MinimumBias2010A+RECOSKIMALCA+HARVESTDR1.log
  • 136.72411136.72411_RunJetHT2016B_reminiaodUL+RunJetHT2016B_reminiaodUL+REMINIAOD_data2016UL_HIPM+HARVESTDR2_REMINIAOD_data2016UL_HIPM/step2_RunJetHT2016B_reminiaodUL+RunJetHT2016B_reminiaodUL+REMINIAOD_data2016UL_HIPM+HARVESTDR2_REMINIAOD_data2016UL_HIPM.log
  • 136.7611136.7611_RunJetHT2016E_reminiaod+RunJetHT2016E_reminiaod+REMINIAOD_data2016_HIPM+HARVESTDR2_REMINIAOD_data2016_HIPM/step2_RunJetHT2016E_reminiaod+RunJetHT2016E_reminiaod+REMINIAOD_data2016_HIPM+HARVESTDR2_REMINIAOD_data2016_HIPM.log
Expand to see more relval errors ...


//Photons
edm::Handle<std::vector<pat::Photon> > thePhotons;
iEvent.getByToken(photons_token_, thePhotons);
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

if ((dataeraMuon_.find("2016") != std::string::npos) && (eta > 1.24 && eta < 1.6) &&
(phi > 2.44346 && phi < 2.79253)) {
if (parametrizationHotSpot_ == nullptr && !skipwarnings_)
std::cout << "Prefiring parametrization not found, setting prefiring rate to 0 " << eta << " " << phi
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you change the cout to LogError/Warning?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

#Next line will be updated once we get UL2016 maps
run2_jme_2016.toModify( prefiringweight, DataEra = cms.string("2016BtoH"))
run2_jme_2016.toModify( prefiringweight, DataEra = cms.string("2016BtoH"), DataEraMuon = cms.string("2016"))
Copy link
Contributor

Choose a reason for hiding this comment

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

better to redefine DataEra as DataEraEcal

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@bendavid
Copy link
Contributor

Hi,
If I got it right looking at the code, what's implemented here is:
parameterized pt-dependence in bins of eta, with special handling of the "hot spot" region? (and the pt turn-on comes from the L1 efficiency turn-on in the full statistics dataset?)

How is the time-dependence within 2016 handled? For most analyses I think the best would be to provide separate weights for preVFP and postVFP in UL since this is how the MC is split. (Even if the actual measurement is done differently and the final numbers are produced from appropriate lumi-weighted averages)

@JanFSchulte
Copy link
Contributor Author

Hi @bendavid,

yes, the pT turnons are taken from the L1 efficiency measurements and combined with the plateau value obtained in the unprefireable events. We have 11 bins in abs(eta), plus the additional hot spot Laurent found.

We provide a wide range of options for analyzers for the 2016 dataset. In addition to the full year, 2016preVFP, 2016postVFP, 2016 B-G and 2016 H are all available.

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 9, 2021

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-33758/23195

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 9, 2021

Pull request #33758 was updated. @perrotta, @gouskos, @cmsbuild, @fgolf, @slava77, @jpata, @mariadalfonso can you please check and sign again.

@perrotta
Copy link
Contributor

perrotta commented Jun 9, 2021

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 9, 2021

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-e4ab93/15800/summary.html
COMMIT: 1a4b06f
CMSSW: CMSSW_12_0_X_2021-06-08-2300/slc7_amd64_gcc900
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/33758/15800/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
  • ROOTFileChecks: Some differences in event products or their sizes found
  • Reco comparison results: 26 differences found in the comparisons
  • DQMHistoTests: Total files compared: 38
  • DQMHistoTests: Total histograms compared: 2862520
  • DQMHistoTests: Total failures: 1
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 2862497
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 1.304 KiB( 37 files compared)
  • DQMHistoSizes: changed ( 1325.81,... ): 0.652 KiB Physics/NanoAODDQM
  • Checked 160 log files, 37 edm output root files, 38 DQM output files
  • TriggerResults: found differences in 2 / 37 workflows

@perrotta
Copy link
Contributor

perrotta commented Jun 9, 2021

+1

@mariadalfonso
Copy link
Contributor

Wit this PR, we add muon weights on top of the ECAL. ECAL weights are also updated.

Shown here the effect on the ttH mc sample, 2017

This PR updates in master on UL nanov8:
Screen Shot 2021-06-09 at 17 00 03

The 10_6 backport, where we store the old weights
Screen Shot 2021-06-09 at 17 00 17

Before the update, the weights were closer to 1. The decrease seems due to the muon weights
@lathomas and @JanFSchulte @bendavid follow your expectation ?

@JanFSchulte
Copy link
Contributor Author

To me it looks like the additional muon weights do shift the overall weight further away from 1 by a consistent amount in line with my expectation.

@lathomas
Copy link
Contributor

lathomas commented Jun 9, 2021

agreed these numbers seem all reasonable and consistent.

@mariadalfonso
Copy link
Contributor

+xpog

size, branch name and DQM plots consisted with PR description and follow up review
full set of result test here https://gitlab.cern.ch/cms-nanoAOD/nanoAOD-integration/-/issues/91

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 9, 2021

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

@qliphy
Copy link
Contributor

qliphy commented Jun 9, 2021

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

None yet