Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:07:58

0001 import FWCore.ParameterSet.Config as cms
0002 from DQMServices.Core.DQMEDHarvester import DQMEDHarvester
0003 from DQM.L1TMonitor.L1TStage2uGMT_cff import ignoreBins
0004 
0005 # directory path shortening
0006 ugmtDqmDir = 'L1T/L1TStage2uGMT'
0007 ugmtMuCpyDqmDir = ugmtDqmDir+'/uGMTMuonCopies'
0008 # input histograms
0009 errHistNumStr = 'errorSummaryNum'
0010 errHistDenStr = 'errorSummaryDen'
0011 
0012 # Muons
0013 l1tStage2uGMTMuonVsuGMTMuonCopy1RatioClient = DQMEDHarvester("L1TStage2RatioClient",
0014     monitorDir = cms.untracked.string(ugmtMuCpyDqmDir+'/uGMTMuonCopy1'),
0015     inputNum = cms.untracked.string(ugmtMuCpyDqmDir+'/uGMTMuonCopy1/'+errHistNumStr),
0016     inputDen = cms.untracked.string(ugmtMuCpyDqmDir+'/uGMTMuonCopy1/'+errHistDenStr),
0017     ratioName = cms.untracked.string('mismatchRatio'),
0018     ratioTitle = cms.untracked.string('Summary of mismatch rates between uGMT muons and uGMT muon copy 1'),
0019     yAxisTitle = cms.untracked.string('# mismatch / # total'),
0020     binomialErr = cms.untracked.bool(True),
0021     ignoreBin = cms.untracked.vint32()                                                         
0022 )
0023 ## Era: Run3_2021; Ignore BX range mismatches. This is necessary because we only read out the central BX for the output copies.
0024 from Configuration.Eras.Modifier_stage2L1Trigger_2021_cff import stage2L1Trigger_2021
0025 stage2L1Trigger_2021.toModify(l1tStage2uGMTMuonVsuGMTMuonCopy1RatioClient, ignoreBin = cms.untracked.vint32(ignoreBins['OutputCopies']))
0026 
0027 l1tStage2uGMTMuonVsuGMTMuonCopy2RatioClient = l1tStage2uGMTMuonVsuGMTMuonCopy1RatioClient.clone(
0028     monitorDir = ugmtMuCpyDqmDir+'/uGMTMuonCopy2',
0029     inputNum = ugmtMuCpyDqmDir+'/uGMTMuonCopy2/'+errHistNumStr,
0030     inputDen = ugmtMuCpyDqmDir+'/uGMTMuonCopy2/'+errHistDenStr,
0031     ratioTitle = 'Summary of mismatch rates between uGMT muons and uGMT muon copy 2'
0032 )
0033 l1tStage2uGMTMuonVsuGMTMuonCopy3RatioClient = l1tStage2uGMTMuonVsuGMTMuonCopy1RatioClient.clone(
0034     monitorDir = ugmtMuCpyDqmDir+'/uGMTMuonCopy3',
0035     inputNum = ugmtMuCpyDqmDir+'/uGMTMuonCopy3/'+errHistNumStr,
0036     inputDen = ugmtMuCpyDqmDir+'/uGMTMuonCopy3/'+errHistDenStr,
0037     ratioTitle = 'Summary of mismatch rates between uGMT muons and uGMT muon copy 3'
0038 )
0039 l1tStage2uGMTMuonVsuGMTMuonCopy4RatioClient = l1tStage2uGMTMuonVsuGMTMuonCopy1RatioClient.clone(
0040     monitorDir = ugmtMuCpyDqmDir+'/uGMTMuonCopy4',
0041     inputNum = ugmtMuCpyDqmDir+'/uGMTMuonCopy4/'+errHistNumStr,
0042     inputDen = ugmtMuCpyDqmDir+'/uGMTMuonCopy4/'+errHistDenStr,
0043     ratioTitle = 'Summary of mismatch rates between uGMT muons and uGMT muon copy 4'
0044 )
0045 l1tStage2uGMTMuonVsuGMTMuonCopy5RatioClient = l1tStage2uGMTMuonVsuGMTMuonCopy1RatioClient.clone(
0046     monitorDir = ugmtMuCpyDqmDir+'/uGMTMuonCopy5',
0047     inputNum = ugmtMuCpyDqmDir+'/uGMTMuonCopy5/'+errHistNumStr,
0048     inputDen = ugmtMuCpyDqmDir+'/uGMTMuonCopy5/'+errHistDenStr,
0049     ratioTitle = 'Summary of mismatch rates between uGMT muons and uGMT muon copy 5'
0050 )
0051 
0052 # Showers
0053 l1tStage2uGMTShowerVsuGMTShowerCopy1RatioClient = l1tStage2uGMTMuonVsuGMTMuonCopy1RatioClient.clone(
0054     monitorDir = ugmtMuCpyDqmDir+'/uGMTMuonShoweruGMTMuonShowerCopy2',
0055     inputNum = ugmtMuCpyDqmDir+'/uGMTMuonShowerCopies/uGMTMuonShowerCopy1/'+errHistNumStr,
0056     inputDen = ugmtMuCpyDqmDir+'/uGMTMuonShowerCopies/uGMTMuonShowerCopy1/'+errHistDenStr,
0057     ratioTitle = 'Summary of mismatch rates between uGMT showers and uGMT shower copy 1',
0058     ignoreBin = cms.untracked.vint32(ignoreBins['OutputCopies'])
0059 )
0060 l1tStage2uGMTShowerVsuGMTShowerCopy2RatioClient = l1tStage2uGMTMuonVsuGMTMuonCopy1RatioClient.clone(
0061     monitorDir = ugmtMuCpyDqmDir+'/uGMTMuonShoweruGMTMuonShowerCopy2',
0062     inputNum = ugmtMuCpyDqmDir+'/uGMTMuonShowerCopies/uGMTMuonShowerCopy2/'+errHistNumStr,
0063     inputDen = ugmtMuCpyDqmDir+'/uGMTMuonShowerCopies/uGMTMuonShowerCopy2/'+errHistDenStr,
0064     ratioTitle = 'Summary of mismatch rates between uGMT showers and uGMT shower copy 2',
0065     ignoreBin = cms.untracked.vint32(ignoreBins['OutputCopies'])
0066 )
0067 l1tStage2uGMTShowerVsuGMTShowerCopy3RatioClient = l1tStage2uGMTMuonVsuGMTMuonCopy1RatioClient.clone(
0068     monitorDir = ugmtMuCpyDqmDir+'/uGMTMuonShoweruGMTMuonShowerCopy3',
0069     inputNum = ugmtMuCpyDqmDir+'/uGMTMuonShowerCopies/uGMTMuonShowerCopy3/'+errHistNumStr,
0070     inputDen = ugmtMuCpyDqmDir+'/uGMTMuonShowerCopies/uGMTMuonShowerCopy3/'+errHistDenStr,
0071     ratioTitle = 'Summary of mismatch rates between uGMT showers and uGMT shower copy 3',
0072     ignoreBin = cms.untracked.vint32(ignoreBins['OutputCopies'])
0073 )
0074 l1tStage2uGMTShowerVsuGMTShowerCopy4RatioClient = l1tStage2uGMTMuonVsuGMTMuonCopy1RatioClient.clone(
0075     monitorDir = ugmtMuCpyDqmDir+'/uGMTMuonShoweruGMTMuonShowerCopy4',
0076     inputNum = ugmtMuCpyDqmDir+'/uGMTMuonShowerCopies/uGMTMuonShowerCopy4/'+errHistNumStr,
0077     inputDen = ugmtMuCpyDqmDir+'/uGMTMuonShowerCopies/uGMTMuonShowerCopy4/'+errHistDenStr,
0078     ratioTitle = 'Summary of mismatch rates between uGMT showers and uGMT shower copy 4',
0079     ignoreBin = cms.untracked.vint32(ignoreBins['OutputCopies'])
0080 )
0081 l1tStage2uGMTShowerVsuGMTShowerCopy5RatioClient = l1tStage2uGMTMuonVsuGMTMuonCopy1RatioClient.clone(
0082     monitorDir = ugmtMuCpyDqmDir+'/uGMTMuonShoweruGMTMuonShowerCopy5',
0083     inputNum = ugmtMuCpyDqmDir+'/uGMTMuonShowerCopies/uGMTMuonShowerCopy5/'+errHistNumStr,
0084     inputDen = ugmtMuCpyDqmDir+'/uGMTMuonShowerCopies/uGMTMuonShowerCopy5/'+errHistDenStr,
0085     ratioTitle = 'Summary of mismatch rates between uGMT showers and uGMT shower copy 5',
0086     ignoreBin = cms.untracked.vint32(ignoreBins['OutputCopies'])
0087 )
0088 
0089 # RegionalMuonCands
0090 l1tStage2BmtfOutVsuGMTInRatioClient = l1tStage2uGMTMuonVsuGMTMuonCopy1RatioClient.clone(
0091     monitorDir = ugmtDqmDir+'/BMTFoutput_vs_uGMTinput',
0092     inputNum = ugmtDqmDir+'/BMTFoutput_vs_uGMTinput/'+errHistNumStr,
0093     inputDen = ugmtDqmDir+'/BMTFoutput_vs_uGMTinput/'+errHistDenStr,
0094     ratioTitle = 'Summary of mismatch rates between BMTF output muons and uGMT input muons from BMTF',
0095     ignoreBin =  ignoreBins['Bmtf']
0096 )
0097 l1tStage2OmtfOutVsuGMTInRatioClient = l1tStage2uGMTMuonVsuGMTMuonCopy1RatioClient.clone(
0098     monitorDir = ugmtDqmDir+'/OMTFoutput_vs_uGMTinput',
0099     inputNum = ugmtDqmDir+'/OMTFoutput_vs_uGMTinput/'+errHistNumStr,
0100     inputDen = ugmtDqmDir+'/OMTFoutput_vs_uGMTinput/'+errHistDenStr,
0101     ratioTitle = 'Summary of mismatch rates between OMTF output muons and uGMT input muons from OMTF',
0102     ignoreBin = ignoreBins['Omtf']
0103 )
0104 l1tStage2EmtfOutVsuGMTInRatioClient = l1tStage2uGMTMuonVsuGMTMuonCopy1RatioClient.clone(
0105     monitorDir = ugmtDqmDir+'/EMTFoutput_vs_uGMTinput',
0106     inputNum = ugmtDqmDir+'/EMTFoutput_vs_uGMTinput/'+errHistNumStr,
0107     inputDen = ugmtDqmDir+'/EMTFoutput_vs_uGMTinput/'+errHistDenStr,
0108     ratioTitle = 'Summary of mismatch rates between EMTF output muons and uGMT input muons from EMTF',
0109     ignoreBin = ignoreBins['Emtf']
0110 )
0111 
0112 # RegionalShowerCands
0113 l1tStage2EmtfOutVsuGMTInShowerRatioClient = l1tStage2uGMTMuonVsuGMTMuonCopy1RatioClient.clone(
0114     monitorDir = ugmtDqmDir+'/EMTFoutput_vs_uGMTinput/Muon Showers',
0115     inputNum = ugmtDqmDir+'/EMTFoutput_vs_uGMTinput/Muon Showers/'+errHistNumStr,
0116     inputDen = ugmtDqmDir+'/EMTFoutput_vs_uGMTinput/Muon Showers/'+errHistDenStr,
0117     ratioTitle = 'Summary of mismatch rates between EMTF output showers and uGMT input showers from EMTF',
0118     ignoreBin = ignoreBins['EmtfShowers']
0119 )
0120 
0121 # sequences
0122 l1tStage2uGMTMuonCompClient = cms.Sequence(
0123     l1tStage2uGMTMuonVsuGMTMuonCopy1RatioClient
0124   + l1tStage2uGMTMuonVsuGMTMuonCopy2RatioClient
0125   + l1tStage2uGMTMuonVsuGMTMuonCopy3RatioClient
0126   + l1tStage2uGMTMuonVsuGMTMuonCopy4RatioClient
0127   + l1tStage2uGMTMuonVsuGMTMuonCopy5RatioClient
0128 )
0129 # Add shower copy tests for Run-3
0130 _run3_l1tStage2uGMTMuonCompClient = cms.Sequence(
0131     l1tStage2uGMTMuonCompClient.copy()
0132   + l1tStage2uGMTShowerVsuGMTShowerCopy1RatioClient
0133   + l1tStage2uGMTShowerVsuGMTShowerCopy2RatioClient
0134   + l1tStage2uGMTShowerVsuGMTShowerCopy3RatioClient
0135   + l1tStage2uGMTShowerVsuGMTShowerCopy4RatioClient
0136   + l1tStage2uGMTShowerVsuGMTShowerCopy5RatioClient
0137 )
0138 stage2L1Trigger_2021.toReplaceWith(l1tStage2uGMTMuonCompClient, _run3_l1tStage2uGMTMuonCompClient)
0139 
0140 l1tStage2uGMTRegionalMuonCandCompClient = cms.Sequence(
0141     l1tStage2BmtfOutVsuGMTInRatioClient
0142   + l1tStage2OmtfOutVsuGMTInRatioClient
0143   + l1tStage2EmtfOutVsuGMTInRatioClient
0144 )
0145 # Add input vs. output shower tests in Run-3.
0146 _run3_l1tStage2uGMTRegionalMuonCandCompClient = cms.Sequence(l1tStage2uGMTRegionalMuonCandCompClient.copy() + l1tStage2EmtfOutVsuGMTInShowerRatioClient)
0147 stage2L1Trigger_2021.toReplaceWith(l1tStage2uGMTRegionalMuonCandCompClient, _run3_l1tStage2uGMTRegionalMuonCandCompClient)
0148 
0149 l1tStage2uGMTClient = cms.Sequence(
0150     l1tStage2uGMTMuonCompClient
0151   + l1tStage2uGMTRegionalMuonCandCompClient
0152 )
0153