Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:09:34

0001 import FWCore.ParameterSet.Config as cms
0002 from DQMOffline.L1Trigger import L1TEGammaOffline_cfi
0003 
0004 variables = {
0005     'electron': L1TEGammaOffline_cfi.electronEfficiencyThresholds,
0006     'photon': L1TEGammaOffline_cfi.photonEfficiencyThresholds,
0007 }
0008 
0009 deepInspectionThresholds = {
0010     'electron': L1TEGammaOffline_cfi.deepInspectionElectronThresholds,
0011     'photon': [],
0012 }
0013 
0014 plots = {
0015     'electron': [
0016         "efficiencyElectronET_EB", "efficiencyElectronET_EE",
0017         "efficiencyElectronET_EB_EE", "efficiencyElectronPhi_vs_Eta",
0018     ],
0019     'photon': [
0020         "efficiencyPhotonET_EB", "efficiencyPhotonET_EE",
0021         "efficiencyPhotonET_EB_EE"
0022     ]
0023 }
0024 
0025 deepInspectionPlots = {
0026     'electron': [
0027         'efficiencyElectronEta', 'efficiencyElectronPhi',
0028         'efficiencyElectronNVertex'
0029     ],
0030     'photon': [],
0031 }
0032 
0033 variables_HI = {
0034     'electron': L1TEGammaOffline_cfi.electronEfficiencyThresholds_HI,
0035     'photon': L1TEGammaOffline_cfi.photonEfficiencyThresholds_HI,
0036 }
0037 
0038 deepInspectionThresholds_HI = {
0039     'electron': L1TEGammaOffline_cfi.deepInspectionElectronThresholds_HI,
0040     'photon': [],
0041 }
0042 
0043 
0044 # remove photon variables (code to produce them is currently commented out)
0045 variables['photon'] = []
0046 variables_HI['photon'] = []
0047 
0048 from DQMOffline.L1Trigger.L1TCommon import generateEfficiencyStrings as ges
0049 efficiencyStrings = list(ges(variables, plots))
0050 efficiencyStrings += list(ges(deepInspectionThresholds, deepInspectionPlots))
0051 
0052 efficiencyStrings_HI = list(ges(variables_HI, plots))
0053 efficiencyStrings_HI += list(ges(deepInspectionThresholds_HI,
0054                                  deepInspectionPlots))
0055 
0056 from DQMServices.Core.DQMEDHarvester import DQMEDHarvester
0057 l1tEGammaEfficiency = DQMEDHarvester(
0058     "DQMGenericClient",
0059     commands=cms.vstring(),
0060     resolution=cms.vstring(),
0061     subDirs=cms.untracked.vstring('L1T/L1TObjects/L1TEGamma/L1TriggerVsReco'),
0062     efficiency=cms.vstring(),
0063     efficiencyProfile=cms.untracked.vstring(efficiencyStrings),
0064 )
0065 
0066 l1tEGammaEmuEfficiency = l1tEGammaEfficiency.clone(
0067     subDirs = ['L1TEMU/L1TObjects/L1TEGamma/L1TriggerVsReco']
0068 )
0069 
0070 from Configuration.Eras.Modifier_ppRef_2017_cff import ppRef_2017
0071 ppRef_2017.toModify(l1tEGammaEfficiency, efficiencyProfile=efficiencyStrings_HI)
0072 ppRef_2017.toModify(l1tEGammaEmuEfficiency, efficiencyProfile=efficiencyStrings_HI)