CMS 3D CMS Logo

L1TEtSumDiff_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  'met': L1TStep1.metEfficiencyThresholds,
6  'mht': L1TStep1.mhtEfficiencyThresholds,
7  'ett': L1TStep1.ettEfficiencyThresholds,
8  'htt': L1TStep1.httEfficiencyThresholds,
9 }
10 
11 plots = {
12  'met': ['efficiencyMET', 'efficiencyETMHF', 'efficiencyPFMetNoMu'],
13  'mht': ['efficiencyMHT'],
14  'ett': ['efficiencyETT'],
15  'htt': ['efficiencyHTT'],
16 }
17 
18 allEfficiencyPlots = []
19 add_plot = allEfficiencyPlots.append
20 for variable, thresholds in variables.items():
21  for plot in plots[variable]:
22  for threshold in thresholds:
23  plotName = '{0}_threshold_{1}'.format(plot, threshold)
24  add_plot(plotName)
25 
26 from DQMOffline.L1Trigger.L1TDiffHarvesting_cfi import l1tDiffHarvesting
27 
28 resolution_plots = [
29  "resolutionMET", "resolutionETMHF", "resolutionPFMetNoMu", "resolutionMHT", "resolutionETT",
30  "resolutionHTT", "resolutionMETPhi", "resolutionETMHFPhi", "resolutionPFMetNoMuPhi",
31  "resolutionMHTPhi",
32 ]
33 plots2D = [
34  'L1METvsCaloMET', 'L1ETMHFvsCaloETMHF', 'L1METvsPFMetNoMu', 'L1MHTvsRecoMHT', 'L1ETTvsCaloETT',
35  'L1HTTvsRecoHTT', 'L1METPhivsCaloMETPhi', 'L1METPhivsPFMetNoMuPhi', 'L1ETMHFPhivsCaloETMHFPhi',
36  'L1MHTPhivsRecoMHTPhi',
37 ]
38 
39 allPlots = []
40 allPlots.extend(allEfficiencyPlots)
41 allPlots.extend(resolution_plots)
42 allPlots.extend(plots2D)
43 
44 l1tEtSumEmuDiff = l1tDiffHarvesting.clone(
45  plotCfgs=cms.untracked.VPSet(
46  cms.untracked.PSet( # EMU comparison
47  dir1=cms.untracked.string(
48  "L1T/L1TObjects/L1TEtSum/L1TriggerVsReco"),
49  dir2=cms.untracked.string(
50  "L1TEMU/L1TObjects/L1TEtSum/L1TriggerVsReco"),
51  outputDir=cms.untracked.string(
52  "L1TEMU/L1TObjects/L1TEtSum/L1TriggerVsReco/Comparison"),
53  plots=cms.untracked.vstring(allPlots)
54  ),
55  )
56 )
57 
58 # modifications for the pp reference run
59 variables_HI = variables
60 
61 allEfficiencyPlots_HI = []
62 add_plot = allEfficiencyPlots_HI.append
63 for variable, thresholds in variables_HI.items():
64  for plot in plots[variable]:
65  for threshold in thresholds:
66  plotName = '{0}_threshold_{1}'.format(plot, threshold)
67  add_plot(plotName)
68 
69 allPlots_HI = []
70 allPlots_HI.extend(allEfficiencyPlots_HI)
71 allPlots_HI.extend(resolution_plots)
72 allPlots_HI.extend(plots2D)
73 
74 from Configuration.Eras.Modifier_ppRef_2017_cff import ppRef_2017
75 ppRef_2017.toModify(
76  l1tEtSumEmuDiff,
77  plotCfgs={0: dict(plots=allPlots_HI)}
78 )
L1TEtSumDiff_cfi.add_plot
add_plot
Definition: L1TEtSumDiff_cfi.py:19
format