def appendRPCChamberMaskerAtUnpacking(process): if hasattr(process,'muonRPCDigis') : sys.stderr.write("[appendRPCChamberMasker] : Found muonRPCDigis, applying filter\n") process.preRPCDigis = process.muonRPCDigis.clone() process.muonRPCDigis = _rpcChamberMasker.clone() if hasattr(process,"RandomNumberGeneratorService") : process.RandomNumberGeneratorService.muonRPCDigis = cms.PSet( initialSeed = cms.untracked.uint32(789342) ) else : process.RandomNumberGeneratorService = cms.Service( "RandomNumberGeneratorService", muonRPCDigis = cms.PSet(initialSeed = cms.untracked.uint32(789342)) ) process.filteredRPCDigiSequence = cms.Sequence(process.preRPCDigis \ + process.muonRPCDigis) process.RawToDigi.replace(process.muonRPCDigis, \ process.filteredRPCDigiSequence) return process
def appendRPCChamberMaskerBeforeRecHits(process): if hasattr(process,'rpcRecHits') : sys.stderr.write("[appendRPCChamberMasker] : Found rpcRecHits, applying filter\n") process.rpcAgedDigis = _rpcChamberMasker.clone() process.rpcAgedDigis.digiTag = cms.InputTag('simMuonRPCDigis') process.rpcRecHits = process.rpcRecHits.clone() process.rpcRecHits.rpcDigiLabel = cms.InputTag('rpcAgedDigis') process.filteredRpcDigiSequence = cms.Sequence(process.rpcAgedDigis \ + process.rpcRecHits) process.reconstruction.replace(process.rpcRecHits, \ process.filteredRpcDigiSequence) if hasattr(process,"RandomNumberGeneratorService") : process.RandomNumberGeneratorService.rpcAgedDigis = cms.PSet( initialSeed = cms.untracked.uint32(789342) ) else : process.RandomNumberGeneratorService = cms.Service( "RandomNumberGeneratorService", rpcAgedDigis = cms.PSet(initialSeed = cms.untracked.uint32(789342)) ) return process
def appendRPCChamberAgingAtL1Trigger(process): # ############################################################################# # This function adds aging producers for RPC Digis # ############################################################################# from SimMuon.RPCDigitizer.rpcChamberMasker_cfi import rpcChamberMasker as _rpcChamberMasker if hasattr(process,'simTwinMuxDigis') and hasattr(process,'SimL1TMuon') : sys.stderr.write("[appendRPCChamberMasker] : Found simTwinMuxDigis, prepending producer for aged RPC\n") process.simMuonRPCDigis = _rpcChamberMasker.clone() process.simMuonRPCDigis.digiTag = cms.InputTag('simMuonRPCDigis', \ processName = cms.InputTag.skipCurrentProcess()) process.withAgedRpcTriggerSequence = cms.Sequence(process.simMuonRPCDigis + process.simTwinMuxDigis ) process.SimL1TMuon.replace(process.simTwinMuxDigis, process.withAgedRpcTriggerSequence) if hasattr(process,"RandomNumberGeneratorService") : process.RandomNumberGeneratorService.simMuonRPCDigis = cms.PSet( initialSeed = cms.untracked.uint32(789342), engineName = cms.untracked.string('TRandom3') ) else : process.RandomNumberGeneratorService = cms.Service( "RandomNumberGeneratorService", simMuonRPCDigis = cms.PSet(initialSeed = cms.untracked.uint32(789342)) ) return process
def appendRPCChamberMaskerAtUnpacking(process): if hasattr(process, 'muonRPCDigis'): sys.stderr.write( "[appendRPCChamberMasker] : Found muonRPCDigis, applying filter\n") process.preRPCDigis = process.muonRPCDigis.clone() process.muonRPCDigis = _rpcChamberMasker.clone() if hasattr(process, "RandomNumberGeneratorService"): process.RandomNumberGeneratorService.muonRPCDigis = cms.PSet( initialSeed=cms.untracked.uint32(789342)) else: process.RandomNumberGeneratorService = cms.Service( "RandomNumberGeneratorService", muonRPCDigis=cms.PSet( initialSeed=cms.untracked.uint32(789342))) process.filteredRPCDigiSequence = cms.Sequence(process.preRPCDigis \ + process.muonRPCDigis) process.RawToDigi.replace(process.muonRPCDigis, \ process.filteredRPCDigiSequence) return process
def appendRPCChamberMaskerBeforeRecHits(process): if hasattr(process, 'rpcRecHits'): sys.stderr.write( "[appendRPCChamberMasker] : Found rpcRecHits, applying filter\n") process.rpcAgedDigis = _rpcChamberMasker.clone() process.rpcAgedDigis.digiTag = cms.InputTag('simMuonRPCDigis') process.rpcRecHits = process.rpcRecHits.clone() process.rpcRecHits.rpcDigiLabel = cms.InputTag('rpcAgedDigis') process.filteredRpcDigiSequence = cms.Sequence(process.rpcAgedDigis \ + process.rpcRecHits) process.reconstruction.replace(process.rpcRecHits, \ process.filteredRpcDigiSequence) if hasattr(process, "RandomNumberGeneratorService"): process.RandomNumberGeneratorService.rpcAgedDigis = cms.PSet( initialSeed=cms.untracked.uint32(789342)) else: process.RandomNumberGeneratorService = cms.Service( "RandomNumberGeneratorService", rpcAgedDigis=cms.PSet( initialSeed=cms.untracked.uint32(789342))) return process
def customiseForAgeing(process, pathName, segmentAgeing, triggerAgeing, rpcAgeing): if segmentAgeing or triggerAgeing: if hasattr(process, "dt1DRecHits"): print( "[customiseForAgeing]: prepending ageing before dt1DRecHits and adding ageing to RandomNumberGeneratorService" ) from SimMuon.DTDigitizer.dtChamberMasker_cfi import dtChamberMasker as _dtChamberMasker process.agedDtDigis = _dtChamberMasker.clone() getattr(process, pathName).replace( process.dt1DRecHits, process.agedDtDigis + process.dt1DRecHits) if hasattr(process, "bkgDtDigis"): print( "[customiseForAgeing]: configuring agedDtDigis to use bkgDtDigis" ) process.agedDtDigis.digiTag = "bkgDtDigis" if segmentAgeing: print( "[customiseForAgeing]: trying to age segments and generate random digi noise, option non supported. quitting." ) sys.exit(999) if hasattr(process, "RandomNumberGeneratorService"): process.RandomNumberGeneratorService.agedDtDigis = cms.PSet( initialSeed=cms.untracked.uint32(789342), engineName=cms.untracked.string('TRandom3')) else: process.RandomNumberGeneratorService = cms.Service( "RandomNumberGeneratorService", agedDtDigis=cms.PSet( initialSeed=cms.untracked.uint32(789342), engineName=cms.untracked.string('TRandom3'))) if segmentAgeing: print( "[customiseForAgeing]: switching dt1DRecHits input to agedDtDigis") process.dt1DRecHits.dtDigiLabel = "agedDtDigis" if triggerAgeing: print("[customiseForAgeing]: switching emulatros input to agedDtDigis") process.CalibratedDigis.dtDigiTag = "agedDtDigis" if hasattr(process, "dtTriggerPhase2HbPrimitiveDigis"): process.dtTriggerPhase2HbPrimitiveDigis.dtDigiLabel = "agedDtDigis" if rpcAgeing: if hasattr(process, "rpcRecHits"): print( "[customiseForAgeing]: prepending ageing before rpcRecHits and adding ageing to RandomNumberGeneratorService" ) from SimMuon.RPCDigitizer.rpcChamberMasker_cfi import rpcChamberMasker as _rpcChamberMasker process.agedRpcDigis = _rpcChamberMasker.clone() process.agedRpcDigis.digiTag = "simMuonRPCDigis" getattr(process, pathName).replace( process.rpcRecHits, process.agedRpcDigis + process.rpcRecHits) if hasattr(process, "RandomNumberGeneratorService"): process.RandomNumberGeneratorService.agedRpcDigis = cms.PSet( initialSeed=cms.untracked.uint32(789342), engineName=cms.untracked.string('TRandom3')) else: process.RandomNumberGeneratorService = cms.Service( "RandomNumberGeneratorService", agedRpcDigis=cms.PSet( initialSeed=cms.untracked.uint32(789342), engineName=cms.untracked.string('TRandom3'))) print( "[customiseForAgeing]: switching rpcRecHits input to agedRpcDigis" ) process.rpcRecHits.rpcDigiLabel = "agedRpcDigis" return process