1 from __future__
import print_function
2 import FWCore.ParameterSet.Config
as cms
5 from SimMuon.DTDigitizer.dtChamberMasker_cfi
import dtChamberMasker
as _dtChamberMasker
9 if hasattr(process,
'muonDTDigis')
and hasattr(process,
'RawToDigi'):
11 sys.stderr.write(
"[appendDTChamberMasker] : Found muonDTDigis, applying filter\n")
13 process.preDtDigis = process.muonDTDigis.clone()
14 process.muonDTDigis = _dtChamberMasker.clone()
16 process.muonDTDigis.digiTag = cms.InputTag(
'preDtDigis')
18 process.filteredDtDigiSequence = cms.Sequence(process.preDtDigis + process.muonDTDigis)
19 process.RawToDigi.replace(process.muonDTDigis, process.filteredDtDigiSequence)
21 if hasattr(process,
"dtTriggerEfficiencyMonitor") :
22 process.dtTriggerEfficiencyMonitor.inputTagDDU =
'preDtDigis' 24 if hasattr(process,
"RandomNumberGeneratorService") :
25 process.RandomNumberGeneratorService.muonDTDigis = cms.PSet(
26 initialSeed = cms.untracked.uint32(789342)
29 process.RandomNumberGeneratorService = cms.Service(
30 "RandomNumberGeneratorService",
31 muonDTDigis = cms.PSet(initialSeed = cms.untracked.uint32(789342))
38 if hasattr(process,
'hltMuonDTDigis')
and \
39 ( hasattr(process,
'HLTMuonLocalRecoSequence')
or \
40 hasattr(process,
'HLTMuonLocalRecoMeanTimerSequence')) :
42 sys.stderr.write(
"[appendDTChamberMasker] : Found hltMuonDTDigis, applying filter\n")
44 process.preHltDtDigis = process.hltMuonDTDigis.clone()
45 process.hltMuonDTDigis = _dtChamberMasker.clone()
47 process.hltMuonDTDigis.digiTag =
"preHltDtDigis" 49 process.filteredHltDtDigiSequence = cms.Sequence(process.preHltDtDigis + process.hltMuonDTDigis)
50 if hasattr(process,
'HLTMuonLocalRecoSequence') :
52 process.HLTMuonLocalRecoSequence.replace(process.hltMuonDTDigis, process.filteredHltDtDigiSequence)
53 if hasattr(process,
'HLTMuonLocalRecoMeanTimerSequence') :
55 process.HLTMuonLocalRecoMeanTimerSequence.replace(process.hltMuonDTDigis, process.filteredHltDtDigiSequence)
57 process.globalReplace(
"hltMuonDTDigis",filteredHltDtDigiSequence)
59 if hasattr(process,
"RandomNumberGeneratorService") :
60 process.RandomNumberGeneratorService.hltMuonDTDigis = cms.PSet(
61 initialSeed = cms.untracked.uint32(789342)
64 process.RandomNumberGeneratorService = cms.Service(
65 "RandomNumberGeneratorService",
66 hltMuonDTDigis = cms.PSet(initialSeed = cms.untracked.uint32(789342))
73 if hasattr(process,
'simDtTriggerPrimitiveDigis')
and hasattr(process,
'SimL1TMuonCommon') :
75 sys.stderr.write(
"[appendDTChamberMasker] : Found simMuonDtTriggerPrimitivesDigis, applying filter\n")
77 process.preSimDtTriggerDigis = _dtChamberMasker.clone()
79 process.simDtTriggerPrimitiveDigis.digiTag =
"preSimDtDigis" 81 process.filteredSimDtTriggerSequence = cms.Sequence(process.preSimDtTriggerDigis + process.simDtTriggerPrimitiveDigis)
82 process.SimL1TMuonCommon.replace(process.simMuonDTDigis, process.filteredSimDtTriggerSequence)
84 if hasattr(process,
"RandomNumberGeneratorService") :
85 process.RandomNumberGeneratorService.simMuonDTDigis = cms.PSet(
86 initialSeed = cms.untracked.uint32(789342)
89 process.RandomNumberGeneratorService = cms.Service(
90 "RandomNumberGeneratorService",
91 simMuonDTDigis = cms.PSet(initialSeed = cms.untracked.uint32(789342))
def appendDTChamberMaskerAtHLT(process)
def appendDTChamberMaskerBeforeL1Trigger(process)
S & print(S &os, JobReport::InputFile const &f)
def appendDTChamberMaskerAtUnpacking(process)