CMS 3D CMS Logo

mixObjects_cfi.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 mixSimHits = cms.PSet(
4  input = cms.VInputTag( # note that this list needs to be in the same order as the subdets
5  #cms.InputTag("g4SimHits","BSCHits"), cms.InputTag("g4SimHits","BCM1FHits"), cms.InputTag("g4SimHits","PLTHits"), cms.InputTag("g4SimHits","FP420SI"),
6  cms.InputTag("g4SimHits","MuonCSCHits"), cms.InputTag("g4SimHits","MuonDTHits"), cms.InputTag("g4SimHits","MuonRPCHits"),
7  #cms.InputTag("g4SimHits","TotemHitsRP"), cms.InputTag("g4SimHits","TotemHitsT1"), cms.InputTag("g4SimHits","TotemHitsT2Gem"),
8  cms.InputTag("g4SimHits","TrackerHitsPixelBarrelHighTof"), cms.InputTag("g4SimHits","TrackerHitsPixelBarrelLowTof"),
9  cms.InputTag("g4SimHits","TrackerHitsPixelEndcapHighTof"), cms.InputTag("g4SimHits","TrackerHitsPixelEndcapLowTof"), cms.InputTag("g4SimHits","TrackerHitsTECHighTof"), cms.InputTag("g4SimHits","TrackerHitsTECLowTof"), cms.InputTag("g4SimHits","TrackerHitsTIBHighTof"),
10  cms.InputTag("g4SimHits","TrackerHitsTIBLowTof"), cms.InputTag("g4SimHits","TrackerHitsTIDHighTof"), cms.InputTag("g4SimHits","TrackerHitsTIDLowTof"), cms.InputTag("g4SimHits","TrackerHitsTOBHighTof"), cms.InputTag("g4SimHits","TrackerHitsTOBLowTof")),
11  type = cms.string('PSimHit'),
12  subdets = cms.vstring(
13  # 'BSCHits',
14  # 'BCM1FHits',
15  # 'PLTHits',
16  # 'FP420SI',
17  'MuonCSCHits',
18  'MuonDTHits',
19  'MuonRPCHits',
20  # 'TotemHitsRP',
21  # 'TotemHitsT1',
22  # 'TotemHitsT2Gem',
23  'TrackerHitsPixelBarrelHighTof',
24  'TrackerHitsPixelBarrelLowTof',
25  'TrackerHitsPixelEndcapHighTof',
26  'TrackerHitsPixelEndcapLowTof',
27  'TrackerHitsTECHighTof',
28  'TrackerHitsTECLowTof',
29  'TrackerHitsTIBHighTof',
30  'TrackerHitsTIBLowTof',
31  'TrackerHitsTIDHighTof',
32  'TrackerHitsTIDLowTof',
33  'TrackerHitsTOBHighTof',
34  'TrackerHitsTOBLowTof'),
35  crossingFrames = cms.untracked.vstring(
36  'MuonCSCHits',
37  'MuonDTHits',
38  'MuonRPCHits'),
39  #crossingFrames = cms.untracked.vstring(
40  # 'BSCHits',
41  # 'BCM1FHits',
42  # 'PLTHits'
43  # 'FP420SI',
44  # 'MuonCSCHits',
45  # 'MuonDTHits',
46  # 'MuonRPCHits',
47  # 'TotemHitsRP',
48  # 'TotemHitsT1',
49  # 'TotemHitsT2Gem')
50  pcrossingFrames = cms.untracked.vstring()
51 )
52 from Configuration.ProcessModifiers.premix_stage1_cff import premix_stage1
53 premix_stage1.toModify(mixSimHits,
54  pcrossingFrames = [
55  'MuonCSCHits',
56  'MuonDTHits',
57  'MuonRPCHits',
58  ]
59 )
60 
61 # fastsim customs
62 from Configuration.Eras.Modifier_fastSim_cff import fastSim
63 fastSim.toModify(mixSimHits,
64  input = ["MuonSimHits:MuonCSCHits",
65  "MuonSimHits:MuonDTHits",
66  "MuonSimHits:MuonRPCHits",
67  "fastSimProducer:TrackerHits"],
68  subdets = ['MuonCSCHits',
69  'MuonDTHits',
70  'MuonRPCHits',
71  'TrackerHits']
72 )
73 
74 mixCaloHits = cms.PSet(
75  input = cms.VInputTag( # note that this list needs to be in the same order as the subdets
76  #cms.InputTag("g4SimHits","CaloHitsTk"), cms.InputTag("g4SimHits","CastorBU"), cms.InputTag("g4SimHits","CastorPL"), cms.InputTag("g4SimHits","CastorTU"),
77  cms.InputTag("g4SimHits","CastorFI"),
78  cms.InputTag("g4SimHits","EcalHitsEB"), cms.InputTag("g4SimHits","EcalHitsEE"), cms.InputTag("g4SimHits","EcalHitsES"),
79  #cms.InputTag("g4SimHits","EcalTBH4BeamHits"), cms.InputTag("g4SimHits","HcalTB06BeamHits"),
80  cms.InputTag("g4SimHits","HcalHits"),
81  cms.InputTag("g4SimHits","ZDCHITS")),
82  type = cms.string('PCaloHit'),
83  subdets = cms.vstring(
84  #'CaloHitsTk',
85  #'CastorBU',
86  'CastorFI',
87  #'CastorPL',
88  #'CastorTU',
89  'EcalHitsEB',
90  'EcalHitsEE',
91  'EcalHitsES',
92  #'EcalTBH4BeamHits',
93  'HcalHits',
94  #'HcalTB06BeamHits',
95  'ZDCHITS'),
96  crossingFrames = cms.untracked.vstring()
97 )
98 
99 # fastsim customs
100 fastSim.toModify(mixCaloHits,
101  input = ["fastSimProducer:EcalHitsEB",
102  "fastSimProducer:EcalHitsEE",
103  "fastSimProducer:EcalHitsES",
104  "fastSimProducer:HcalHits"],
105  subdets = ['EcalHitsEB',
106  'EcalHitsEE',
107  'EcalHitsES',
108  'HcalHits']
109 )
110 
111 
112 mixSimTracks = cms.PSet(
113  makeCrossingFrame = cms.untracked.bool(False),
114  input = cms.VInputTag(cms.InputTag("g4SimHits")),
115  type = cms.string('SimTrack')
116 )
117 mixSimVertices = cms.PSet(
118  makeCrossingFrame = cms.untracked.bool(False),
119  input = cms.VInputTag(cms.InputTag("g4SimHits")),
120  type = cms.string('SimVertex')
121 )
122 
123 # fastsim customs
124 fastSim.toModify(mixSimTracks, input = ["fastSimProducer"])
125 fastSim.toModify(mixSimVertices, input = ["fastSimProducer"])
126 
127 mixHepMCProducts = cms.PSet(
128  makeCrossingFrame = cms.untracked.bool(True),
129  input = cms.VInputTag(cms.InputTag("generatorSmeared"),cms.InputTag("generator")),
130  type = cms.string('HepMCProduct')
131 )
132 
133 # reconstructed tracks for fastsim
134 mixReconstructedTracks = cms.PSet(
135  input = cms.VInputTag(cms.InputTag("generalTracksBeforeMixing")),
136  type = cms.string('RecoTrack')
137  )
138 
139 theMixObjects = cms.PSet(
140  mixCH = cms.PSet(
141  mixCaloHits
142  ),
143  mixTracks = cms.PSet(
144  mixSimTracks
145  ),
146  mixVertices = cms.PSet(
147  mixSimVertices
148  ),
149  mixSH = cms.PSet(
150  mixSimHits
151  ),
152  mixHepMC = cms.PSet(
153  mixHepMCProducts
154  )
155 )
156 
157 # fastsim customs
158 fastSim.toModify(theMixObjects, mixRecoTracks = cms.PSet(mixReconstructedTracks))
159 
160 mixPCFSimHits = cms.PSet(
161  input = cms.VInputTag(cms.InputTag("CFWriter","g4SimHitsBSCHits"), cms.InputTag("CFWriter","g4SimHitsBCM1FHits"), cms.InputTag("CFWriter","g4SimHitsPLTHits"), cms.InputTag("CFWriter","g4SimHitsFP420SI"), cms.InputTag("CFWriter","g4SimHitsMuonCSCHits"), cms.InputTag("CFWriter","g4SimHitsMuonDTHits"), cms.InputTag("CFWriter","g4SimHitsMuonRPCHits"),
162  cms.InputTag("CFWriter","g4SimHitsTotemHitsRP"), cms.InputTag("CFWriter","g4SimHitsTotemHitsT1"), cms.InputTag("CFWriter","g4SimHitsTotemHitsT2Gem"), cms.InputTag("CFWriter","g4SimHitsTrackerHitsPixelBarrelHighTof"), cms.InputTag("CFWriter","g4SimHitsTrackerHitsPixelBarrelLowTof"),
163  cms.InputTag("CFWriter","g4SimHitsTrackerHitsPixelEndcapHighTof"), cms.InputTag("CFWriter","g4SimHitsTrackerHitsPixelEndcapLowTof"), cms.InputTag("CFWriter","g4SimHitsTrackerHitsTECHighTof"), cms.InputTag("CFWriter","g4SimHitsTrackerHitsTECLowTof"), cms.InputTag("CFWriter","g4SimHitsTrackerHitsTIBHighTof"),
164  cms.InputTag("CFWriter","g4SimHitsTrackerHitsTIBLowTof"), cms.InputTag("CFWriter","g4SimHitsTrackerHitsTIDHighTof"), cms.InputTag("CFWriter","g4SimHitsTrackerHitsTIDLowTof"), cms.InputTag("CFWriter","g4SimHitsTrackerHitsTOBHighTof"), cms.InputTag("CFWriter","g4SimHitsTrackerHitsTOBLowTof")),
165  type = cms.string('PSimHitPCrossingFrame'),
166  subdets = cms.vstring('BSCHits',
167  'BCM1FHits',
168  'PLTHits',
169  'FP420SI',
170  'MuonCSCHits',
171  'MuonDTHits',
172  'MuonRPCHits',
173  'TotemHitsRP',
174  'TotemHitsT1',
175  'TotemHitsT2Gem',
176  'TrackerHitsPixelBarrelHighTof',
177  'TrackerHitsPixelBarrelLowTof',
178  'TrackerHitsPixelEndcapHighTof',
179  'TrackerHitsPixelEndcapLowTof',
180  'TrackerHitsTECHighTof',
181  'TrackerHitsTECLowTof',
182  'TrackerHitsTIBHighTof',
183  'TrackerHitsTIBLowTof',
184  'TrackerHitsTIDHighTof',
185  'TrackerHitsTIDLowTof',
186  'TrackerHitsTOBHighTof',
187  'TrackerHitsTOBLowTof')
188 )
189 
190 mixPCFCaloHits = cms.PSet(
191  input = cms.VInputTag(cms.InputTag("CFWriter","g4SimHitsCaloHitsTk"), cms.InputTag("CFWriter","g4SimHitsCastorBU"), cms.InputTag("CFWriter","g4SimHitsCastorFI"), cms.InputTag("CFWriter","g4SimHitsCastorPL"), cms.InputTag("CFWriter","g4SimHitsCastorTU"),
192  cms.InputTag("CFWriter","g4SimHitsEcalHitsEB"), cms.InputTag("CFWriter","g4SimHitsEcalHitsEE"), cms.InputTag("CFWriter","g4SimHitsEcalHitsES"), cms.InputTag("CFWriter","g4SimHitsEcalTBH4BeamHits"), cms.InputTag("CFWriter","g4SimHitsHcalHits"),
193  cms.InputTag("CFWriter","g4SimHitsHcalTB06BeamHits"), cms.InputTag("CFWriter","g4SimHitsZDCHITS")),
194  type = cms.string('PCaloHitPCrossingFrame'),
195  subdets = cms.vstring('CaloHitsTk',
196  'CastorBU',
197  'CastorFI',
198  'CastorPL',
199  'CastorTU',
200  'EcalHitsEB',
201  'EcalHitsEE',
202  'EcalHitsES',
203  'EcalTBH4BeamHits',
204  'HcalHits',
205  'HcalTB06BeamHits',
206  'ZDCHITS')
207 )
208 
209 mixPCFSimTracks = cms.PSet(
210  input = cms.VInputTag(cms.InputTag("CFWriter","g4SimHits")),
211  type = cms.string('SimTrackPCrossingFrame')
212 )
213 
214 mixPCFSimVertices = cms.PSet(
215  input = cms.VInputTag(cms.InputTag("CFWriter","g4SimHits")),
216  type = cms.string('SimVertexPCrossingFrame')
217 )
218 
219 mixPCFHepMCProducts = cms.PSet(
220  input = cms.VInputTag(cms.InputTag("CFWriter","generator")),
221  type = cms.string('HepMCProductPCrossingFrame')
222 )
223 
224 from SimCalorimetry.HGCalSimProducers.hgcalDigitizer_cfi import hgceeDigitizer, hgchefrontDigitizer, hgchebackDigitizer, hfnoseDigitizer
225 
226 from Configuration.Eras.Modifier_run2_GEM_2017_cff import run2_GEM_2017
227 run2_GEM_2017.toModify( theMixObjects,
228  mixSH = dict(
229  input = theMixObjects.mixSH.input + [ cms.InputTag("g4SimHits","MuonGEMHits") ],
230  subdets = theMixObjects.mixSH.subdets + [ 'MuonGEMHits' ],
231  crossingFrames = theMixObjects.mixSH.crossingFrames + [ 'MuonGEMHits' ]
232  )
233 )
234 (premix_stage1 & run2_GEM_2017).toModify(theMixObjects,
235  mixSH = dict(
236  pcrossingFrames = theMixObjects.mixSH.pcrossingFrames + [ 'MuonGEMHits' ]
237  )
238 )
239 from Configuration.Eras.Modifier_run3_GEM_cff import run3_GEM
240 run3_GEM.toModify( theMixObjects,
241  mixSH = dict(
242  input = theMixObjects.mixSH.input + [ cms.InputTag("g4SimHits","MuonGEMHits") ],
243  subdets = theMixObjects.mixSH.subdets + [ 'MuonGEMHits' ],
244  crossingFrames = theMixObjects.mixSH.crossingFrames + [ 'MuonGEMHits' ]
245  )
246 )
247 (premix_stage1 & run3_GEM).toModify(theMixObjects,
248  mixSH = dict(
249  pcrossingFrames = theMixObjects.mixSH.pcrossingFrames + [ 'MuonGEMHits' ]
250  )
251 )
252 from Configuration.Eras.Modifier_phase2_muon_cff import phase2_muon
253 phase2_muon.toModify( theMixObjects,
254  mixSH = dict(
255  input = theMixObjects.mixSH.input + [ cms.InputTag("g4SimHits","MuonME0Hits") ],
256  subdets = theMixObjects.mixSH.subdets + [ 'MuonME0Hits' ],
257  crossingFrames = theMixObjects.mixSH.crossingFrames + [ 'MuonME0Hits' ]
258  )
259 )
260 (premix_stage1 & phase2_muon).toModify(theMixObjects,
261  mixSH = dict(
262  pcrossingFrames = theMixObjects.mixSH.pcrossingFrames + [ 'MuonME0Hits' ]
263  )
264 )
265 from Configuration.Eras.Modifier_phase2_hgcal_cff import phase2_hgcal
266 phase2_hgcal.toModify( theMixObjects,
267  mixCH = dict(
268  input = theMixObjects.mixCH.input + [ cms.InputTag("g4SimHits",hgceeDigitizer.hitCollection.value()),
269  cms.InputTag("g4SimHits",hgchefrontDigitizer.hitCollection.value()) ],
270  subdets = theMixObjects.mixCH.subdets + [ hgceeDigitizer.hitCollection.value(),
271  hgchefrontDigitizer.hitCollection.value() ],
272  )
273 )
274 from Configuration.Eras.Modifier_phase2_hgcalV9_cff import phase2_hgcalV9
275 phase2_hgcalV9.toModify( theMixObjects,
276  mixCH = dict(
277  input = theMixObjects.mixCH.input + [ cms.InputTag("g4SimHits",hgchebackDigitizer.hitCollection.value()) ],
278  subdets = theMixObjects.mixCH.subdets + [ hgchebackDigitizer.hitCollection.value() ],
279  )
280 )
281 from Configuration.Eras.Modifier_phase2_hfnose_cff import phase2_hfnose
282 phase2_hfnose.toModify( theMixObjects,
283  mixCH = dict(
284  input = theMixObjects.mixCH.input + [ cms.InputTag("g4SimHits",hfnoseDigitizer.hitCollection.value()) ],
285  subdets = theMixObjects.mixCH.subdets + [ hfnoseDigitizer.hitCollection.value() ],
286  )
287 )
288 
289 from Configuration.Eras.Modifier_phase2_timing_layer_cff import phase2_timing_layer
290 phase2_timing_layer.toModify( theMixObjects,
291  mixSH = dict(
292  input = theMixObjects.mixSH.input + [ cms.InputTag("g4SimHits","FastTimerHitsBarrel"), cms.InputTag("g4SimHits","FastTimerHitsEndcap") ],
293  subdets = theMixObjects.mixSH.subdets + [ 'FastTimerHitsBarrel','FastTimerHitsEndcap' ],
294  crossingFrames = theMixObjects.mixSH.crossingFrames + [ 'FastTimerHitsBarrel','FastTimerHitsEndcap' ]
295  )
296 )