CMS 3D CMS Logo

rpcChamberMasker_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 import sys
3 
4 from SimMuon.RPCDigitizer.rpcChamberMasker_cfi import rpcChamberMasker as _rpcChamberMasker
5 from Configuration.Eras.Modifier_phase2_muon_cff import phase2_muon
6 
8 
9  if phase2_muon.isChosen():
11  else :
13 
14  return process
15 
16 
17 # To be used for PhaseII
18 # no packin/unpacking is available for RE3/1 RE4/1
19 # must start from sim digis
21 
22  if hasattr(process,'rpcRecHits') :
23 
24  sys.stderr.write("[appendRPCChamberMasker] : Found rpcRecHits, applying filter\n")
25 
26  process.rpcAgedDigis = _rpcChamberMasker.clone()
27  process.rpcAgedDigis.digiTag = cms.InputTag('simMuonRPCDigis')
28 
29  process.rpcRecHits = process.rpcRecHits.clone()
30  process.rpcRecHits.rpcDigiLabel = cms.InputTag('rpcAgedDigis')
31 
32  process.filteredRpcDigiSequence = cms.Sequence(process.rpcAgedDigis \
33  + process.rpcRecHits)
34 
35  process.reconstruction.replace(process.rpcRecHits, \
36  process.filteredRpcDigiSequence)
37 
38  if hasattr(process,"RandomNumberGeneratorService") :
39  process.RandomNumberGeneratorService.rpcAgedDigis = cms.PSet(
40  initialSeed = cms.untracked.uint32(789342)
41  )
42  else :
43  process.RandomNumberGeneratorService = cms.Service(
44  "RandomNumberGeneratorService",
45  rpcAgedDigis = cms.PSet(initialSeed = cms.untracked.uint32(789342))
46  )
47 
48  return process
49 
50 
51 # To be used for PhaseII
52 # exploit unpacking of digis
54 
55  if hasattr(process,'muonRPCDigis') :
56 
57  sys.stderr.write("[appendRPCChamberMasker] : Found muonRPCDigis, applying filter\n")
58 
59  process.preRPCDigis = process.muonRPCDigis.clone()
60  process.muonRPCDigis = _rpcChamberMasker.clone()
61 
62  if hasattr(process,"RandomNumberGeneratorService") :
63  process.RandomNumberGeneratorService.muonRPCDigis = cms.PSet(
64  initialSeed = cms.untracked.uint32(789342)
65  )
66  else :
67  process.RandomNumberGeneratorService = cms.Service(
68  "RandomNumberGeneratorService",
69  muonRPCDigis = cms.PSet(initialSeed = cms.untracked.uint32(789342))
70  )
71 
72  process.filteredRPCDigiSequence = cms.Sequence(process.preRPCDigis \
73  + process.muonRPCDigis)
74  process.RawToDigi.replace(process.muonRPCDigis, \
75  process.filteredRPCDigiSequence)
76 
77  return process
def appendRPCChamberMaskerAtUnpacking(process)
def appendRPCChamberMaskerAtReco(process)
def appendRPCChamberMaskerBeforeRecHits(process)