Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 # the uGMT DQM module
0004 from DQM.L1TMonitor.L1TStage2uGMT_cfi import *
0005 from DQM.L1TMonitor.L1TStage2uGMTInputBxDistributions_cfi import *
0006 
0007 # the uGMT intermediate muon DQM modules
0008 from DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer
0009 l1tStage2uGMTIntermediateBMTF = DQMEDAnalyzer(
0010     "L1TStage2uGMTMuon",
0011     muonProducer = cms.InputTag("gmtStage2Digis", "imdMuonsBMTF"),
0012     monitorDir = cms.untracked.string("L1T/L1TStage2uGMT/intermediate_muons/BMTF"),
0013     titlePrefix = cms.untracked.string("uGMT intermediate muon from BMTF "),
0014     verbose = cms.untracked.bool(False),
0015     displacedQuantities = cms.untracked.bool(False)
0016 )
0017 
0018 ## Era: Run3_2021; Displaced muons from BMTF used in uGMT from Run-3
0019 from Configuration.Eras.Modifier_stage2L1Trigger_2021_cff import stage2L1Trigger_2021
0020 stage2L1Trigger_2021.toModify(l1tStage2uGMTIntermediateBMTF, displacedQuantities = cms.untracked.bool(True))
0021 
0022 l1tStage2uGMTIntermediateOMTFNeg = DQMEDAnalyzer(
0023     "L1TStage2uGMTMuon",
0024     muonProducer = cms.InputTag("gmtStage2Digis", "imdMuonsOMTFNeg"),
0025     monitorDir = cms.untracked.string("L1T/L1TStage2uGMT/intermediate_muons/OMTF_neg"),
0026     titlePrefix = cms.untracked.string("uGMT intermediate muon from OMTF neg. "),
0027     verbose = cms.untracked.bool(False),
0028     displacedQuantities = cms.untracked.bool(False)
0029 )
0030 
0031 l1tStage2uGMTIntermediateOMTFPos = DQMEDAnalyzer(
0032     "L1TStage2uGMTMuon",
0033     muonProducer = cms.InputTag("gmtStage2Digis", "imdMuonsOMTFPos"),
0034     monitorDir = cms.untracked.string("L1T/L1TStage2uGMT/intermediate_muons/OMTF_pos"),
0035     titlePrefix = cms.untracked.string("uGMT intermediate muon from OMTF pos. "),
0036     verbose = cms.untracked.bool(False),
0037     displacedQuantities = cms.untracked.bool(False)
0038 )
0039 
0040 l1tStage2uGMTIntermediateEMTFNeg = DQMEDAnalyzer(
0041     "L1TStage2uGMTMuon",
0042     muonProducer = cms.InputTag("gmtStage2Digis", "imdMuonsEMTFNeg"),
0043     monitorDir = cms.untracked.string("L1T/L1TStage2uGMT/intermediate_muons/EMTF_neg"),
0044     titlePrefix = cms.untracked.string("uGMT intermediate muon from EMTF neg. "),
0045     verbose = cms.untracked.bool(False),
0046     displacedQuantities = cms.untracked.bool(False)
0047 )
0048 
0049 l1tStage2uGMTIntermediateEMTFPos = DQMEDAnalyzer(
0050     "L1TStage2uGMTMuon",
0051     muonProducer = cms.InputTag("gmtStage2Digis", "imdMuonsEMTFPos"),
0052     monitorDir = cms.untracked.string("L1T/L1TStage2uGMT/intermediate_muons/EMTF_pos"),
0053     titlePrefix = cms.untracked.string("uGMT intermediate muon from EMTF pos. "),
0054     verbose = cms.untracked.bool(False),
0055     displacedQuantities = cms.untracked.bool(False)
0056 )
0057 
0058 ## Era: Run3_2021; Displaced muons from EMTF used in uGMT from Run-3
0059 stage2L1Trigger_2021.toModify(l1tStage2uGMTIntermediateEMTFNeg, displacedQuantities = cms.untracked.bool(True))
0060 stage2L1Trigger_2021.toModify(l1tStage2uGMTIntermediateEMTFPos, displacedQuantities = cms.untracked.bool(True))
0061 
0062 # List of bins to ignore
0063 ignoreBins = {
0064     'OutputCopies' : [1],
0065     'Bmtf'         : [1],
0066     'Omtf'         : [1],
0067     'Emtf'         : [1],
0068     'EmtfShowers'  : [1]
0069     }
0070 
0071 # compares the unpacked BMTF output regional muon collection with the unpacked uGMT input regional muon collection from BMTF
0072 # only muons that do not match are filled in the histograms
0073 l1tStage2BmtfOutVsuGMTIn = DQMEDAnalyzer(
0074     "L1TStage2RegionalMuonCandComp",
0075     regionalMuonCollection1 = cms.InputTag("bmtfDigis", "BMTF"),
0076     regionalMuonCollection2 = cms.InputTag("gmtStage2Digis", "BMTF"),
0077     monitorDir = cms.untracked.string("L1T/L1TStage2uGMT/BMTFoutput_vs_uGMTinput"),
0078     regionalMuonCollection1Title = cms.untracked.string("BMTF output data"),
0079     regionalMuonCollection2Title = cms.untracked.string("uGMT input data from BMTF"),
0080     summaryTitle = cms.untracked.string("Summary of comparison between BMTF output muons and uGMT input muons from BMTF"),
0081     ignoreBin = cms.untracked.vint32(ignoreBins['Bmtf']),
0082     verbose = cms.untracked.bool(False),
0083 )
0084 
0085 ## Era: Run3_2021; Displaced muons from BMTF used in uGMT from Run-3
0086 from Configuration.Eras.Modifier_stage2L1Trigger_2021_cff import stage2L1Trigger_2021
0087 stage2L1Trigger_2021.toModify(l1tStage2BmtfOutVsuGMTIn, hasDisplacementInfo = cms.untracked.bool(True))
0088 
0089 # compares the unpacked OMTF output regional muon collection with the unpacked uGMT input regional muon collection from OMTF
0090 # only muons that do not match are filled in the histograms
0091 l1tStage2OmtfOutVsuGMTIn = DQMEDAnalyzer(
0092     "L1TStage2RegionalMuonCandComp",
0093     regionalMuonCollection1 = cms.InputTag("omtfStage2Digis", ""),
0094     regionalMuonCollection2 = cms.InputTag("gmtStage2Digis", "OMTF"),
0095     monitorDir = cms.untracked.string("L1T/L1TStage2uGMT/OMTFoutput_vs_uGMTinput"),
0096     regionalMuonCollection1Title = cms.untracked.string("OMTF output data"),
0097     regionalMuonCollection2Title = cms.untracked.string("uGMT input data from OMTF"),
0098     summaryTitle = cms.untracked.string("Summary of comparison between OMTF output muons and uGMT input muons from OMTF"),
0099     ignoreBin = cms.untracked.vint32(ignoreBins['Omtf']),
0100     verbose = cms.untracked.bool(False),
0101 )
0102 
0103 # compares the unpacked EMTF output regional muon collection with the unpacked uGMT input regional muon collection from EMTF
0104 # only muons that do not match are filled in the histograms
0105 l1tStage2EmtfOutVsuGMTIn = DQMEDAnalyzer(
0106     "L1TStage2RegionalMuonCandComp",
0107     regionalMuonCollection1 = cms.InputTag("emtfStage2Digis"),
0108     regionalMuonCollection2 = cms.InputTag("gmtStage2Digis", "EMTF"),
0109     monitorDir = cms.untracked.string("L1T/L1TStage2uGMT/EMTFoutput_vs_uGMTinput"),
0110     regionalMuonCollection1Title = cms.untracked.string("EMTF output data"),
0111     regionalMuonCollection2Title = cms.untracked.string("uGMT input data from EMTF"),
0112     summaryTitle = cms.untracked.string("Summary of comparison between EMTF output muons and uGMT input muons from EMTF"),
0113     ignoreBin = cms.untracked.vint32(ignoreBins['Emtf']),
0114     verbose = cms.untracked.bool(False),
0115 )
0116 
0117 ## Era: Run3_2021; Displaced muons from EMTF used in uGMT from Run-3
0118 stage2L1Trigger_2021.toModify(l1tStage2EmtfOutVsuGMTIn, hasDisplacementInfo = cms.untracked.bool(True))
0119 
0120 # compares the unpacked EMTF output regional muon shower collection with the unpacked uGMT input regional muon shower collection from EMTF
0121 # only muons that do not match are filled in the histograms
0122 l1tStage2EmtfOutVsuGMTInShowers = DQMEDAnalyzer(
0123     "L1TStage2RegionalMuonShowerComp",
0124     regionalMuonShowerCollection1 = cms.InputTag("emtfStage2Digis"),
0125     regionalMuonShowerCollection2 = cms.InputTag("gmtStage2Digis", "EMTF"),
0126     monitorDir = cms.untracked.string("L1T/L1TStage2uGMT/EMTFoutput_vs_uGMTinput/Muon Showers"),
0127     regionalMuonShowerCollection1Title = cms.untracked.string("EMTF output data"),
0128     regionalMuonShowerCollection2Title = cms.untracked.string("uGMT input data from EMTF"),
0129     summaryTitle = cms.untracked.string("Summary of comparison between EMTF output showers and uGMT input showers from EMTF"),
0130     ignoreBin = cms.untracked.vint32(ignoreBins['EmtfShowers']),
0131     verbose = cms.untracked.bool(False),
0132 )
0133 
0134 # The five modules below compare the primary unpacked uGMT muon collection to goes to uGT board 0
0135 # to the unpacked uGMT muon collections that are sent to uGT boards 1 to 5.
0136 # Only muons that do not match are filled in the histograms
0137 l1tStage2uGMTMuonVsuGMTMuonCopy1 = DQMEDAnalyzer(
0138     "L1TStage2MuonComp",
0139     muonCollection1 = cms.InputTag("gmtStage2Digis", "Muon"),
0140     muonCollection2 = cms.InputTag("gmtStage2Digis", "MuonCopy1"),
0141     monitorDir = cms.untracked.string("L1T/L1TStage2uGMT/uGMTMuonCopies/uGMTMuonCopy1"),
0142     muonCollection1Title = cms.untracked.string("uGMT muons"),
0143     muonCollection2Title = cms.untracked.string("uGMT muons copy 1"),
0144     summaryTitle = cms.untracked.string("Summary of comparison between uGMT muons and uGMT muon copy 1"),
0145     verbose = cms.untracked.bool(False),
0146     displacedQuantities = cms.untracked.bool(False),
0147     ignoreBin = cms.untracked.vint32(),
0148 )
0149 
0150 ## Era: Run3_2021; Displaced muons used in uGMT from Run-3
0151  # Additionally: Ignore BX range mismatches. This is necessary because we only read out the central BX for the output copies.
0152 from Configuration.Eras.Modifier_stage2L1Trigger_2021_cff import stage2L1Trigger_2021
0153 stage2L1Trigger_2021.toModify(l1tStage2uGMTMuonVsuGMTMuonCopy1, displacedQuantities = cms.untracked.bool(True), ignoreBin = cms.untracked.vint32(ignoreBins['OutputCopies']))
0154 
0155 l1tStage2uGMTMuonVsuGMTMuonCopy2 = l1tStage2uGMTMuonVsuGMTMuonCopy1.clone(
0156     muonCollection2 = "gmtStage2Digis:MuonCopy2",
0157     monitorDir = "L1T/L1TStage2uGMT/uGMTMuonCopies/uGMTMuonCopy2",
0158     muonCollection2Title = "uGMT muons copy 2",
0159     summaryTitle = "Summary of comparison between uGMT muons and uGMT muon copy 2"
0160 )
0161 l1tStage2uGMTMuonVsuGMTMuonCopy3 = l1tStage2uGMTMuonVsuGMTMuonCopy1.clone(
0162     muonCollection2 = "gmtStage2Digis:MuonCopy3",
0163     monitorDir = "L1T/L1TStage2uGMT/uGMTMuonCopies/uGMTMuonCopy3",
0164     muonCollection2Title = "uGMT muons copy 3",
0165     summaryTitle = "Summary of comparison between uGMT muons and uGMT muon copy 3"
0166 )
0167 l1tStage2uGMTMuonVsuGMTMuonCopy4 = l1tStage2uGMTMuonVsuGMTMuonCopy1.clone(
0168     muonCollection2 = "gmtStage2Digis:MuonCopy4",
0169     monitorDir = "L1T/L1TStage2uGMT/uGMTMuonCopies/uGMTMuonCopy4",
0170     muonCollection2Title = "uGMT muons copy 4",
0171     summaryTitle = "Summary of comparison between uGMT muons and uGMT muon copy 4"
0172 )
0173 l1tStage2uGMTMuonVsuGMTMuonCopy5 = l1tStage2uGMTMuonVsuGMTMuonCopy1.clone(
0174     muonCollection2 = "gmtStage2Digis:MuonCopy5",
0175     monitorDir = "L1T/L1TStage2uGMT/uGMTMuonCopies/uGMTMuonCopy5",
0176     muonCollection2Title = "uGMT muons copy 5",
0177     summaryTitle = "Summary of comparison between uGMT muons and uGMT muon copy 5"
0178 )
0179 
0180 l1tStage2uGMTMuonShowerVsuGMTMuonShowerCopy1= DQMEDAnalyzer("L1TStage2MuonShowerComp",
0181     muonShowerCollection1 = cms.InputTag("gmtStage2Digis", "MuonShower"),
0182     muonShowerCollection2 = cms.InputTag("gmtStage2Digis", "MuonShowerCopy1"),
0183     monitorDir = cms.untracked.string("L1T/L1TStage2uGMT/uGMTMuonShowerCopies/uGMTMuonShowerCopy1"),
0184     muonShowerCollection1Title = cms.untracked.string("uGMT muon showers"),
0185     muonShowerCollection2Title = cms.untracked.string("uGMT muon showers copy 1"),
0186     summaryTitle = cms.untracked.string("Summary of comparison between uGMT showers and uGMT shower copy 1"),
0187     verbose = cms.untracked.bool(False),
0188     ignoreBin = cms.untracked.vint32(ignoreBins['OutputCopies']), # Ignore BX range mismatches. This is necessary because we only read out the central BX for the output copies.
0189 )
0190 
0191 l1tStage2uGMTMuonShowerVsuGMTMuonShowerCopy2 = l1tStage2uGMTMuonShowerVsuGMTMuonShowerCopy1.clone(
0192     muonShowerCollection2 = "gmtStage2Digis:MuonShowerCopy2",
0193     monitorDir = "L1T/L1TStage2uGMT/uGMTMuonShowerCopies/uGMTMuonShowerCopy2",
0194     muonShowerCollection2Title = "uGMT muon showers copy 2",
0195     summaryTitle = "Summary of comparison between uGMT showers and uGMT shower copy 2"
0196 )
0197 l1tStage2uGMTMuonShowerVsuGMTMuonShowerCopy3 = l1tStage2uGMTMuonShowerVsuGMTMuonShowerCopy1.clone(
0198     muonShowerCollection2 = "gmtStage2Digis:MuonShowerCopy3",
0199     monitorDir = "L1T/L1TStage2uGMT/uGMTMuonShowerCopies/uGMTMuonShowerCopy3",
0200     muonShowerCollection2Title = "uGMT muon showers copy 3",
0201     summaryTitle = "Summary of comparison between uGMT showers and uGMT shower copy 3"
0202 )
0203 l1tStage2uGMTMuonShowerVsuGMTMuonShowerCopy4 = l1tStage2uGMTMuonShowerVsuGMTMuonShowerCopy1.clone(
0204     muonShowerCollection2 = "gmtStage2Digis:MuonShowerCopy4",
0205     monitorDir = "L1T/L1TStage2uGMT/uGMTMuonShowerCopies/uGMTMuonShowerCopy4",
0206     muonShowerCollection2Title = "uGMT muon showers copy 4",
0207     summaryTitle = "Summary of comparison between uGMT showers and uGMT shower copy 4"
0208 )
0209 l1tStage2uGMTMuonShowerVsuGMTMuonShowerCopy5 = l1tStage2uGMTMuonShowerVsuGMTMuonShowerCopy1.clone(
0210     muonShowerCollection2 = "gmtStage2Digis:MuonShowerCopy5",
0211     monitorDir = "L1T/L1TStage2uGMT/uGMTMuonShowerCopies/uGMTMuonShowerCopy5",
0212     muonShowerCollection2Title = "uGMT muon showers copy 5",
0213     summaryTitle = "Summary of comparison between uGMT showers and uGMT shower copy 5"
0214 )
0215 
0216 # sequences
0217 l1tStage2uGMTOnlineDQMSeq = cms.Sequence(
0218     l1tStage2uGMT +
0219     l1tStage2uGMTInputBxDistributions +
0220     l1tStage2uGMTIntermediateBMTF +
0221     l1tStage2uGMTIntermediateOMTFNeg +
0222     l1tStage2uGMTIntermediateOMTFPos +
0223     l1tStage2uGMTIntermediateEMTFNeg +
0224     l1tStage2uGMTIntermediateEMTFPos +
0225     l1tStage2BmtfOutVsuGMTIn +
0226     l1tStage2OmtfOutVsuGMTIn +
0227     l1tStage2EmtfOutVsuGMTIn
0228 )
0229 
0230 l1tStage2uGMTValidationEventOnlineDQMSeq = cms.Sequence(
0231     l1tStage2uGMTMuonVsuGMTMuonCopy1 +
0232     l1tStage2uGMTMuonVsuGMTMuonCopy2 +
0233     l1tStage2uGMTMuonVsuGMTMuonCopy3 +
0234     l1tStage2uGMTMuonVsuGMTMuonCopy4 +
0235     l1tStage2uGMTMuonVsuGMTMuonCopy5
0236 )
0237 
0238 
0239 ## Era: Run3_2021; Hadronic showers from EMTF used in uGMT from Run-3. Comparing output copies routinely, but moving the uGMT BX distribution plots behind the fat event filter so the BX comparisons aren't biased.
0240 from Configuration.Eras.Modifier_stage2L1Trigger_2021_cff import stage2L1Trigger_2021
0241 
0242 _run3_l1tStage2uGMTOnlineDQMSeq = cms.Sequence(l1tStage2uGMTOnlineDQMSeq.copy() +
0243     l1tStage2uGMTMuonVsuGMTMuonCopy1 +
0244     l1tStage2uGMTMuonVsuGMTMuonCopy2 +
0245     l1tStage2uGMTMuonVsuGMTMuonCopy3 +
0246     l1tStage2uGMTMuonVsuGMTMuonCopy4 +
0247     l1tStage2uGMTMuonVsuGMTMuonCopy5 +
0248     l1tStage2EmtfOutVsuGMTInShowers +
0249     l1tStage2uGMTMuonShowerVsuGMTMuonShowerCopy1 +
0250     l1tStage2uGMTMuonShowerVsuGMTMuonShowerCopy2 +
0251     l1tStage2uGMTMuonShowerVsuGMTMuonShowerCopy3 +
0252     l1tStage2uGMTMuonShowerVsuGMTMuonShowerCopy4 +
0253     l1tStage2uGMTMuonShowerVsuGMTMuonShowerCopy5
0254 )
0255 _run3_l1tStage2uGMTOnlineDQMSeq.remove(l1tStage2uGMTInputBxDistributions)
0256 stage2L1Trigger_2021.toReplaceWith(l1tStage2uGMTOnlineDQMSeq, _run3_l1tStage2uGMTOnlineDQMSeq)
0257 
0258 # The following needs to go after the fat events filter, because inputs are read out with only the central BX for the standard events, so the BX distributions would otherwise be heavily biased toward the central BX.
0259 _run3_l1tStage2uGMTValidationEventOnlineDQMSeq = cms.Sequence(l1tStage2uGMTInputBxDistributions)
0260 stage2L1Trigger_2021.toReplaceWith(l1tStage2uGMTValidationEventOnlineDQMSeq, _run3_l1tStage2uGMTValidationEventOnlineDQMSeq)