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