-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Backport of Muon L1 prefire weights #33759
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
Changes from 17 commits
f475bcb
3db916c
4f60410
50f940b
2fac91c
447aafc
d752ac6
97c3c7c
67afdb9
de785c4
34fdaef
c7471ec
fd55306
3c05ba7
16ca043
9a4afae
5a0e55d
6267072
c848b76
991fa3b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,6 @@ | ||
| import FWCore.ParameterSet.Config as cms | ||
| from Configuration.Eras.Modifier_run2_HLTconditions_2016_cff import run2_HLTconditions_2016 | ||
| from Configuration.Eras.Modifier_run2_HLTconditions_2017_cff import run2_HLTconditions_2017 | ||
| from Configuration.Eras.Modifier_run2_miniAOD_80XLegacy_cff import run2_miniAOD_80XLegacy | ||
| from PhysicsTools.NanoAOD.common_cff import ExtVar | ||
| from PhysicsTools.NanoAOD.nano_eras_cff import * | ||
| from PhysicsTools.NanoAOD.common_cff import * | ||
| import copy | ||
|
|
||
| unpackedPatTrigger = cms.EDProducer("PATTriggerObjectStandAloneUnpacker", | ||
|
|
@@ -218,19 +216,47 @@ | |
| selections = selections2016 | ||
| ) | ||
|
|
||
| from PhysicsTools.PatUtils.L1ECALPrefiringWeightProducer_cff import prefiringweight | ||
| run2_HLTconditions_2016.toModify(prefiringweight, DataEra = cms.string("2016BtoH")) | ||
| from PhysicsTools.PatUtils.L1PrefiringWeightProducer_cff import prefiringweight | ||
| #Next line will be updated once we get UL2016 maps | ||
| (run2_muon_2016 & tracker_apv_vfp30_2016).toModify( prefiringweight, DataEraECAL = cms.string("UL2016preVFP"), DataEraMuon = cms.string("2016preVFP")) | ||
| (run2_muon_2016 & ~tracker_apv_vfp30_2016).toModify( prefiringweight, DataEraECAL = cms.string("UL2016postVFP"), DataEraMuon = cms.string("2016postVFP")) | ||
| #Next line is for UL2017 maps | ||
| run2_jme_2017.toModify( prefiringweight, DataEraECAL = cms.string("UL2017BtoF"), DataEraMuon = cms.string("20172018")) | ||
| #Next line is for UL2018 maps | ||
| run2_muon_2018.toModify( prefiringweight, DataEraECAL = cms.string("None"), DataEraMuon = cms.string("20172018")) | ||
|
|
||
| #For pre-UL 2017 reprocessing, one should use the original maps and no muon jet protection | ||
| for modifier in run2_nanoAOD_94XMiniAODv1, run2_nanoAOD_94XMiniAODv2: | ||
| modifier.toModify( prefiringweight, DataEraECAL = cms.string("2017BtoF"), DataEraMuon = cms.string("20172018")) | ||
| modifier.toModify( prefiringweight, JetMaxMuonFraction = cms.double(-1.) ) | ||
| #For pre-UL 2016 reprocessing, same thing | ||
| run2_nanoAOD_94X2016.toModify( prefiringweight, DataEraECAL = cms.string("2016BtoH"), DataEraMuon = cms.string("2016") ) | ||
| run2_nanoAOD_94X2016.toModify( prefiringweight, JetMaxMuonFraction = cms.double(-1.) ) | ||
|
|
||
| l1PreFiringEventWeightTable = cms.EDProducer("GlobalVariablesTableProducer", | ||
| name = cms.string("L1PreFiringWeight"), | ||
| variables = cms.PSet( | ||
| L1PreFiringWeight_Nom = ExtVar(cms.InputTag("prefiringweight:nonPrefiringProb"), "double", doc = "L1 pre-firing event correction weight (1-probability)", precision=8), | ||
| L1PreFiringWeight_Up = ExtVar(cms.InputTag("prefiringweight:nonPrefiringProbUp"), "double", doc = "L1 pre-firing event correction weight (1-probability), up var.", precision=8), | ||
| L1PreFiringWeight_Dn = ExtVar(cms.InputTag("prefiringweight:nonPrefiringProbDown"), "double", doc = "L1 pre-firing event correction weight (1-probability), down var.", precision=8), | ||
| L1PreFiringWeightMuon_Nom = ExtVar(cms.InputTag("prefiringweight:nonPrefiringProbMuon"), "double", doc = "Muon L1 pre-firing event correction weight (1-probability)", precision=8), | ||
| L1PreFiringWeightMuon_SystUp = ExtVar(cms.InputTag("prefiringweight:nonPrefiringProbMuonSystUp"), "double", doc = "Muon L1 pre-firing event correction weight (1-probability), up var. syst.", precision=8), | ||
| L1PreFiringWeightMuon_SystDn = ExtVar(cms.InputTag("prefiringweight:nonPrefiringProbMuonSystDown"), "double", doc = "Muon L1 pre-firing event correction weight (1-probability), down var. syst.", precision=8), | ||
| L1PreFiringWeightMuon_StatUp = ExtVar(cms.InputTag("prefiringweight:nonPrefiringProbMuonStatUp"), "double", doc = "Muon L1 pre-firing event correction weight (1-probability), up var. stat.", precision=8), | ||
| L1PreFiringWeightMuon_StatDn = ExtVar(cms.InputTag("prefiringweight:nonPrefiringProbMuonStatDown"), "double", doc = "Muon L1 pre-firing event correction weight (1-probability), down var. stat.", precision=8), | ||
| L1PreFiringWeightECAL_Nom = ExtVar(cms.InputTag("prefiringweight:nonPrefiringProbECAL"), "double", doc = "ECAL L1 pre-firing event correction weight (1-probability)", precision=8), | ||
| L1PreFiringWeightECAL_Up = ExtVar(cms.InputTag("prefiringweight:nonPrefiringProbECALUp"), "double", doc = "ECAL L1 pre-firing event correction weight (1-probability), up var.", precision=8), | ||
| L1PreFiringWeightECAL_Dn = ExtVar(cms.InputTag("prefiringweight:nonPrefiringProbECALDown"), "double", doc = "ECAL L1 pre-firing event correction weight (1-probability), down var.", precision=8), | ||
| ) | ||
| ) | ||
|
|
||
| triggerObjectTables = cms.Sequence( unpackedPatTrigger + triggerObjectTable ) | ||
|
|
||
| #protect nano V8 production from changes to prefiring weights introduce for V9 | ||
| (run2_jme_2017 & run2_nanoAOD_106Xv1 & ~run2_nanoAOD_devel).toModify(prefiringweight,DataEraECAL = cms.string("2017BtoF")) | ||
| (run2_nanoAOD_106Xv1 & ~run2_nanoAOD_devel).toModify(prefiringweight,DoMuons = cms.bool(False)) | ||
| (run2_nanoAOD_106Xv1 & ~run2_nanoAOD_devel).toModify(l1PreFiringEventWeightTable.variables , L1PreFiringWeightMuon_Nom = None, L1PreFiringWeightMuon_SystUp = None, L1PreFiringWeightMuon_SystDn = None, L1PreFiringWeightMuon_StatUp = None, L1PreFiringWeightMuon_StatDn = None, L1PreFiringWeightECAL_Nom = None, L1PreFiringWeightECAL_Up = None, L1PreFiringWeightECAL_Dn = None) | ||
|
|
||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @mariadalfonso Here we remove the new prefiring weights from the nano event content for V8, so having empty histograms for them in DQM is expected. What I am a puzzled about is why the prefiring weight is 1, it should still reflect the ECAL prefiring. What workflow did you use for that test?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Mhhh, now that we have the UL maps for ECAL, this might need a further protection for that year. @lathomas |
||
| _triggerObjectTables_withL1PreFiring = triggerObjectTables.copy() | ||
| _triggerObjectTables_withL1PreFiring.replace(triggerObjectTable, prefiringweight + l1PreFiringEventWeightTable + triggerObjectTable) | ||
| (run2_HLTconditions_2016 | run2_HLTconditions_2017).toReplaceWith(triggerObjectTables, _triggerObjectTables_withL1PreFiring) | ||
| (run2_HLTconditions_2016 | run2_HLTconditions_2017 | run2_HLTconditions_2018).toReplaceWith(triggerObjectTables, _triggerObjectTables_withL1PreFiring) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -554,11 +554,11 @@ def miniAOD_customizeCommon(process): | |
|
|
||
| # L1 pre-firing weights for 2016 and 2017 | ||
| from Configuration.Eras.Modifier_run2_L1prefiring_cff import run2_L1prefiring | ||
| from Configuration.Eras.Modifier_stage1L1Trigger_cff import stage1L1Trigger | ||
| from Configuration.Eras.Modifier_stage2L1Trigger_cff import stage2L1Trigger | ||
| from Configuration.Eras.Modifier_stage2L1Trigger_2017_cff import stage2L1Trigger_2017 | ||
| process.load("PhysicsTools.PatUtils.L1ECALPrefiringWeightProducer_cff") | ||
| stage1L1Trigger.toModify(process.prefiringweight, DataEra = "2016BtoH") | ||
| stage2L1Trigger_2017.toModify(process.prefiringweight, DataEra = "2017BtoF") | ||
| process.load("PhysicsTools.PatUtils.L1PrefiringWeightProducer_cff") | ||
| stage2L1Trigger.toModify(process.prefiringweight, DataEraECAL = "2017BtoF", JetMaxMuonFraction = -1, DoMuons = cms.bool(False) ) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is the era correct here ("2017BtoF")?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if we want to reproduce the configuration previous to this PR to comply with the rule forbidding changes to RECO, yes. (these 2017 maps were also mistakenly picked previously for 2016 ...)
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Ok, thank you! |
||
| stage2L1Trigger_2017.toModify(process.prefiringweight, DataEraECAL = "2017BtoF", JetMaxMuonFraction = -1, DoMuons = cms.bool(False)) | ||
|
Comment on lines
-559
to
+561
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is this suppose to lead to any changes in the production miniAOD (especially UL)?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, this is specifically set to prevent any changes to miniAOD by deactivating the new features and using the pre-UL ECAL maps.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. do we need to have something set for the stage2L1Trigger_2018?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think the same rule of not changing the miniAOD output applies here, not thing was set for 2018 before, so we set nothing now. |
||
| run2_L1prefiring.toModify(task, func=lambda t: t.add(process.prefiringweight)) | ||
|
|
||
| def miniAOD_customizeMC(process): | ||
|
|
||
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.