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 
53 # fastsim customs
54 from Configuration.Eras.Modifier_fastSim_cff import fastSim
55 fastSim.toModify(mixSimHits,
56  input = ["MuonSimHits:MuonCSCHits",
57  "MuonSimHits:MuonDTHits",
58  "MuonSimHits:MuonRPCHits",
59  "fastSimProducer:TrackerHits"],
60  subdets = ['MuonCSCHits',
61  'MuonDTHits',
62  'MuonRPCHits',
63  'TrackerHits']
64 )
65 
66 mixCaloHits = cms.PSet(
67  input = cms.VInputTag( # note that this list needs to be in the same order as the subdets
68  #cms.InputTag("g4SimHits","CaloHitsTk"), cms.InputTag("g4SimHits","CastorBU"), cms.InputTag("g4SimHits","CastorPL"), cms.InputTag("g4SimHits","CastorTU"),
69  cms.InputTag("g4SimHits","CastorFI"),
70  cms.InputTag("g4SimHits","EcalHitsEB"), cms.InputTag("g4SimHits","EcalHitsEE"), cms.InputTag("g4SimHits","EcalHitsES"),
71  #cms.InputTag("g4SimHits","EcalTBH4BeamHits"), cms.InputTag("g4SimHits","HcalTB06BeamHits"),
72  cms.InputTag("g4SimHits","HcalHits"),
73  cms.InputTag("g4SimHits","ZDCHITS")),
74  type = cms.string('PCaloHit'),
75  subdets = cms.vstring(
76  #'CaloHitsTk',
77  #'CastorBU',
78  'CastorFI',
79  #'CastorPL',
80  #'CastorTU',
81  'EcalHitsEB',
82  'EcalHitsEE',
83  'EcalHitsES',
84  #'EcalTBH4BeamHits',
85  'HcalHits',
86  #'HcalTB06BeamHits',
87  'ZDCHITS'),
88  crossingFrames = cms.untracked.vstring()
89 )
90 
91 # fastsim customs
92 fastSim.toModify(mixCaloHits,
93  input = ["fastSimProducer:EcalHitsEB",
94  "fastSimProducer:EcalHitsEE",
95  "fastSimProducer:EcalHitsES",
96  "fastSimProducer:HcalHits"],
97  subdets = ['EcalHitsEB',
98  'EcalHitsEE',
99  'EcalHitsES',
100  'HcalHits']
101 )
102 
103 
104 mixSimTracks = cms.PSet(
105  makeCrossingFrame = cms.untracked.bool(False),
106  input = cms.VInputTag(cms.InputTag("g4SimHits")),
107  type = cms.string('SimTrack')
108 )
109 mixSimVertices = cms.PSet(
110  makeCrossingFrame = cms.untracked.bool(False),
111  input = cms.VInputTag(cms.InputTag("g4SimHits")),
112  type = cms.string('SimVertex')
113 )
114 
115 # fastsim customs
116 fastSim.toModify(mixSimTracks, input = ["fastSimProducer"])
117 fastSim.toModify(mixSimVertices, input = ["fastSimProducer"])
118 
119 mixHepMCProducts = cms.PSet(
120  makeCrossingFrame = cms.untracked.bool(True),
121  input = cms.VInputTag(cms.InputTag("generatorSmeared"),cms.InputTag("generator")),
122  type = cms.string('HepMCProduct')
123 )
124 
125 # reconstructed tracks for fastsim
126 mixReconstructedTracks = cms.PSet(
127  input = cms.VInputTag(cms.InputTag("generalTracksBeforeMixing")),
128  type = cms.string('RecoTrack')
129  )
130 
131 theMixObjects = cms.PSet(
132  mixCH = cms.PSet(
133  mixCaloHits
134  ),
135  mixTracks = cms.PSet(
136  mixSimTracks
137  ),
138  mixVertices = cms.PSet(
139  mixSimVertices
140  ),
141  mixSH = cms.PSet(
142  mixSimHits
143  ),
144  mixHepMC = cms.PSet(
145  mixHepMCProducts
146  )
147 )
148 
149 # fastsim customs
150 fastSim.toModify(theMixObjects, mixRecoTracks = cms.PSet(mixReconstructedTracks))
151 
152 mixPCFSimHits = cms.PSet(
153  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"),
154  cms.InputTag("CFWriter","g4SimHitsTotemHitsRP"), cms.InputTag("CFWriter","g4SimHitsTotemHitsT1"), cms.InputTag("CFWriter","g4SimHitsTotemHitsT2Gem"), cms.InputTag("CFWriter","g4SimHitsTrackerHitsPixelBarrelHighTof"), cms.InputTag("CFWriter","g4SimHitsTrackerHitsPixelBarrelLowTof"),
155  cms.InputTag("CFWriter","g4SimHitsTrackerHitsPixelEndcapHighTof"), cms.InputTag("CFWriter","g4SimHitsTrackerHitsPixelEndcapLowTof"), cms.InputTag("CFWriter","g4SimHitsTrackerHitsTECHighTof"), cms.InputTag("CFWriter","g4SimHitsTrackerHitsTECLowTof"), cms.InputTag("CFWriter","g4SimHitsTrackerHitsTIBHighTof"),
156  cms.InputTag("CFWriter","g4SimHitsTrackerHitsTIBLowTof"), cms.InputTag("CFWriter","g4SimHitsTrackerHitsTIDHighTof"), cms.InputTag("CFWriter","g4SimHitsTrackerHitsTIDLowTof"), cms.InputTag("CFWriter","g4SimHitsTrackerHitsTOBHighTof"), cms.InputTag("CFWriter","g4SimHitsTrackerHitsTOBLowTof")),
157  type = cms.string('PSimHitPCrossingFrame'),
158  subdets = cms.vstring('BSCHits',
159  'BCM1FHits',
160  'PLTHits',
161  'FP420SI',
162  'MuonCSCHits',
163  'MuonDTHits',
164  'MuonRPCHits',
165  'TotemHitsRP',
166  'TotemHitsT1',
167  'TotemHitsT2Gem',
168  'TrackerHitsPixelBarrelHighTof',
169  'TrackerHitsPixelBarrelLowTof',
170  'TrackerHitsPixelEndcapHighTof',
171  'TrackerHitsPixelEndcapLowTof',
172  'TrackerHitsTECHighTof',
173  'TrackerHitsTECLowTof',
174  'TrackerHitsTIBHighTof',
175  'TrackerHitsTIBLowTof',
176  'TrackerHitsTIDHighTof',
177  'TrackerHitsTIDLowTof',
178  'TrackerHitsTOBHighTof',
179  'TrackerHitsTOBLowTof')
180 )
181 
182 mixPCFCaloHits = cms.PSet(
183  input = cms.VInputTag(cms.InputTag("CFWriter","g4SimHitsCaloHitsTk"), cms.InputTag("CFWriter","g4SimHitsCastorBU"), cms.InputTag("CFWriter","g4SimHitsCastorFI"), cms.InputTag("CFWriter","g4SimHitsCastorPL"), cms.InputTag("CFWriter","g4SimHitsCastorTU"),
184  cms.InputTag("CFWriter","g4SimHitsEcalHitsEB"), cms.InputTag("CFWriter","g4SimHitsEcalHitsEE"), cms.InputTag("CFWriter","g4SimHitsEcalHitsES"), cms.InputTag("CFWriter","g4SimHitsEcalTBH4BeamHits"), cms.InputTag("CFWriter","g4SimHitsHcalHits"),
185  cms.InputTag("CFWriter","g4SimHitsHcalTB06BeamHits"), cms.InputTag("CFWriter","g4SimHitsZDCHITS")),
186  type = cms.string('PCaloHitPCrossingFrame'),
187  subdets = cms.vstring('CaloHitsTk',
188  'CastorBU',
189  'CastorFI',
190  'CastorPL',
191  'CastorTU',
192  'EcalHitsEB',
193  'EcalHitsEE',
194  'EcalHitsES',
195  'EcalTBH4BeamHits',
196  'HcalHits',
197  'HcalTB06BeamHits',
198  'ZDCHITS')
199 )
200 
201 mixPCFSimTracks = cms.PSet(
202  input = cms.VInputTag(cms.InputTag("CFWriter","g4SimHits")),
203  type = cms.string('SimTrackPCrossingFrame')
204 )
205 
206 mixPCFSimVertices = cms.PSet(
207  input = cms.VInputTag(cms.InputTag("CFWriter","g4SimHits")),
208  type = cms.string('SimVertexPCrossingFrame')
209 )
210 
211 mixPCFHepMCProducts = cms.PSet(
212  input = cms.VInputTag(cms.InputTag("CFWriter","generator")),
213  type = cms.string('HepMCProductPCrossingFrame')
214 )
215 
216 from SimCalorimetry.HGCalSimProducers.hgcalDigitizer_cfi import hgceeDigitizer, hgchefrontDigitizer, hfnoseDigitizer
217 
218 from Configuration.Eras.Modifier_run2_GEM_2017_cff import run2_GEM_2017
219 run2_GEM_2017.toModify( theMixObjects,
220  mixSH = dict(
221  input = theMixObjects.mixSH.input + [ cms.InputTag("g4SimHits","MuonGEMHits") ],
222  subdets = theMixObjects.mixSH.subdets + [ 'MuonGEMHits' ],
223  crossingFrames = theMixObjects.mixSH.crossingFrames + [ 'MuonGEMHits' ]
224  )
225 )
226 from Configuration.Eras.Modifier_run3_GEM_cff import run3_GEM
227 run3_GEM.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 from Configuration.Eras.Modifier_phase2_muon_cff import phase2_muon
235 phase2_muon.toModify( theMixObjects,
236  mixSH = dict(
237  input = theMixObjects.mixSH.input + [ cms.InputTag("g4SimHits","MuonME0Hits") ],
238  subdets = theMixObjects.mixSH.subdets + [ 'MuonME0Hits' ],
239  crossingFrames = theMixObjects.mixSH.crossingFrames + [ 'MuonME0Hits' ]
240  )
241 )
242 from Configuration.ProcessModifiers.premix_stage1_cff import premix_stage1
243 (premix_stage1 & phase2_muon).toModify(theMixObjects,
244  mixSH = dict(
245  pcrossingFrames = theMixObjects.mixSH.pcrossingFrames + [ 'MuonME0Hits' ]
246  )
247 )
248 from Configuration.Eras.Modifier_phase2_hgcal_cff import phase2_hgcal
249 phase2_hgcal.toModify( theMixObjects,
250  mixCH = dict(
251  input = theMixObjects.mixCH.input + [ cms.InputTag("g4SimHits",hgceeDigitizer.hitCollection.value()),
252  cms.InputTag("g4SimHits",hgchefrontDigitizer.hitCollection.value()) ],
253  subdets = theMixObjects.mixCH.subdets + [ hgceeDigitizer.hitCollection.value(),
254  hgchefrontDigitizer.hitCollection.value() ],
255  )
256 )
257 from Configuration.Eras.Modifier_phase2_hfnose_cff import phase2_hfnose
258 phase2_hfnose.toModify( theMixObjects,
259  mixCH = dict(
260  input = theMixObjects.mixCH.input + [ cms.InputTag("g4SimHits",hfnoseDigitizer.hitCollection.value()) ],
261  subdets = theMixObjects.mixCH.subdets + [ hfnoseDigitizer.hitCollection.value() ],
262  )
263 )
264 
265 from Configuration.Eras.Modifier_phase2_timing_layer_cff import phase2_timing_layer
266 phase2_timing_layer.toModify( theMixObjects,
267  mixSH = dict(
268  input = theMixObjects.mixSH.input + [ cms.InputTag("g4SimHits","FastTimerHitsBarrel"), cms.InputTag("g4SimHits","FastTimerHitsEndcap") ],
269  subdets = theMixObjects.mixSH.subdets + [ 'FastTimerHitsBarrel','FastTimerHitsEndcap' ],
270  crossingFrames = theMixObjects.mixSH.crossingFrames + [ 'FastTimerHitsBarrel','FastTimerHitsEndcap' ]
271  )
272 )