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