CMS 3D CMS Logo

L1TEGammaEfficiency_cfi.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 from DQMOffline.L1Trigger import L1TEGammaOffline_cfi
3 
4 variables = {
5  'electron': L1TEGammaOffline_cfi.electronEfficiencyThresholds,
6  'photon': L1TEGammaOffline_cfi.photonEfficiencyThresholds,
7 }
8 
9 deepInspectionThresholds = {
10  'electron': L1TEGammaOffline_cfi.deepInspectionElectronThresholds,
11  'photon': [],
12 }
13 
14 plots = {
15  'electron': [
16  "efficiencyElectronET_EB", "efficiencyElectronET_EE",
17  "efficiencyElectronET_EB_EE", "efficiencyElectronPhi_vs_Eta",
18  ],
19  'photon': [
20  "efficiencyPhotonET_EB", "efficiencyPhotonET_EE",
21  "efficiencyPhotonET_EB_EE"
22  ]
23 }
24 
25 deepInspectionPlots = {
26  'electron': [
27  'efficiencyElectronEta', 'efficiencyElectronPhi',
28  'efficiencyElectronNVertex'
29  ],
30  'photon': [],
31 }
32 
33 allEfficiencyPlots = []
34 add_plot = allEfficiencyPlots.append
35 for variable, thresholds in variables.iteritems():
36  for plot in plots[variable]:
37  for threshold in thresholds:
38  plotName = '{0}_threshold_{1}'.format(plot, threshold)
39  add_plot(plotName)
40 
41 for variable, thresholds in deepInspectionThresholds.iteritems():
42  for plot in deepInspectionPlots[variable]:
43  for threshold in thresholds:
44  plotName = '{0}_threshold_{1}'.format(plot, threshold)
45  add_plot(plotName)
46 
47 from DQMOffline.L1Trigger.L1TEfficiencyHarvesting_cfi import l1tEfficiencyHarvesting
48 l1tEGammaEfficiency = l1tEfficiencyHarvesting.clone(
49  plotCfgs=cms.untracked.VPSet(
50  cms.untracked.PSet(
51  numeratorDir=cms.untracked.string("L1T/L1TEGamma/efficiency_raw"),
52  outputDir=cms.untracked.string("L1T/L1TEGamma"),
53  numeratorSuffix=cms.untracked.string("_Num"),
54  denominatorSuffix=cms.untracked.string("_Den"),
55  plots=cms.untracked.vstring(allEfficiencyPlots)
56  ),
57  cms.untracked.PSet(
58  numeratorDir=cms.untracked.string(
59  "L1TEMU/L1TEGamma/efficiency_raw"),
60  outputDir=cms.untracked.string("L1TEMU/L1TEGamma"),
61  numeratorSuffix=cms.untracked.string("_Num"),
62  denominatorSuffix=cms.untracked.string("_Den"),
63  plots=cms.untracked.vstring(allEfficiencyPlots)
64  ),
65  )
66 )