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