Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-07-23 02:25:33

0001 import FWCore.ParameterSet.Config as cms
0002 from DQMOffline.L1Trigger import L1TEtSumJetOffline_cfi as L1TStep1
0003 
0004 variables = {
0005     'met': L1TStep1.metEfficiencyThresholds,
0006     'mht': L1TStep1.mhtEfficiencyThresholds,
0007     'ett': L1TStep1.ettEfficiencyThresholds,
0008     'htt': L1TStep1.httEfficiencyThresholds,
0009 }
0010 
0011 plots = {
0012     'met': ['efficiencyMET', 'efficiencyETMHF', 'efficiencyPFMetNoMu'],
0013     'mht': ['efficiencyMHT'],
0014     'ett': ['efficiencyETT'],
0015     'htt': ['efficiencyHTT'],
0016 }
0017 
0018 allEfficiencyPlots = []
0019 add_plot = allEfficiencyPlots.append
0020 for variable, thresholds in variables.items():
0021     for plot in plots[variable]:
0022         for threshold in thresholds:
0023             plotName = '{0}_threshold_{1}'.format(plot, threshold)
0024             add_plot(plotName)
0025 
0026 from DQMOffline.L1Trigger.L1TDiffHarvesting_cfi import l1tDiffHarvesting
0027 
0028 resolution_plots = [
0029     "resolutionMET", "resolutionETMHF", "resolutionPFMetNoMu", "resolutionMHT", "resolutionETT",
0030     "resolutionHTT", "resolutionMETPhi", "resolutionETMHFPhi", "resolutionPFMetNoMuPhi",
0031     "resolutionMHTPhi",
0032 ]
0033 plots2D = [
0034     'L1METvsCaloMET', 'L1ETMHFvsCaloETMHF', 'L1METvsPFMetNoMu', 'L1MHTvsRecoMHT', 'L1ETTvsCaloETT',
0035     'L1HTTvsRecoHTT', 'L1METPhivsCaloMETPhi', 'L1METPhivsPFMetNoMuPhi', 'L1ETMHFPhivsCaloETMHFPhi',
0036     'L1MHTPhivsRecoMHTPhi',
0037 ]
0038 
0039 allPlots = []
0040 allPlots.extend(allEfficiencyPlots)
0041 allPlots.extend(resolution_plots)
0042 allPlots.extend(plots2D)
0043 
0044 l1tEtSumEmuDiff = l1tDiffHarvesting.clone(
0045     plotCfgs=cms.untracked.VPSet(
0046         cms.untracked.PSet(  # EMU comparison
0047             dir1=cms.untracked.string(
0048                 "L1T/L1TObjects/L1TEtSum/L1TriggerVsReco"),
0049             dir2=cms.untracked.string(
0050                 "L1TEMU/L1TObjects/L1TEtSum/L1TriggerVsReco"),
0051             outputDir=cms.untracked.string(
0052                 "L1TEMU/L1TObjects/L1TEtSum/L1TriggerVsReco/Comparison"),
0053             plots=cms.untracked.vstring(allPlots)
0054         ),
0055     )
0056 )
0057 
0058 # modifications for the pp reference run
0059 variables_HI = variables
0060 
0061 allEfficiencyPlots_HI = []
0062 add_plot = allEfficiencyPlots_HI.append
0063 for variable, thresholds in variables_HI.items():
0064     for plot in plots[variable]:
0065         for threshold in thresholds:
0066             plotName = '{0}_threshold_{1}'.format(plot, threshold)
0067             add_plot(plotName)
0068 
0069 allPlots_HI = []
0070 allPlots_HI.extend(allEfficiencyPlots_HI)
0071 allPlots_HI.extend(resolution_plots)
0072 allPlots_HI.extend(plots2D)
0073 
0074 from Configuration.Eras.Modifier_ppRef_2017_cff import ppRef_2017
0075 ppRef_2017.toModify(
0076     l1tEtSumEmuDiff,
0077     plotCfgs={0: dict(plots=allPlots_HI)}
0078 )