CMS 3D CMS Logo

L1TJetEfficiency_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.iteritems():
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.L1TEfficiencyHarvesting_cfi import l1tEfficiencyHarvesting
23 l1tJetEfficiency = l1tEfficiencyHarvesting.clone(
24  plotCfgs=cms.untracked.VPSet(
25  cms.untracked.PSet(
26  numeratorDir=cms.untracked.string("L1T/L1TObjects/L1TJet/L1TriggerVsReco/efficiency_raw"),
27  outputDir=cms.untracked.string("L1T/L1TObjects/L1TJet/L1TriggerVsReco"),
28  numeratorSuffix=cms.untracked.string("_Num"),
29  denominatorSuffix=cms.untracked.string("_Den"),
30  plots=cms.untracked.vstring(allEfficiencyPlots)
31  ),
32  )
33 )
34 
35 l1tJetEmuEfficiency = l1tEfficiencyHarvesting.clone(
36  plotCfgs=cms.untracked.VPSet(
37  cms.untracked.PSet(
38  numeratorDir=cms.untracked.string("L1TEMU/L1TObjects/L1TJet/L1TriggerVsReco/efficiency_raw"),
39  outputDir=cms.untracked.string("L1TEMU/L1TObjects/L1TJet/L1TriggerVsReco"),
40  numeratorSuffix=cms.untracked.string("_Num"),
41  denominatorSuffix=cms.untracked.string("_Den"),
42  plots=cms.untracked.vstring(allEfficiencyPlots)
43  ),
44  )
45 )
46 
47 # modifications for the pp reference run
48 variables_HI = variables
49 variables_HI['jet'] = L1TStep1.jetEfficiencyThresholds_HI
50 
51 allEfficiencyPlots_HI = []
52 add_plot = allEfficiencyPlots_HI.append
53 for variable, thresholds in variables_HI.iteritems():
54  for plot in plots[variable]:
55  for threshold in thresholds:
56  plotName = '{0}_threshold_{1}'.format(plot, threshold)
57  add_plot(plotName)
58 
59 from Configuration.Eras.Modifier_ppRef_2017_cff import ppRef_2017
60 ppRef_2017.toModify(l1tJetEfficiency,
61  plotCfgs = {
62  0:dict(plots = allEfficiencyPlots_HI),
63  }
64 )
65 ppRef_2017.toModify(l1tJetEmuEfficiency,
66  plotCfgs = {
67  0:dict(plots = allEfficiencyPlots_HI),
68  }
69 )