CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 variables_HI = {
34  'electron': L1TEGammaOffline_cfi.electronEfficiencyThresholds_HI,
35  'photon': L1TEGammaOffline_cfi.photonEfficiencyThresholds_HI,
36 }
37 
38 deepInspectionThresholds_HI = {
39  'electron': L1TEGammaOffline_cfi.deepInspectionElectronThresholds_HI,
40  'photon': [],
41 }
42 
43 
44 # remove photon variables (code to produce them is currently commented out)
45 variables['photon'] = []
46 variables_HI['photon'] = []
47 
48 from DQMOffline.L1Trigger.L1TCommon import generateEfficiencyStrings as ges
49 efficiencyStrings = list(ges(variables, plots))
50 efficiencyStrings += list(ges(deepInspectionThresholds, deepInspectionPlots))
51 
52 efficiencyStrings_HI = list(ges(variables_HI, plots))
53 efficiencyStrings_HI += list(ges(deepInspectionThresholds_HI,
54  deepInspectionPlots))
55 
56 from DQMServices.Core.DQMEDHarvester import DQMEDHarvester
57 l1tEGammaEfficiency = DQMEDHarvester(
58  "DQMGenericClient",
59  commands=cms.vstring(),
60  resolution=cms.vstring(),
61  subDirs=cms.untracked.vstring('L1T/L1TObjects/L1TEGamma/L1TriggerVsReco'),
62  efficiency=cms.vstring(),
63  efficiencyProfile=cms.untracked.vstring(efficiencyStrings),
64 )
65 
66 l1tEGammaEmuEfficiency = l1tEGammaEfficiency.clone(
67  subDirs=cms.untracked.vstring(
68  'L1TEMU/L1TObjects/L1TEGamma/L1TriggerVsReco'),
69 )
70 
71 from Configuration.Eras.Modifier_ppRef_2017_cff import ppRef_2017
72 ppRef_2017.toModify(l1tEGammaEfficiency, efficiencyProfile=efficiencyStrings_HI)
73 ppRef_2017.toModify(l1tEGammaEmuEfficiency, efficiencyProfile=efficiencyStrings_HI)