CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
L1TriggerDqmOffline_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 # L1 Trigger DQM sequence for offline DQM
4 #
5 # used by DQM GUI: DQM/Configuration
6 #
7 #
8 #
9 # standard RawToDigi sequence and RECO sequence must be run before the L1 Trigger modules,
10 # labels from the standard sequence are used as default for the L1 Trigger DQM modules
11 #
12 # V.M. Ghete - HEPHY Vienna - 2011-01-02
13 #
14 
15 
16 #
17 # DQM L1 Trigger in offline environment
18 #
19 
21 dqmEnvL1T = DQMServices.Components.DQMEnvironment_cfi.dqmEnv.clone()
22 dqmEnvL1T.subSystemFolder = 'L1T'
23 
24 # DQM online L1 Trigger modules, with offline configuration
27 
28 
29 # DQM offline L1 Trigger versus Reco modules
30 
32 dqmEnvL1TriggerReco = DQMServices.Components.DQMEnvironment_cfi.dqmEnv.clone()
33 dqmEnvL1TriggerReco.subSystemFolder = 'L1T/L1TriggerVsReco'
34 
35 #
36 # DQM L1 Trigger Emulator in offline environment
37 # Run also the L1HwVal producers (L1 Trigger emulators)
38 #
39 
41 dqmEnvL1TEMU = DQMServices.Components.DQMEnvironment_cfi.dqmEnv.clone()
42 dqmEnvL1TEMU.subSystemFolder = 'L1TEMU'
43 
44 # DQM Offline Step 1 cfi/cff imports
51 l1TdeRCT.rctSourceData = 'gctDigis'
52 
53 # DQM Offline Step 2 cfi/cff imports
56 
57 
58 # Stage1 customization
59 l1TdeRCT.rctSourceData = 'gctDigis'
60 l1TdeRCTfromRCT.rctSourceData = 'gctDigis'
61 l1tRct.rctSource = 'gctDigis'
62 l1tRctfromRCT.rctSource = 'gctDigis'
63 l1tPUM.regionSource = cms.InputTag("gctDigis")
64 
65 l1tStage1Layer2.gctCentralJetsSource = cms.InputTag("gctDigis","cenJets")
66 l1tStage1Layer2.gctForwardJetsSource = cms.InputTag("gctDigis","forJets")
67 l1tStage1Layer2.gctTauJetsSource = cms.InputTag("gctDigis","tauJets")
68 l1tStage1Layer2.gctIsoTauJetsSource = cms.InputTag("","")
69 l1tStage1Layer2.gctEnergySumsSource = cms.InputTag("gctDigis")
70 l1tStage1Layer2.gctIsoEmSource = cms.InputTag("gctDigis","isoEm")
71 l1tStage1Layer2.gctNonIsoEmSource = cms.InputTag("gctDigis","nonIsoEm")
72 l1tStage1Layer2.stage1_layer2_ = cms.bool(False)
73 
74 dqmL1ExtraParticlesStage1.etTotalSource = 'gctDigis'
75 dqmL1ExtraParticlesStage1.nonIsolatedEmSource = 'gctDigis:nonIsoEm'
76 dqmL1ExtraParticlesStage1.etMissSource = 'gctDigis'
77 dqmL1ExtraParticlesStage1.htMissSource = 'gctDigis'
78 dqmL1ExtraParticlesStage1.forwardJetSource = 'gctDigis:forJets'
79 dqmL1ExtraParticlesStage1.centralJetSource = 'gctDigis:cenJets'
80 dqmL1ExtraParticlesStage1.tauJetSource = 'gctDigis:tauJets'
81 dqmL1ExtraParticlesStage1.isolatedEmSource = 'gctDigis:isoEm'
82 dqmL1ExtraParticlesStage1.etHadSource = 'gctDigis'
83 dqmL1ExtraParticlesStage1.hfRingEtSumsSource = 'gctDigis'
84 dqmL1ExtraParticlesStage1.hfRingBitCountsSource = 'gctDigis'
85 l1ExtraDQMStage1.stage1_layer2_ = cms.bool(False)
86 l1ExtraDQMStage1.L1ExtraIsoTauJetSource_ = cms.InputTag("fake")
87 
88 l1compareforstage1.GCTsourceData = cms.InputTag("gctDigis")
89 l1compareforstage1.GCTsourceEmul = cms.InputTag("valGctDigis")
90 l1compareforstage1.stage1_layer2_ = cms.bool(False)
91 
92 valStage1GtDigis.GctInputTag = 'gctDigis'
93 
94 
95 from Configuration.Eras.Modifier_stage1L1Trigger_cff import stage1L1Trigger
96 stage1L1Trigger.toModify(l1TdeRCT, rctSourceData = 'caloStage1Digis')
97 stage1L1Trigger.toModify(l1TdeRCTfromRCT, rctSourceData = 'rctDigis')
98 stage1L1Trigger.toModify(l1tRct, rctSource = 'caloStage1Digis')
99 stage1L1Trigger.toModify(l1tRctfromRCT, rctSource = 'rctDigis')
100 stage1L1Trigger.toModify(l1tPUM, regionSource = cms.InputTag("rctDigis"))
101 
102 stage1L1Trigger.toModify(l1tStage1Layer2, stage1_layer2_ = cms.bool(True))
103 stage1L1Trigger.toModify(l1tStage1Layer2, gctCentralJetsSource = cms.InputTag("caloStage1LegacyFormatDigis","cenJets"))
104 stage1L1Trigger.toModify(l1tStage1Layer2, gctForwardJetsSource = cms.InputTag("caloStage1LegacyFormatDigis","forJets"))
105 stage1L1Trigger.toModify(l1tStage1Layer2, gctTauJetsSource = cms.InputTag("caloStage1LegacyFormatDigis","tauJets"))
106 stage1L1Trigger.toModify(l1tStage1Layer2, gctIsoTauJetsSource = cms.InputTag("caloStage1LegacyFormatDigis","isoTauJets"))
107 stage1L1Trigger.toModify(l1tStage1Layer2, gctEnergySumsSource = cms.InputTag("caloStage1LegacyFormatDigis"))
108 stage1L1Trigger.toModify(l1tStage1Layer2, gctIsoEmSource = cms.InputTag("caloStage1LegacyFormatDigis","isoEm"))
109 stage1L1Trigger.toModify(l1tStage1Layer2, gctNonIsoEmSource = cms.InputTag("caloStage1LegacyFormatDigis","nonIsoEm"))
110 
111 stage1L1Trigger.toModify( dqmL1ExtraParticlesStage1, etTotalSource = cms.InputTag("caloStage1LegacyFormatDigis") )
112 stage1L1Trigger.toModify( dqmL1ExtraParticlesStage1, nonIsolatedEmSource = cms.InputTag("caloStage1LegacyFormatDigis","nonIsoEm") )
113 stage1L1Trigger.toModify( dqmL1ExtraParticlesStage1, etMissSource = cms.InputTag("caloStage1LegacyFormatDigis") )
114 stage1L1Trigger.toModify( dqmL1ExtraParticlesStage1, htMissSource = cms.InputTag("caloStage1LegacyFormatDigis") )
115 stage1L1Trigger.toModify( dqmL1ExtraParticlesStage1, forwardJetSource = cms.InputTag("caloStage1LegacyFormatDigis","forJets") )
116 stage1L1Trigger.toModify( dqmL1ExtraParticlesStage1, centralJetSource = cms.InputTag("caloStage1LegacyFormatDigis","cenJets") )
117 stage1L1Trigger.toModify( dqmL1ExtraParticlesStage1, tauJetSource = cms.InputTag("caloStage1LegacyFormatDigis","tauJets") )
118 stage1L1Trigger.toModify( dqmL1ExtraParticlesStage1, isoTauJetSource = cms.InputTag("caloStage1LegacyFormatDigis","isoTauJets") )
119 stage1L1Trigger.toModify( dqmL1ExtraParticlesStage1, isolatedEmSource = cms.InputTag("caloStage1LegacyFormatDigis","isoEm") )
120 stage1L1Trigger.toModify( dqmL1ExtraParticlesStage1, etHadSource = cms.InputTag("caloStage1LegacyFormatDigis") )
121 stage1L1Trigger.toModify( dqmL1ExtraParticlesStage1, hfRingEtSumsSource = cms.InputTag("caloStage1LegacyFormatDigis") )
122 stage1L1Trigger.toModify( dqmL1ExtraParticlesStage1, hfRingBitCountsSource = cms.InputTag("caloStage1LegacyFormatDigis") )
123 stage1L1Trigger.toModify( l1ExtraDQMStage1, stage1_layer2_ = cms.bool(True))
124 stage1L1Trigger.toModify( l1ExtraDQMStage1, L1ExtraIsoTauJetSource_ = cms.InputTag("dqmL1ExtraParticlesStage1", "IsoTau"))
125 
126 stage1L1Trigger.toModify(l1compareforstage1, GCTsourceData = cms.InputTag("caloStage1LegacyFormatDigis"))
127 stage1L1Trigger.toModify(l1compareforstage1, GCTsourceEmul = cms.InputTag("valCaloStage1LegacyFormatDigis"))
128 stage1L1Trigger.toModify(l1compareforstage1, stage1_layer2_ = cms.bool(True))
129 
130 stage1L1Trigger.toModify(valStage1GtDigis, GctInputTag = 'caloStage1LegacyFormatDigis')
131 
132 #
133 # define sequences
134 #
135 
136 l1TriggerOnline = cms.Sequence(
137  l1tMonitorStage1Online
138  * dqmEnvL1T
139  )
140 
141 l1TriggerOffline = cms.Sequence(
142  l1TriggerOnline *
143  dqmEnvL1TriggerReco
144 )
145 
146 #
148 
149 l1TriggerEmulatorOnline = cms.Sequence(
150  l1Stage1HwValEmulatorMonitor
151  * dqmEnvL1TEMU
152  )
153 
154 l1TriggerEmulatorOffline = cms.Sequence(
155  l1TriggerEmulatorOnline
156 )
157 #
158 
159 # DQM Offline Step 1 sequence
160 l1TriggerDqmOffline = cms.Sequence(
161  l1TriggerOffline
162  #* l1tRate_Offline #Disabled for the moment as agreed on
163  # https://github.com/cms-sw/cmssw/issues/25090#issuecomment-789016559
164  * l1tSync_Offline
165  * l1TriggerEmulatorOffline
166  )
167 
168 # Dummy sequences where a stage 2 equivalent exists
169 l1TriggerEgDqmOffline = cms.Sequence()
170 l1TriggerMuonDqmOffline = cms.Sequence()
171 
172 # DQM Offline Step 2 sequence
173 l1TriggerDqmOfflineClient = cms.Sequence(
174  l1tMonitorStage1Client
175  * l1EmulatorMonitorClient
176  )
177 
178 # Dummy sequences for legacy cosmics
179 l1TriggerDqmOfflineCosmics = cms.Sequence()
180 l1TriggerDqmOfflineCosmicsClient = cms.Sequence()
181 
182 # Dummy sequences where a stage 2 equivalent exists
183 l1TriggerEgDqmOfflineClient = cms.Sequence()
184 l1TriggerMuonDqmOfflineClient = cms.Sequence()
185 
186 
187 #
188 # EMERGENCY removal of modules or full sequences
189 # =============
190 #
191 # un-comment the module line below to remove the module or the sequence
192 
193 #
194 # NOTE: for offline, remove the L1TRate which is reading from cms_orcoff_prod, but also requires
195 # a hard-coded lxplus path - FIXME check if one can get rid of hard-coded path
196 # remove also the corresponding client
197 #
198 # L1TSync - FIXME - same problems as L1TRate
199 
200 
201 # DQM first step
202 #
203 
204 #l1TriggerDqmOffline.remove(l1TriggerOffline)
205 #l1TriggerDqmOffline.remove(l1TriggerEmulatorOffline)
206 
207 #
208 
209 #l1TriggerOffline.remove(l1TriggerOnline)
210 
211 
212 # l1tMonitorOnline sequence, defined in DQM/L1TMonitor/python/L1TMonitor_cff.py
213 #
214 #l1TriggerOnline.remove(l1tMonitorOnline)
215 #
216 l1tMonitorStage1Online.remove(bxTiming)
217 l1tMonitorStage1Online.remove(l1tGt) #Following https://github.com/cms-sw/cmssw/issues/25090#issuecomment-789201888
218 #l1tMonitorOnline.remove(l1tDttf)
219 #l1tMonitorOnline.remove(l1tCsctf)
220 #l1tMonitorOnline.remove(l1tRpctf)
221 #l1tMonitorOnline.remove(l1tGmt)
222 #l1tMonitorOnline.remove(l1tGt)
223 #
224 #l1ExtraDqmSeq.remove(dqmGctDigis)
225 #l1ExtraDqmSeq.remove(dqmGtDigis)
226 #l1ExtraDqmSeq.remove(dqmL1ExtraParticles)
227 #l1ExtraDqmSeq.remove(l1ExtraDQM)
228 #l1tMonitorOnline.remove(l1ExtraDqmSeq)
229 #
230 #l1tMonitorOnline.remove(l1tRate)
231 #l1tMonitorOnline.remove(l1tBPTX)
232 #l1tMonitorOnline.remove(l1tRctSeq)
233 #l1tMonitorOnline.remove(l1tGctSeq)
234 
235 #
236 
237 #l1TriggerEmulatorOffline.remove(l1TriggerEmulatorOnline)
238 
239 # l1HwValEmulatorMonitor sequence, defined in DQM/L1TMonitor/python/L1TEmulatorMonitor_cff.py
240 #
241 #l1TriggerEmulatorOnline.remove(l1HwValEmulatorMonitor)
242 
243 # L1HardwareValidation producers
244 #l1HwValEmulatorMonitor.remove(L1HardwareValidation)
245 #
246 #l1HwValEmulatorMonitor.remove(l1EmulatorMonitor)
247 
248 #l1TriggerDqmOfflineClient.remove(l1tMonitorClient)
249 #l1TriggerDqmOfflineClient.remove(l1EmulatorMonitorClient)
250 
251 # l1tMonitorClient sequence, defined in DQM/L1TMonitorClient/python/L1TMonitorClient_cff.py
252 #
253 #l1tMonitorClient.remove(l1TriggerQualityTests)
254 #l1tMonitorClient.remove(l1TriggerClients)
255 
256 # l1TriggerClients sequence, part of l1tMonitorClient sequence
257 
258 #l1TriggerClients.remove(l1tGctClient)
259 #l1TriggerClients.remove(l1tDttfClient)
260 #l1TriggerClients.remove(l1tCsctfClient)
261 #l1TriggerClients.remove(l1tRpctfClient)
262 #l1TriggerClients.remove(l1tGmtClient)
263 #l1TriggerClients.remove(l1tOccupancyClient)
264 l1TriggerStage1Clients.remove(l1tTestsSummary)
265 #l1TriggerClients.remove(l1tEventInfoClient)
266 
267 # l1EmulatorMonitorClient sequence, defined in DQM/L1TMonitorClient/python/L1TEMUMonitorClient_cff.py
268 #
269 #l1EmulatorMonitorClient.remove(l1EmulatorQualityTests)
270 l1EmulatorMonitorClient.remove(l1EmulatorErrorFlagClient)
271 #l1EmulatorMonitorClient.remove(l1EmulatorEventInfoClient)
272 
273 
274 ##############################################################################
275 #stage2
276 ##############################################################################
277 
278 from Configuration.Eras.Modifier_stage2L1Trigger_cff import stage2L1Trigger
279 from Configuration.Eras.Modifier_run3_GEM_cff import run3_GEM
280 from Configuration.Eras.Modifier_run3_common_cff import run3_common
281 
282 #from L1Trigger.L1TGlobal.hackConditions_cff import *
283 #from L1Trigger.L1TMuon.hackConditions_cff import *
284 #from L1Trigger.L1TCalorimeter.hackConditions_cff import *
286 
287 # L1T emulator sequences
290 simMuonGEMPadDigis.InputCollection = "muonGEMDigis"
291 stage2L1Trigger.toModify(simCscTriggerPrimitiveDigis, CSCComparatorDigiProducer = "muonCSCDigis:MuonCSCComparatorDigi")
292 stage2L1Trigger.toModify(simCscTriggerPrimitiveDigis, CSCWireDigiProducer = "muonCSCDigis:MuonCSCWireDigi")
293 # Contact GEM-CSC trigger coordinators Jason Gilmore and Giovanni Mocellin to set the 'runME11ILT' flag to True
294 (stage2L1Trigger & run3_GEM).toModify(simCscTriggerPrimitiveDigis, GEMPadDigiClusterProducer = "muonCSCDigis:MuonGEMPadDigiCluster", commonParam = dict(runME11ILT = False))
295 stage2L1Trigger.toModify(simDtTriggerPrimitiveDigis, digiTag = cms.InputTag("muonDTDigis"))
296 simTwinMuxDigis.RPC_Source = cms.InputTag("muonRPCDigis")
297 simOmtfDigis.srcRPC = cms.InputTag("muonRPCDigis")
298 simEmtfDigis.CSCInput = "emtfStage2Digis"
299 simEmtfDigis.RPCInput = "muonRPCDigis"
300 simEmtfDigis.GEMInput = "emtfStage2Digis"
301 (stage2L1Trigger & run3_common).toModify(simEmtfShowers, CSCShowerInput = "muonCSCDigis:MuonCSCShowerDigi")
302 
303 # use unpacker calo TPs
304 simCaloStage2Layer1Digis.ecalToken = cms.InputTag("ecalDigis","EcalTriggerPrimitives")
305 simCaloStage2Layer1Digis.hcalToken = cms.InputTag("hcalDigis")
306 
308 
310 
312 
314 
315 from DQM.L1TMonitor.L1TStage2_cff import *
317 
318 ##Stage 2 Emulator
319 
321 
322 #
323 # define sequences
324 #
325 
326 ##############################################################################
327 # Unpacked data sequences
328 Stage2l1TriggerOnline = cms.Sequence(
329  l1tStage2OnlineDQM
330  * dqmEnvL1T
331  )
332 # Do not include the uGT online DQM module in the offline sequence
333 # since the large 2D histograms cause crashes at the T0.
334 l1tStage2OnlineDQM.remove(l1tStage2uGT)
335 
336 # sequence to run for all datasets
337 Stage2l1TriggerOffline = cms.Sequence(
338  Stage2l1TriggerOnline #*
339  #dqmEnvL1TriggerReco
340  )
341 
342 # sequence to run only for modules requiring an electron dataset
343 Stage2l1tEgOffline = cms.Sequence(
344  l1tEGammaOfflineDQM
345  )
346 
347 # sequence to run only for modules requiring a muon dataset
348 Stage2l1tMuonOffline = cms.Sequence(
349  l1tEtSumJetOfflineDQMSeq *
350  l1tTauOfflineDQM *
351  l1tMuonDQMOffline
352  )
353 
354 ##############################################################################
355 # Emulator sequences
356 Stage2l1TriggerEmulatorOnlineTask = cms.Task(valHcalTriggerPrimitiveDigis)
357 Stage2l1TriggerEmulatorOnline = cms.Sequence(
358  Stage2L1HardwareValidation +
359  l1tStage2EmulatorOnlineDQM +
360  dqmEnvL1TEMU,
361  Stage2l1TriggerEmulatorOnlineTask
362  )
363 # Do not include the uGT emulation online DQM module in the offline
364 # sequence since the large 2D histograms cause crashes at the T0.
365 l1tStage2EmulatorOnlineDQM.remove(l1tStage2uGtEmul)
366 
367 # sequence to run for all datasets
368 Stage2l1TriggerEmulatorOffline = cms.Sequence(
369  Stage2l1TriggerEmulatorOnline +
370  Stage2L1HardwareValidationForOfflineCalo +
371  l1tStage2EmulatorOfflineDQMForCalo
372  )
373 
374 # sequence to run only for modules requiring an electron dataset
375 Stage2l1tEgEmulatorOffline = cms.Sequence(
376  SimL1TCalorimeter +
377  l1tEGammaOfflineDQMEmu
378  )
379 
380 # sequence to run only for modules requiring a muon dataset
381 Stage2l1tMuonEmulatorOffline = cms.Sequence(
382  SimL1TCalorimeter +
383  SimL1TMuon +
384  l1tEtSumJetOfflineDQMEmuSeq +
385  l1tTauOfflineDQMEmu +
386  l1tMuonDQMOfflineEmu
387  )
388 
389 ##############################################################################
390 # DQM sequences for step 1
391 
392 # DQM Offline sequence
393 Stage2l1TriggerDqmOffline = cms.Sequence(
394  Stage2l1TriggerOffline
395  * Stage2l1TriggerEmulatorOffline
396  )
397 
398 # DQM Offline sequence for modules requiring an electron dataset
399 Stage2l1tEgDqmOffline = cms.Sequence(
400  Stage2l1tEgOffline
401  * Stage2l1tEgEmulatorOffline
402  )
403 
404 # DQM Offline sequence for modules requiring a muon dataset
405 Stage2l1tMuonDqmOffline = cms.Sequence(
406  Stage2l1tMuonOffline
407  * Stage2l1tMuonEmulatorOffline
408  )
409 
410 ##############################################################################
411 # DQM sequences for step 2
412 
413 # DQM Offline sequence
414 Stage2l1TriggerDqmOfflineClient = cms.Sequence(
415  DQMHarvestL1TMon
416  )
417 
418 # DQM Offline sequence for modules requiring an electron dataset
419 Stage2l1tEgDqmOfflineClient = cms.Sequence(
420  DQMHarvestL1TEg
421  )
422 
423 # DQM Offline sequence for modules requiring a muon dataset
424 Stage2l1tMuonDqmOfflineClient = cms.Sequence(
425  DQMHarvestL1TMuon
426  )
427 
428 
429 #replacements for stage2
430 stage2L1Trigger.toReplaceWith(l1TriggerOnline, Stage2l1TriggerOnline)
431 stage2L1Trigger.toReplaceWith(l1TriggerOffline, Stage2l1TriggerOffline)
432 stage2L1Trigger.toReplaceWith(l1TriggerEmulatorOnline, Stage2l1TriggerEmulatorOnline)
433 stage2L1Trigger.toReplaceWith(l1TriggerEmulatorOffline, Stage2l1TriggerEmulatorOffline)
434 stage2L1Trigger.toReplaceWith(l1TriggerDqmOffline, Stage2l1TriggerDqmOffline)
435 stage2L1Trigger.toReplaceWith(l1TriggerEgDqmOffline, Stage2l1tEgDqmOffline)
436 stage2L1Trigger.toReplaceWith(l1TriggerMuonDqmOffline, Stage2l1tMuonDqmOffline)
437 stage2L1Trigger.toReplaceWith(l1TriggerDqmOfflineClient, Stage2l1TriggerDqmOfflineClient)
438 stage2L1Trigger.toReplaceWith(l1TriggerEgDqmOfflineClient, Stage2l1tEgDqmOfflineClient)
439 stage2L1Trigger.toReplaceWith(l1TriggerMuonDqmOfflineClient, Stage2l1tMuonDqmOfflineClient)
440 stage2L1Trigger.toReplaceWith(l1TriggerDqmOfflineCosmics, Stage2l1TriggerDqmOffline)
441 stage2L1Trigger.toReplaceWith(l1TriggerDqmOfflineCosmicsClient, Stage2l1TriggerDqmOfflineClient)
442 
443 ##############################################################################
444 #phase2
445 ##############################################################################
446 
447 from Configuration.Eras.Modifier_phase2_trigger_cff import phase2_trigger
448 
449 #
450 # define sequences
451 #
453 
454 ##############################################################################
455 # sequence to run for all datasets
456 Phase2l1TriggerOffline = cms.Sequence(
457  dqmEnvL1T
458  )
459 
460 ##############################################################################
461 # DQM sequences for step 1
462 
463 # DQM Offline sequence
464 Phase2l1TriggerDqmOffline = cms.Sequence(
465  l1tPhase2OfflineDQM
466  )
467 
468 ##############################################################################
469 # DQM sequences for step 2
470 
471 # DQM Offline sequence
472 Phase2l1TriggerDqmOfflineClient = cms.Sequence(
473  DQMHarvestL1TPhase2
474  )
475 #replacements for phase2
476 phase2_trigger.toReplaceWith(l1TriggerOffline, Phase2l1TriggerOffline)
477 phase2_trigger.toReplaceWith(l1TriggerDqmOffline, Phase2l1TriggerDqmOffline)
478 phase2_trigger.toReplaceWith(l1TriggerDqmOfflineClient, Phase2l1TriggerDqmOfflineClient)