CMS 3D CMS Logo

L1TJetDiff_cfi.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 from DQMOffline.L1Trigger import L1TEtSumJetOffline_cfi as L1TStep1
3 
4 variables = {
5  'jet': L1TStep1.jetEfficiencyThresholds,
6 }
7 
8 plots = {
9  'jet': [
10  "efficiencyJetEt_HB", "efficiencyJetEt_HE", "efficiencyJetEt_HF",
11  "efficiencyJetEt_HB_HE"],
12 }
13 
14 allEfficiencyPlots = []
15 add_plot = allEfficiencyPlots.append
16 for variable, thresholds in variables.items():
17  for plot in plots[variable]:
18  for threshold in thresholds:
19  plotName = '{0}_threshold_{1}'.format(plot, threshold)
20  add_plot(plotName)
21 
22 from DQMOffline.L1Trigger.L1TDiffHarvesting_cfi import l1tDiffHarvesting
23 
24 resolution_plots = [
25  "resolutionJetET_HB", "resolutionJetET_HE", "resolutionJetET_HF",
26  "resolutionJetET_HB_HE", "resolutionJetPhi_HB", "resolutionJetPhi_HE",
27  "resolutionJetPhi_HF", "resolutionJetPhi_HB_HE", "resolutionJetEta",
28 ]
29 plots2D = [
30  'L1JetETvsCaloJetET_HB', 'L1JetETvsCaloJetET_HE', 'L1JetETvsCaloJetET_HF',
31  'L1JetETvsCaloJetET_HB_HE', 'L1JetPhivsCaloJetPhi_HB', 'L1JetPhivsCaloJetPhi_HE',
32  'L1JetPhivsCaloJetPhi_HF', 'L1JetPhivsCaloJetPhi_HB_HE', 'L1JetEtavsCaloJetEta_HB',
33 ]
34 
35 allPlots = []
36 allPlots.extend(allEfficiencyPlots)
37 allPlots.extend(resolution_plots)
38 allPlots.extend(plots2D)
39 
40 l1tJetEmuDiff = l1tDiffHarvesting.clone(
41  plotCfgs=cms.untracked.VPSet(
42  cms.untracked.PSet( # EMU comparison
43  dir1=cms.untracked.string("L1T/L1TObjects/L1TJet/L1TriggerVsReco"),
44  dir2=cms.untracked.string("L1TEMU/L1TObjects/L1TJet/L1TriggerVsReco"),
45  outputDir=cms.untracked.string(
46  "L1TEMU/L1TObjects/L1TJet/L1TriggerVsReco/Comparison"),
47  plots=cms.untracked.vstring(allPlots)
48  ),
49  )
50 )
51 
52 # modifications for the pp reference run
53 variables_HI = variables
54 variables_HI['jet'] = L1TStep1.jetEfficiencyThresholds_HI
55 
56 allEfficiencyPlots_HI = []
57 add_plot = allEfficiencyPlots_HI.append
58 for variable, thresholds in variables_HI.items():
59  for plot in plots[variable]:
60  for threshold in thresholds:
61  plotName = '{0}_threshold_{1}'.format(plot, threshold)
62  add_plot(plotName)
63 
64 allPlots_HI = []
65 allPlots_HI.extend(allEfficiencyPlots_HI)
66 allPlots_HI.extend(resolution_plots)
67 allPlots_HI.extend(plots2D)
68 
69 from Configuration.Eras.Modifier_ppRef_2017_cff import ppRef_2017
70 ppRef_2017.toModify(l1tJetEmuDiff,
71  plotCfgs = {0:dict(plots = allPlots_HI)}
72 )
73 
L1TJetDiff_cfi.add_plot
add_plot
Definition: L1TJetDiff_cfi.py:15
format