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 plots = {
10  'electron': [
11  "efficiencyElectronET_EB", "efficiencyElectronET_EE",
12  "efficiencyElectronET_EB_EE"
13  ],
14  'photon': [
15  "efficiencyPhotonET_EB", "efficiencyPhotonET_EE",
16  "efficiencyPhotonET_EB_EE"
17  ]
18 }
19 
20 allEfficiencyPlots = []
21 add_plot = allEfficiencyPlots.append
22 for variable, thresholds in variables.iteritems():
23  for plot in plots[variable]:
24  for threshold in thresholds:
25  plotName = '{0}_threshold_{1}'.format(plot, threshold)
26  add_plot(plotName)
27 
28 from DQMOffline.L1Trigger.L1TEfficiencyHarvesting2_cfi import l1tEfficiencyHarvesting
29 l1tEGammaEfficiency = l1tEfficiencyHarvesting.clone(
30  plotCfgs=cms.untracked.VPSet(
31  cms.untracked.PSet(
32  numeratorDir=cms.untracked.string("L1T/L1TEGamma/efficiency_raw"),
33  outputDir=cms.untracked.string("L1T/L1TEGamma"),
34  numeratorSuffix=cms.untracked.string("_Num"),
35  denominatorSuffix=cms.untracked.string("_Den"),
36  plots=cms.untracked.vstring(allEfficiencyPlots)
37  ),
38  cms.untracked.PSet(
39  numeratorDir=cms.untracked.string(
40  "L1TEMU/L1TEGamma/efficiency_raw"),
41  outputDir=cms.untracked.string("L1TEMU/L1TEGamma"),
42  numeratorSuffix=cms.untracked.string("_Num"),
43  denominatorSuffix=cms.untracked.string("_Den"),
44  plots=cms.untracked.vstring(allEfficiencyPlots)
45  ),
46  )
47 )