1 import FWCore.ParameterSet.Config
as cms
4 from SimMuon.RPCDigitizer.rpcChamberMasker_cfi
import rpcChamberMasker
as _rpcChamberMasker
5 from Configuration.Eras.Modifier_phase2_muon_cff
import phase2_muon
9 phase2_muon.toModify(process, appendRPCChamberMaskerBeforeRecHits)
10 (~phase2_muon).toModify(process, appendRPCChamberMaskerAtUnpacking)
20 if hasattr(process,
'rpcRecHits') :
22 sys.stderr.write(
"[appendRPCChamberMasker] : Found rpcRecHits, applying filter\n")
24 process.rpcAgedDigis = _rpcChamberMasker.clone()
25 process.rpcAgedDigis.digiTag = cms.InputTag(
'simMuonRPCDigis')
27 process.rpcRecHits = process.rpcRecHits.clone()
28 process.rpcRecHits.rpcDigiLabel = cms.InputTag(
'rpcAgedDigis')
30 process.filteredRpcDigiSequence = cms.Sequence(process.rpcAgedDigis \
33 process.reconstruction.replace(process.rpcRecHits, \
34 process.filteredRpcDigiSequence)
36 if hasattr(process,
"RandomNumberGeneratorService") :
37 process.RandomNumberGeneratorService.rpcAgedDigis = cms.PSet(
38 initialSeed = cms.untracked.uint32(789342)
41 process.RandomNumberGeneratorService = cms.Service(
42 "RandomNumberGeneratorService",
43 rpcAgedDigis = cms.PSet(initialSeed = cms.untracked.uint32(789342))
53 if hasattr(process,
'muonRPCDigis') :
55 sys.stderr.write(
"[appendRPCChamberMasker] : Found muonRPCDigis, applying filter\n")
57 process.preRPCDigis = process.muonRPCDigis.clone()
58 process.muonRPCDigis = _rpcChamberMasker.clone()
60 if hasattr(process,
"RandomNumberGeneratorService") :
61 process.RandomNumberGeneratorService.muonRPCDigis = cms.PSet(
62 initialSeed = cms.untracked.uint32(789342)
65 process.RandomNumberGeneratorService = cms.Service(
66 "RandomNumberGeneratorService",
67 muonRPCDigis = cms.PSet(initialSeed = cms.untracked.uint32(789342))
70 process.RawToDigiTask.add(process.preRPCDigis)
def appendRPCChamberMaskerAtUnpacking
def appendRPCChamberMaskerBeforeRecHits
def appendRPCChamberMaskerAtReco