Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-07-23 02:25:33

0001 import FWCore.ParameterSet.Config as cms
0002 from DQMOffline.L1Trigger import L1TEGammaOffline_cfi
0003 
0004 variables = {
0005     'electron': L1TEGammaOffline_cfi.electronEfficiencyThresholds,
0006 }
0007 
0008 plots = {
0009     'electron': [
0010         "efficiencyElectronET_EB", "efficiencyElectronET_EE",
0011         "efficiencyElectronET_EB_EE"
0012     ],
0013 }
0014 
0015 allEfficiencyPlots = []
0016 add_plot = allEfficiencyPlots.append
0017 for variable, thresholds in variables.items():
0018     for plot in plots[variable]:
0019         for threshold in thresholds:
0020             plotName = '{0}_threshold_{1}'.format(plot, threshold)
0021             add_plot(plotName)
0022 
0023 resolution_plots = [
0024     "resolutionElectronET_EB", "resolutionElectronET_EE",
0025     "resolutionElectronET_EB_EE", "resolutionElectronPhi_EB", "resolutionElectronPhi_EE",
0026     "resolutionElectronPhi_EB_EE", "resolutionElectronEta",
0027     #
0028     "resolutionPhotonET_EB", "resolutionPhotonET_EE",
0029     "resolutionPhotonET_EB_EE", "resolutionPhotonPhi_EB", "resolutionPhotonPhi_EE",
0030     "resolutionPhotonPhi_EB_EE", "resolutionPhotonEta",
0031 ]
0032 plots2D = [
0033     'L1EGammaETvsElectronET_EB', 'L1EGammaETvsElectronET_EE', 'L1EGammaETvsElectronET_EB_EE',
0034     'L1EGammaPhivsElectronPhi_EB', 'L1EGammaPhivsElectronPhi_EE', 'L1EGammaPhivsElectronPhi_EB_EE',
0035     'L1EGammaEtavsElectronEta',
0036     #
0037     'L1EGammaETvsPhotonET_EB', 'L1EGammaETvsPhotonET_EE', 'L1EGammaETvsPhotonET_EB_EE',
0038     'L1EGammaPhivsPhotonPhi_EB', 'L1EGammaPhivsPhotonPhi_EE', 'L1EGammaPhivsPhotonPhi_EB_EE',
0039     'L1EGammaEtavsPhotonEta',
0040 ]
0041 
0042 # remove photon variables (code to produce them is currently commented out)
0043 resolution_plots = [plot for plot in resolution_plots if 'Photon' not in plot]
0044 plots2D = [plot for plot in plots2D if 'Photon' not in plot]
0045 
0046 allPlots = []
0047 allPlots.extend(allEfficiencyPlots)
0048 allPlots.extend(resolution_plots)
0049 allPlots.extend(plots2D)
0050 
0051 
0052 from DQMOffline.L1Trigger.L1TDiffHarvesting_cfi import l1tDiffHarvesting
0053 l1tEGammaEmuDiff = l1tDiffHarvesting.clone(
0054     plotCfgs=cms.untracked.VPSet(
0055         cms.untracked.PSet(  # EMU comparison
0056             dir1=cms.untracked.string("L1T/L1TObjects/L1TEGamma/L1TriggerVsReco"),
0057             dir2=cms.untracked.string("L1TEMU/L1TObjects/L1TEGamma/L1TriggerVsReco"),
0058             outputDir=cms.untracked.string(
0059                 "L1TEMU/L1TObjects/L1TEGamma/L1TriggerVsReco/Comparison"),
0060             plots=cms.untracked.vstring(allPlots)
0061         ),
0062     )
0063 )
0064 
0065 # modifications for the pp reference run
0066 variables_HI = {
0067     'electron': L1TEGammaOffline_cfi.electronEfficiencyThresholds_HI,
0068 }
0069 
0070 allEfficiencyPlots_HI = []
0071 add_plot = allEfficiencyPlots_HI.append
0072 for variable, thresholds in variables_HI.items():
0073     for plot in plots[variable]:
0074         for threshold in thresholds:
0075             plotName = '{0}_threshold_{1}'.format(plot, threshold)
0076             add_plot(plotName)
0077 
0078 allPlots_HI = []
0079 allPlots_HI.extend(allEfficiencyPlots_HI)
0080 allPlots_HI.extend(resolution_plots)
0081 allPlots_HI.extend(plots2D)
0082 
0083 from Configuration.Eras.Modifier_ppRef_2017_cff import ppRef_2017
0084 ppRef_2017.toModify(l1tEGammaEmuDiff,
0085     plotCfgs = {0:dict(plots = allPlots_HI)}
0086 )