test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
customizeRPCDigi.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 # PSet of mixObjects that only keeps muon collections (and SimTracks with SimVertices)
4 mixObjects_dt_csc_rpc = cms.PSet(
5  mixCH = cms.PSet(
6  crossingFrames = cms.untracked.vstring(),
7  input = cms.VInputTag(),
8  type = cms.string('PCaloHit'),
9  subdets = cms.vstring()
10  ),
11  mixHepMC = cms.PSet(
12  input = cms.VInputTag(cms.InputTag("generatorSmeared"),cms.InputTag("generator")),
13  makeCrossingFrame = cms.untracked.bool(True),
14  type = cms.string('HepMCProduct')
15  ),
16  mixVertices = cms.PSet(
17  input = cms.VInputTag(cms.InputTag("g4SimHits")),
18  makeCrossingFrame = cms.untracked.bool(True),
19  type = cms.string('SimVertex')
20  ),
21  mixSH = cms.PSet(
22  crossingFrames = cms.untracked.vstring(
23  'MuonCSCHits',
24  'MuonDTHits',
25  'MuonRPCHits'
26  ),
27  input = cms.VInputTag(
28  cms.InputTag("g4SimHits","MuonCSCHits"),
29  cms.InputTag("g4SimHits","MuonDTHits"),
30  cms.InputTag("g4SimHits","MuonRPCHits")),
31  type = cms.string('PSimHit'),
32  subdets = cms.vstring(
33  'MuonCSCHits',
34  'MuonDTHits',
35  'MuonRPCHits'
36  )
37  ),
38  mixTracks = cms.PSet(
39  input = cms.VInputTag(cms.InputTag("g4SimHits")),
40  makeCrossingFrame = cms.untracked.bool(True),
41  type = cms.string('SimTrack')
42  )
43 )
44 
45 
46 # Customize process.mix to be used for running muon (DT, CSC, RPC) digi only.
47 # - remove non-muon digitizers that are now run as part of mixing process
48 # - delete all the digitizers' aliases.
49 # - drop unnecessary mixObjects
51  process.mix.digitizers = digitizers = cms.PSet()
52  digi_aliases = filter(lambda n: 'Digi' in n, process.aliases.keys())
53  for a in digi_aliases: process.__delattr__(a)
54  process.mix.mixObjects = mixObjects_dt_csc_rpc
55  return process
56 
57 # customize the digitization sequence pdigi to only digitize DT+CSC+RPC
59  process = customize_mix_muon_only(process)
60  process.muonDigi = cms.Sequence(
61  process.simMuonCSCDigis +
62  process.simMuonDTDigis +
63  process.simMuonRPCDigis
64  )
65  process.pdigi = cms.Sequence(
66  cms.SequencePlaceholder("randomEngineStateProducer")*
67  cms.SequencePlaceholder("mix")*
68  process.muonDigi
69  )
70  return process
71 
72 # customize the digitization sequence pdigi to only digitize DT+CSC+RPC+GEM
74  process = load_GEM_digitizers(process)
75  process = customize_random_GEMDigi(process)
76  process = customize_mix_addGEM_muon_only(process)
77  process.muonDigi = cms.Sequence(
78  process.simMuonCSCDigis +
79  process.simMuonDTDigis +
80  process.simMuonRPCDigis +
81  process.simMuonGEMDigis +
82  process.simMuonGEMPadDigis
83  )
84  process.pdigi = cms.Sequence(
85  cms.SequencePlaceholder("randomEngineStateProducer")*
86  cms.SequencePlaceholder("mix")*
87  process.muonDigi
88  )
89  process = append_GEMDigi_event(process)
90  return process
def load_GEM_digitizers
load the digitizer and pad producer
def customize_digi_addGEM_muon_only