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     'jet': L1TStep1.jetEfficiencyThresholds,
0006 }
0007 
0008 plots = {
0009     'jet': [
0010         "efficiencyJetEt_HB", "efficiencyJetEt_HE", "efficiencyJetEt_HF",
0011         "efficiencyJetEt_HB_HE"],
0012 }
0013 
0014 allEfficiencyPlots = []
0015 add_plot = allEfficiencyPlots.append
0016 for variable, thresholds in variables.items():
0017     for plot in plots[variable]:
0018         for threshold in thresholds:
0019             plotName = '{0}_threshold_{1}'.format(plot, threshold)
0020             add_plot(plotName)
0021 
0022 from DQMOffline.L1Trigger.L1TDiffHarvesting_cfi import l1tDiffHarvesting
0023 
0024 resolution_plots = [
0025     "resolutionJetET_HB", "resolutionJetET_HE", "resolutionJetET_HF",
0026     "resolutionJetET_HB_HE", "resolutionJetPhi_HB", "resolutionJetPhi_HE",
0027     "resolutionJetPhi_HF", "resolutionJetPhi_HB_HE", "resolutionJetEta",
0028 ]
0029 plots2D = [
0030     'L1JetETvsCaloJetET_HB', 'L1JetETvsCaloJetET_HE', 'L1JetETvsCaloJetET_HF',
0031     'L1JetETvsCaloJetET_HB_HE', 'L1JetPhivsCaloJetPhi_HB', 'L1JetPhivsCaloJetPhi_HE',
0032     'L1JetPhivsCaloJetPhi_HF', 'L1JetPhivsCaloJetPhi_HB_HE', 'L1JetEtavsCaloJetEta_HB',
0033 ]
0034 
0035 allPlots = []
0036 allPlots.extend(allEfficiencyPlots)
0037 allPlots.extend(resolution_plots)
0038 allPlots.extend(plots2D)
0039 
0040 l1tJetEmuDiff = l1tDiffHarvesting.clone(
0041     plotCfgs=cms.untracked.VPSet(
0042         cms.untracked.PSet(  # EMU comparison
0043             dir1=cms.untracked.string("L1T/L1TObjects/L1TJet/L1TriggerVsReco"),
0044             dir2=cms.untracked.string("L1TEMU/L1TObjects/L1TJet/L1TriggerVsReco"),
0045             outputDir=cms.untracked.string(
0046                 "L1TEMU/L1TObjects/L1TJet/L1TriggerVsReco/Comparison"),
0047             plots=cms.untracked.vstring(allPlots)
0048         ),
0049     )
0050 )
0051 
0052 # modifications for the pp reference run
0053 variables_HI = variables
0054 variables_HI['jet'] = L1TStep1.jetEfficiencyThresholds_HI
0055 
0056 allEfficiencyPlots_HI = []
0057 add_plot = allEfficiencyPlots_HI.append
0058 for variable, thresholds in variables_HI.items():
0059     for plot in plots[variable]:
0060         for threshold in thresholds:
0061             plotName = '{0}_threshold_{1}'.format(plot, threshold)
0062             add_plot(plotName)
0063 
0064 allPlots_HI = []
0065 allPlots_HI.extend(allEfficiencyPlots_HI)
0066 allPlots_HI.extend(resolution_plots)
0067 allPlots_HI.extend(plots2D)
0068 
0069 from Configuration.Eras.Modifier_ppRef_2017_cff import ppRef_2017
0070 ppRef_2017.toModify(l1tJetEmuDiff,
0071     plotCfgs = {0:dict(plots = allPlots_HI)}
0072 )
0073