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
Changes from 20 commits
525ef8a
7145c79
9d42d6b
999876d
8291674
29a1f5d
e961914
baeed97
52dcdeb
02827ff
e37a9cd
1de3d2e
05f63aa
1255d48
5704e9c
816db5d
eb958e2
f93973f
7a450d2
5484ca6
fd1d685
fb3a0b3
d74deb9
03de4ac
cb4759e
343d774
21f22a4
1a4b06f
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 |
---|---|---|
|
@@ -216,29 +216,44 @@ | |
selections = selections2016 | ||
) | ||
|
||
from PhysicsTools.PatUtils.L1ECALPrefiringWeightProducer_cff import prefiringweight | ||
from PhysicsTools.PatUtils.L1PrefiringWeightProducer_cff import prefiringweight | ||
#Next line will be updated once we get UL2016 maps | ||
run2_jme_2016.toModify( prefiringweight, DataEra = cms.string("2016BtoH")) | ||
(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, DataEra = cms.string("UL2017BtoF")) | ||
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")) | ||
|
||
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. we should add something for the run2_nanoAOD_102Xv1 can you clarify ? 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 I understand the old discussion correctly, we have indeed have to add the prefiring weights to the nanoAOD for 2018. Should this line be modified for that? https://github.com/cms-sw/cmssw/blob/master/PhysicsTools/NanoAOD/python/nano_cff.py#L106 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. for what I see we do not store the 2018 at all even for UL we do have the pre-UL (run2_nanoAOD_94X2016 | run2_nanoAOD_94XMiniAODv1 | run2_nanoAOD_94XMiniAODv2) can you check locally what happens for the 2018? and do we really need it ? 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 have added 2018 here: https://github.com/cms-sw/cmssw/pull/33758/files#diff-9b898944f08810913ea5c1605c47bd9a6c99eb91fc20f491ba2767702f4a0184R260 and confirmed that the prefiring weights are now added to 2018 nanoAOD. We indeed need to add these weights as they are non-negligible for muons for that year. |
||
#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, DataEra = cms.string("2017BtoF")) | ||
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, DataEra = cms.string("2016BtoH") ) | ||
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", | ||
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), | ||
L1PreFiringWeightJet_Nom = ExtVar(cms.InputTag("prefiringweight:nonPrefiringProbJet"), "double", doc = "Jet L1 pre-firing event correction weight (1-probability)", precision=8), | ||
L1PreFiringWeightJet_Up = ExtVar(cms.InputTag("prefiringweight:nonPrefiringProbJetUp"), "double", doc = "Jet L1 pre-firing event correction weight (1-probability), up var.", precision=8), | ||
L1PreFiringWeightJet_Dn = ExtVar(cms.InputTag("prefiringweight:nonPrefiringProbJetDown"), "double", doc = "Jet L1 pre-firing event correction weight (1-probability), down var.", precision=8), | ||
L1PreFiringWeightPhoton_Nom = ExtVar(cms.InputTag("prefiringweight:nonPrefiringProbPhoton"), "double", doc = "Photon L1 pre-firing event correction weight (1-probability)", precision=8), | ||
L1PreFiringWeightPhoton_Up = ExtVar(cms.InputTag("prefiringweight:nonPrefiringProbPhotonUp"), "double", doc = "Photon L1 pre-firing event correction weight (1-probability), up var.", precision=8), | ||
L1PreFiringWeightPhoton_Dn = ExtVar(cms.InputTag("prefiringweight:nonPrefiringProbPhotonDown"), "double", doc = "Photon L1 pre-firing event correction weight (1-probability), down var.", precision=8), | ||
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 all these need to be a double ? in nano will be converted in float for now 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 not forget to move double -> float |
||
) | ||
) | ||
|
||
triggerObjectTables = cms.Sequence( unpackedPatTrigger + triggerObjectTable ) | ||
|
||
_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) |
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.
This comment could be updated (but ONLY if you need to implement some other change together with it)