Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-06-04 01:25:52

0001 import FWCore.ParameterSet.Config as cms
0002 from DQMServices.Core.DQMEDHarvester import DQMEDHarvester
0003 from DQM.L1TMonitor.L1TdeStage2uGMT_cff import ignoreFinalsBinsRun3, ignoreIntermediatesBins, ignoreIntermediatesBinsRun3
0004 
0005 # directories
0006 ugmtEmuDqmDir = "L1TEMU/L1TdeStage2uGMT"
0007 ugmtEmuDEDqmDir = ugmtEmuDqmDir+"/data_vs_emulator_comparison"
0008 ugmtEmuImdMuDqmDir = ugmtEmuDqmDir+"/intermediate_muons"
0009 # input histograms
0010 errHistNumStr = 'errorSummaryNum'
0011 errHistDenStr = 'errorSummaryDen'
0012 
0013 # Muons
0014 l1tStage2uGMTEmulatorCompRatioClient = DQMEDHarvester("L1TStage2RatioClient",
0015     monitorDir = cms.untracked.string(ugmtEmuDEDqmDir),
0016     inputNum = cms.untracked.string(ugmtEmuDEDqmDir+'/'+errHistNumStr),
0017     inputDen = cms.untracked.string(ugmtEmuDEDqmDir+'/'+errHistDenStr),
0018     ratioName = cms.untracked.string('mismatchRatio'),
0019     ratioTitle = cms.untracked.string('Summary of mismatch rates between uGMT muons and uGMT emulator muons'),
0020     yAxisTitle = cms.untracked.string('# mismatch / # total'),
0021     binomialErr = cms.untracked.bool(True)
0022 )
0023 ## Era: Run3_2021; Ignore BX range mismatches. This is necessary because we only read out the central BX for the inputs, so that is what the emulator has to work on.
0024 from Configuration.Eras.Modifier_stage2L1Trigger_2021_cff import stage2L1Trigger_2021
0025 stage2L1Trigger_2021.toModify(l1tStage2uGMTEmulatorCompRatioClient, ignoreBin = cms.untracked.vint32(ignoreFinalsBinsRun3))
0026 
0027 # Showers
0028 l1tStage2uGMTShowerEmulatorCompRatioClient = DQMEDHarvester("L1TStage2RatioClient",
0029     monitorDir = cms.untracked.string(ugmtEmuDEDqmDir+"/Muon showers"),
0030     inputNum = cms.untracked.string(ugmtEmuDEDqmDir+'/Muon showers/'+errHistNumStr),
0031     inputDen = cms.untracked.string(ugmtEmuDEDqmDir+'/Muon showers/'+errHistDenStr),
0032     ratioName = cms.untracked.string('mismatchRatio'),
0033     ratioTitle = cms.untracked.string('Summary of mismatch rates between uGMT showers and uGMT emulator showers'),
0034     yAxisTitle = cms.untracked.string('# mismatch / # total'),
0035     binomialErr = cms.untracked.bool(True),
0036     ignoreBin = cms.untracked.vint32(ignoreFinalsBinsRun3), # Ignore BX range mismatches. This is necessary because we only read out the central BX for the inputs, so that is what the emulator has to work on.
0037 )
0038 
0039 # intermediate muons
0040 titleStr = 'Summary of mismatch rates between uGMT intermediate muons and uGMT emulator intermediate muons from '
0041 l1tStage2uGMTEmulImdMuBMTFCompRatioClient = l1tStage2uGMTEmulatorCompRatioClient.clone()
0042 l1tStage2uGMTEmulImdMuBMTFCompRatioClient.monitorDir = cms.untracked.string(ugmtEmuImdMuDqmDir+'/BMTF/data_vs_emulator_comparison')
0043 l1tStage2uGMTEmulImdMuBMTFCompRatioClient.inputNum = cms.untracked.string(ugmtEmuImdMuDqmDir+'/BMTF/data_vs_emulator_comparison/'+errHistNumStr)
0044 l1tStage2uGMTEmulImdMuBMTFCompRatioClient.inputDen = cms.untracked.string(ugmtEmuImdMuDqmDir+'/BMTF/data_vs_emulator_comparison/'+errHistDenStr)
0045 l1tStage2uGMTEmulImdMuBMTFCompRatioClient.ratioTitle = cms.untracked.string(titleStr+'BMTF')
0046 l1tStage2uGMTEmulImdMuBMTFCompRatioClient.ignoreBin = cms.untracked.vint32(ignoreIntermediatesBins)
0047 ## Era: Run3_2021; Ignore BX range mismatches. This is necessary because we only read out the central BX for the inputs, so that is what the emulator has to work on.
0048 from Configuration.Eras.Modifier_stage2L1Trigger_2021_cff import stage2L1Trigger_2021
0049 stage2L1Trigger_2021.toModify(l1tStage2uGMTEmulImdMuBMTFCompRatioClient, ignoreBin = ignoreIntermediatesBinsRun3)
0050 
0051 l1tStage2uGMTEmulImdMuOMTFNegCompRatioClient = l1tStage2uGMTEmulImdMuBMTFCompRatioClient.clone()
0052 l1tStage2uGMTEmulImdMuOMTFNegCompRatioClient.monitorDir = cms.untracked.string(ugmtEmuImdMuDqmDir+'/OMTF_neg/data_vs_emulator_comparison')
0053 l1tStage2uGMTEmulImdMuOMTFNegCompRatioClient.inputNum = cms.untracked.string(ugmtEmuImdMuDqmDir+'/OMTF_neg/data_vs_emulator_comparison/'+errHistNumStr)
0054 l1tStage2uGMTEmulImdMuOMTFNegCompRatioClient.inputDen = cms.untracked.string(ugmtEmuImdMuDqmDir+'/OMTF_neg/data_vs_emulator_comparison/'+errHistDenStr)
0055 l1tStage2uGMTEmulImdMuOMTFNegCompRatioClient.ratioTitle = cms.untracked.string(titleStr+'OMTF-')
0056 
0057 l1tStage2uGMTEmulImdMuOMTFPosCompRatioClient = l1tStage2uGMTEmulImdMuBMTFCompRatioClient.clone()
0058 l1tStage2uGMTEmulImdMuOMTFPosCompRatioClient.monitorDir = cms.untracked.string(ugmtEmuImdMuDqmDir+'/OMTF_pos/data_vs_emulator_comparison')
0059 l1tStage2uGMTEmulImdMuOMTFPosCompRatioClient.inputNum = cms.untracked.string(ugmtEmuImdMuDqmDir+'/OMTF_pos/data_vs_emulator_comparison/'+errHistNumStr)
0060 l1tStage2uGMTEmulImdMuOMTFPosCompRatioClient.inputDen = cms.untracked.string(ugmtEmuImdMuDqmDir+'/OMTF_pos/data_vs_emulator_comparison/'+errHistDenStr)
0061 l1tStage2uGMTEmulImdMuOMTFPosCompRatioClient.ratioTitle = cms.untracked.string(titleStr+'OMTF+')
0062 
0063 l1tStage2uGMTEmulImdMuEMTFNegCompRatioClient = l1tStage2uGMTEmulImdMuBMTFCompRatioClient.clone()
0064 l1tStage2uGMTEmulImdMuEMTFNegCompRatioClient.monitorDir = cms.untracked.string(ugmtEmuImdMuDqmDir+'/EMTF_neg/data_vs_emulator_comparison')
0065 l1tStage2uGMTEmulImdMuEMTFNegCompRatioClient.inputNum = cms.untracked.string(ugmtEmuImdMuDqmDir+'/EMTF_neg/data_vs_emulator_comparison/'+errHistNumStr)
0066 l1tStage2uGMTEmulImdMuEMTFNegCompRatioClient.inputDen = cms.untracked.string(ugmtEmuImdMuDqmDir+'/EMTF_neg/data_vs_emulator_comparison/'+errHistDenStr)
0067 l1tStage2uGMTEmulImdMuEMTFNegCompRatioClient.ratioTitle = cms.untracked.string(titleStr+'EMTF-')
0068 
0069 l1tStage2uGMTEmulImdMuEMTFPosCompRatioClient = l1tStage2uGMTEmulImdMuBMTFCompRatioClient.clone()
0070 l1tStage2uGMTEmulImdMuEMTFPosCompRatioClient.monitorDir = cms.untracked.string(ugmtEmuImdMuDqmDir+'/EMTF_pos/data_vs_emulator_comparison')
0071 l1tStage2uGMTEmulImdMuEMTFPosCompRatioClient.inputNum = cms.untracked.string(ugmtEmuImdMuDqmDir+'/EMTF_pos/data_vs_emulator_comparison/'+errHistNumStr)
0072 l1tStage2uGMTEmulImdMuEMTFPosCompRatioClient.inputDen = cms.untracked.string(ugmtEmuImdMuDqmDir+'/EMTF_pos/data_vs_emulator_comparison/'+errHistDenStr)
0073 l1tStage2uGMTEmulImdMuEMTFPosCompRatioClient.ratioTitle = cms.untracked.string(titleStr+'EMTF+')
0074 
0075 # sequences
0076 l1tStage2uGMTEmulatorClient = cms.Sequence(
0077     l1tStage2uGMTEmulatorCompRatioClient
0078   + l1tStage2uGMTEmulImdMuBMTFCompRatioClient
0079   + l1tStage2uGMTEmulImdMuOMTFNegCompRatioClient
0080   + l1tStage2uGMTEmulImdMuOMTFPosCompRatioClient
0081   + l1tStage2uGMTEmulImdMuEMTFNegCompRatioClient
0082   + l1tStage2uGMTEmulImdMuEMTFPosCompRatioClient
0083 )
0084 
0085 # Add shower tests for Run3
0086 _run3_l1tStage2uGMTEmulatorClient = cms.Sequence(l1tStage2uGMTEmulatorClient.copy() + l1tStage2uGMTShowerEmulatorCompRatioClient)
0087 stage2L1Trigger_2021.toReplaceWith(l1tStage2uGMTEmulatorClient, _run3_l1tStage2uGMTEmulatorClient)