CMS 3D CMS Logo

L1TEGammaDiff_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 }
7 
8 plots = {
9  'electron': [
10  "efficiencyElectronET_EB", "efficiencyElectronET_EE",
11  "efficiencyElectronET_EB_EE"
12  ],
13 }
14 
15 allEfficiencyPlots = []
16 add_plot = allEfficiencyPlots.append
17 for variable, thresholds in variables.iteritems():
18  for plot in plots[variable]:
19  for threshold in thresholds:
20  plotName = '{0}_threshold_{1}'.format(plot, threshold)
21  add_plot(plotName)
22 
23 resolution_plots = [
24  "resolutionElectronET_EB", "resolutionElectronET_EE",
25  "resolutionElectronET_EB_EE", "resolutionElectronPhi_EB", "resolutionElectronPhi_EE",
26  "resolutionElectronPhi_EB_EE", "resolutionElectronEta",
27  #
28  "resolutionPhotonET_EB", "resolutionPhotonET_EE",
29  "resolutionPhotonET_EB_EE", "resolutionPhotonPhi_EB", "resolutionPhotonPhi_EE",
30  "resolutionPhotonPhi_EB_EE", "resolutionPhotonEta",
31 ]
32 plots2D = [
33  'L1EGammaETvsElectronET_EB', 'L1EGammaETvsElectronET_EE', 'L1EGammaETvsElectronET_EB_EE',
34  'L1EGammaPhivsElectronPhi_EB', 'L1EGammaPhivsElectronPhi_EE', 'L1EGammaPhivsElectronPhi_EB_EE',
35  'L1EGammaEtavsElectronEta',
36  #
37  'L1EGammaETvsPhotonET_EB', 'L1EGammaETvsPhotonET_EE', 'L1EGammaETvsPhotonET_EB_EE',
38  'L1EGammaPhivsPhotonPhi_EB', 'L1EGammaPhivsPhotonPhi_EE', 'L1EGammaPhivsPhotonPhi_EB_EE',
39  'L1EGammaEtavsPhotonEta',
40 ]
41 
42 allPlots = []
43 allPlots.extend(allEfficiencyPlots)
44 allPlots.extend(resolution_plots)
45 allPlots.extend(plots2D)
46 
47 from DQMOffline.L1Trigger.L1TDiffHarvesting_cfi import l1tDiffHarvesting
48 l1tEGammaEmuDiff = l1tDiffHarvesting.clone(
49  plotCfgs=cms.untracked.VPSet(
50  cms.untracked.PSet( # EMU comparison
51  dir1=cms.untracked.string("L1T/L1TEGamma"),
52  dir2=cms.untracked.string("L1TEMU/L1TEGamma"),
53  outputDir=cms.untracked.string(
54  "L1TEMU/L1TEGamma/Comparison"),
55  plots=cms.untracked.vstring(allPlots)
56  ),
57  )
58 )