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 import six
4 
5 variables = {
6  'electron': L1TEGammaOffline_cfi.electronEfficiencyThresholds,
7  'photon': L1TEGammaOffline_cfi.photonEfficiencyThresholds,
8 }
9 
10 deepInspectionThresholds = {
11  'electron': L1TEGammaOffline_cfi.deepInspectionElectronThresholds,
12  'photon': [],
13 }
14 
15 plots = {
16  'electron': [
17  "efficiencyElectronET_EB", "efficiencyElectronET_EE",
18  "efficiencyElectronET_EB_EE", "efficiencyElectronPhi_vs_Eta",
19  ],
20  'photon': [
21  "efficiencyPhotonET_EB", "efficiencyPhotonET_EE",
22  "efficiencyPhotonET_EB_EE"
23  ]
24 }
25 
26 deepInspectionPlots = {
27  'electron': [
28  'efficiencyElectronEta', 'efficiencyElectronPhi',
29  'efficiencyElectronNVertex'
30  ],
31  'photon': [],
32 }
33 
34 variables_HI = {
35  'electron': L1TEGammaOffline_cfi.electronEfficiencyThresholds_HI,
36  'photon': L1TEGammaOffline_cfi.photonEfficiencyThresholds_HI,
37 }
38 
39 deepInspectionThresholds_HI = {
40  'electron': L1TEGammaOffline_cfi.deepInspectionElectronThresholds_HI,
41  'photon': [],
42 }
43 
44 
45 # remove photon variables (code to produce them is currently commented out)
46 variables['photon'] = []
47 variables_HI['photon'] = []
48 
49 from DQMOffline.L1Trigger.L1TCommon import generateEfficiencyStrings as ges
50 efficiencyStrings = list(ges(variables, plots))
51 efficiencyStrings += list(ges(deepInspectionThresholds, deepInspectionPlots))
52 
53 efficiencyStrings_HI = list(ges(variables_HI, plots))
54 efficiencyStrings_HI += list(ges(deepInspectionThresholds_HI,
55  deepInspectionPlots))
56 
57 from DQMServices.Core.DQMEDHarvester import DQMEDHarvester
58 l1tEGammaEfficiency = DQMEDHarvester(
59  "DQMGenericClient",
60  commands=cms.vstring(),
61  resolution=cms.vstring(),
62  subDirs=cms.untracked.vstring('L1T/L1TObjects/L1TEGamma/L1TriggerVsReco'),
63  efficiency=cms.vstring(),
64  efficiencyProfile=cms.untracked.vstring(efficiencyStrings),
65 )
66 
67 l1tEGammaEmuEfficiency = l1tEGammaEfficiency.clone(
68  subDirs=cms.untracked.vstring(
69  'L1TEMU/L1TObjects/L1TEGamma/L1TriggerVsReco'),
70 )
71 
72 from Configuration.Eras.Modifier_ppRef_2017_cff import ppRef_2017
73 ppRef_2017.toModify(l1tEGammaEfficiency, efficiencyProfile=efficiencyStrings_HI)
74 ppRef_2017.toModify(l1tEGammaEmuEfficiency, efficiencyProfile=efficiencyStrings_HI)
DQMEDHarvester
Definition: DQMEDHarvester.py:1