CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
customizeHLTforMC.py
Go to the documentation of this file.
2 
3 def customizeHLTforFastSim(process,_fastSim=True):
4  process=customizeHLTforMC(process,_fastSim)
5  return process
6 
7 def customizeHLTforFullSim(process,_fastSim=False):
8  process=customizeHLTforMC(process,_fastSim)
9  return process
10 
11 def customizeHLTforMC(process,_fastSim=False):
12  """adapt the HLT to run on MC, instead of data
13  see Configuration/StandardSequences/Reconstruction_Data_cff.py
14  which does the opposite, for RECO"""
15 
16  # PFRecHitProducerHCAL
17  if 'hltParticleFlowRecHitHCAL' in process.__dict__:
18  process.hltParticleFlowRecHitHCAL.ApplyPulseDPG = cms.bool(False)
19  process.hltParticleFlowRecHitHCAL.LongShortFibre_Cut = cms.double(1000000000.0)
20 
21  if _fastSim:
22 
23  fastsim = cms.ProcessFragment( process.name_() )
24  fastsim.load( "FastSimulation.HighLevelTrigger.HLTSetup_cff" )
25 
26  fastSimUnsupportedPaths = (
27 
28  # paths for which a recovery is not foreseen/possible
29  "AlCa_*_v*",
30  "DQM_*_v*",
31  "HLT_*Calibration_v*",
32  "HLT_DTErrors_v*",
33  "HLT_Random_v*",
34  "HLT_HcalNZS_v*",
35  "HLT_HcalPhiSym_v*",
36  "HLT_Activity_Ecal*_v*",
37  "HLT_IsoTrackHB_v*",
38  "HLT_IsoTrackHE_v*",
39  "HLT_L1SingleMuOpen_AntiBPTX_v*",
40  "HLT_JetE*_NoBPTX*_v*",
41  "HLT_L2Mu*_NoBPTX*_v*",
42  "HLT_PixelTracks_Multiplicity70_v*",
43  "HLT_PixelTracks_Multiplicity80_v*",
44  "HLT_PixelTracks_Multiplicity90_v*",
45  "HLT_Beam*_v*",
46  #"HLT_L1Tech_*_v*",
47  "HLT_HI*",
48  "HLT_GlobalRunHPDNoise_v*",
49  "HLT_L1TrackerCosmics_v*",
50  "HLT_HcalUTCA_v*",
51 
52  # TODO: paths not supported by FastSim, but for which a recovery should be attempted
53  "HLT_DoubleMu33NoFiltersNoVtx_v*",
54  "HLT_DoubleMu38NoFiltersNoVtx_v*",
55  "HLT_Mu38NoFiltersNoVtx_Photon38_CaloIdL_v*",
56  "HLT_Mu42NoFiltersNoVtx_Photon42_CaloIdL_v*",
57  "HLT_DoubleMu23NoFiltersNoVtxDisplaced_v*",
58  "HLT_DoubleMu28NoFiltersNoVtxDisplaced_v*",
59  "HLT_Mu28NoFiltersNoVtxDisplaced_Photon28_CaloIdL_v*",
60  "HLT_Mu33NoFiltersNoVtxDisplaced_Photon33_CaloIdL_v*",
61  "HLT_HT350_DisplacedDijet80_Tight_DisplacedTrack_v*",
62  "HLT_HT350_DisplacedDijet80_DisplacedTrack_v*",
63  "HLT_HT500_DisplacedDijet40_Inclusive_v*",
64  "HLT_HT350_DisplacedDijet40_DisplacedTrack_v*",
65  "HLT_HT550_DisplacedDijet40_Inclusive_v*",
66  "HLT_HT350_DisplacedDijet80_DisplacedTrack_v*",
67  "HLT_TrkMu15_DoubleTrkMu5NoFiltersNoVtx_v*",
68  "HLT_TrkMu17_DoubleTrkMu8NoFiltersNoVtx_v*",
69  "HLT_MET75_IsoTrk50_v*",
70  "HLT_MET90_IsoTrk50_v*",
71  "HLT_VBF_DisplacedJet40_DisplacedTrack_v*",
72  "HLT_VBF_DisplacedJet40_TightID_DisplacedTrack_v*",
73  "HLT_VBF_DisplacedJet40_VTightID_DisplacedTrack_v*",
74  "HLT_VBF_DisplacedJet40_VVTightID_DisplacedTrack_v*",
75  "HLT_Mu33NoFiltersNoVtxDisplaced_DisplacedJet50_Tight_v*",
76  "HLT_Mu33NoFiltersNoVtxDisplaced_DisplacedJet50_Loose_v*",
77  "HLT_Mu38NoFiltersNoVtxDisplaced_DisplacedJet60_Tight_v*",
78  "HLT_Mu38NoFiltersNoVtxDisplaced_DisplacedJet60_Loose_v*",
79  "HLT_Mu38NoFiltersNoVtx_DisplacedJet60_Loose_v*",
80  "HLT_Mu28NoFiltersNoVtx_DisplacedJet40_Loose_v*",
81  "HLT_Mu28NoFiltersNoVtx_CentralCaloJet40_v*",
82  "HLT_Mu23NoFiltersNoVtx_Photon23_CaloIdL_v*",
83  "HLT_DoubleMu18NoFiltersNoVtx_v*",
84  "HLT_DoubleMuNoFiltersNoVtx_SaveObjects_v*",
85  "MC_DoubleMuNoFiltersNoVtx_v*",
86  "HLT_MET60_IsoTrk*",
87  )
88 
89  ESModulesToRemove = (
90 # "CaloTowerGeometryFromDBEP",
91 # "CastorGeometryFromDBEP",
92 # "EcalBarrelGeometryFromDBEP",
93 # "EcalEndcapGeometryFromDBEP",
94 # "EcalPreshowerGeometryFromDBEP",
95 # "HcalGeometryFromDBEP",
96 # "ZdcGeometryFromDBEP",
97 # "XMLFromDBSource",
98 # "sistripconn",
99 
100 # "navigationSchoolESProducer",
101 # "TransientTrackBuilderESProducer",
102 # "SteppingHelixPropagatorAny",
103 # "OppositeMaterialPropagator",
104 # "MaterialPropagator",
105 # "CaloTowerConstituentsMapBuilder",
106 # "CaloTopologyBuilder",
107  )
108 
109  ModulesToRemove = (
110  # "hltL3MuonIsolations",
111  # "hltPixelVertices",
112  "hltCkfL1SeededTrackCandidates",
113  "hltCtfL1SeededithMaterialTracks",
114  "hltCkf3HitL1SeededTrackCandidates",
115  "hltCtf3HitL1SeededWithMaterialTracks",
116  "hltCkf3HitActivityTrackCandidates",
117  "hltCtf3HitActivityWithMaterialTracks",
118  "hltActivityCkfTrackCandidatesForGSF",
119  "hltL1SeededCkfTrackCandidatesForGSF",
120  "hltMuCkfTrackCandidates",
121  "hltMuCtfTracks",
122  "hltTau3MuCkfTrackCandidates",
123  "hltTau3MuCtfWithMaterialTracks",
124  "hltMuTrackJpsiCkfTrackCandidates",
125  "hltMuTrackJpsiCtfTracks",
126  "hltMuTrackJpsiEffCkfTrackCandidates",
127  "hltMuTrackJpsiEffCtfTracks",
128  "hltJpsiTkPixelSeedFromL3Candidate",
129  "hltCkfTrackCandidatesJpsiTk",
130  "hltCtfWithMaterialTracksJpsiTk",
131  "hltMuTrackCkfTrackCandidatesOnia",
132  "hltMuTrackCtfTracksOnia",
133 
134  "hltFEDSelector",
135  "hltL3TrajSeedOIHit",
136  "hltL3TrajSeedIOHit",
137  "hltL3NoFiltersTrajSeedOIHit",
138  "hltL3NoFiltersTrajSeedIOHit",
139  "hltL3TrackCandidateFromL2OIState",
140  "hltL3TrackCandidateFromL2OIHit",
141  "hltL3TrackCandidateFromL2IOHit",
142  "hltL3TrackCandidateFromL2NoVtx",
143  "hltHcalDigis",
144  "hltHoreco",
145  "hltHfreco",
146  "hltHbhereco",
147  "hltESRawToRecHitFacility",
148  "hltEcalRecHitAll",
149  "hltESRecHitAll",
150  # === eGamma
151  "hltEgammaCkfTrackCandidatesForGSF",
152  "hltEgammaGsfTracks",
153  "hltEgammaCkfTrackCandidatesForGSFUnseeded",
154  "hltEgammaGsfTracksUnseeded",
155  # === hltPF
156  "hltPFJetCkfTrackCandidates",
157  "hltPFJetCtfWithMaterialTracks",
158  "hltPFlowTrackSelectionHighPurity",
159  # === hltFastJet
160  "hltDisplacedHT250L1FastJetRegionalPixelSeedGenerator",
161  "hltDisplacedHT250L1FastJetRegionalCkfTrackCandidates",
162  "hltDisplacedHT250L1FastJetRegionalCtfWithMaterialTracks",
163  "hltDisplacedHT300L1FastJetRegionalPixelSeedGenerator",
164  "hltDisplacedHT300L1FastJetRegionalCkfTrackCandidates",
165  "hltDisplacedHT300L1FastJetRegionalCtfWithMaterialTracks",
166  "hltBLifetimeRegionalPixelSeedGeneratorbbPhiL1FastJet",
167  "hltBLifetimeRegionalCkfTrackCandidatesbbPhiL1FastJet",
168  "hltBLifetimeRegionalCtfWithMaterialTracksbbPhiL1FastJet",
169  "hltBLifetimeRegionalPixelSeedGeneratorHbbVBF",
170  "hltBLifetimeRegionalCkfTrackCandidatesHbbVBF",
171  "hltBLifetimeRegionalCtfWithMaterialTracksHbbVBF",
172  "hltBLifetimeBTagIP3D1stTrkRegionalPixelSeedGeneratorJet20HbbL1FastJet",
173  "hltBLifetimeBTagIP3D1stTrkRegionalCkfTrackCandidatesJet20HbbL1FastJet",
174  "hltBLifetimeBTagIP3D1stTrkRegionalCtfWithMaterialTracksJet20HbbL1FastJet",
175  "hltBLifetimeDiBTagIP3D1stTrkRegionalPixelSeedGeneratorJet20HbbL1FastJet",
176  "hltBLifetimeDiBTagIP3D1stTrkRegionalCkfTrackCandidatesJet20HbbL1FastJet",
177  "hltBLifetimeDiBTagIP3D1stTrkRegionalCtfWithMaterialTracksJet20HbbL1FastJet",
178  # === hltBLifetimeRegional
179  "hltBLifetimeRegionalPixelSeedGeneratorHbb",
180  "hltBLifetimeRegionalCkfTrackCandidatesHbb",
181  "hltBLifetimeRegionalCtfWithMaterialTracksHbb",
182  "hltBLifetimeRegionalPixelSeedGeneratorbbPhi",
183  "hltBLifetimeRegionalCkfTrackCandidatesbbPhi",
184  "hltBLifetimeRegionalCtfWithMaterialTracksbbPhi",
185  "hltBLifetimeBTagIP3D1stTrkRegionalPixelSeedGeneratorJet20Hbb",
186  "hltBLifetimeBTagIP3D1stTrkRegionalCkfTrackCandidatesJet20Hbb",
187  "hltBLifetimeBTagIP3D1stTrkRegionalCtfWithMaterialTracksJet20Hbb",
188  "hltBLifetimeDiBTagIP3D1stTrkRegionalPixelSeedGeneratorJet20Hbb",
189  "hltBLifetimeDiBTagIP3D1stTrkRegionalCkfTrackCandidatesJet20Hbb",
190  "hltBLifetimeDiBTagIP3D1stTrkRegionalCtfWithMaterialTracksJet20Hbb",
191  "hltBLifetimeFastRegionalPixelSeedGeneratorHbbVBF",
192  "hltBLifetimeFastRegionalCkfTrackCandidatesHbbVBF",
193  "hltBLifetimeFastRegionalCtfWithMaterialTracksHbbVBF",
194  "hltBLifetimeRegionalPixelSeedGeneratorbbPhiL1FastJetFastPV",
195  "hltBLifetimeRegionalCkfTrackCandidatesbbPhiL1FastJetFastPV",
196  "hltBLifetimeRegionalCtfWithMaterialTracksbbPhiL1FastJetFastPV",
197  "hltFastPixelBLifetimeRegionalPixelSeedGeneratorHbb",
198  "hltFastPixelBLifetimeRegionalCkfTrackCandidatesHbb",
199  "hltFastPixelBLifetimeRegionalCtfWithMaterialTracksHbb",
200 
201  "hltPixelTracksForMinBias",
202  "hltPixelTracksForHighMult",
203  "hltRegionalPixelTracks",
204  "hltPixelTracksReg",
205  "hltPixelTracksL3Muon",
206  "hltPixelTracksGlbTrkMuon",
207  "hltPixelTracksHighPtTkMuIso",
208  "hltPixelTracksHybrid",
209  "hltPixelTracksForPhotons",
210  "hltPixelTracksForEgamma",
211  "hltPixelTracksElectrons",
212  "hltPixelTracksForHighPt",
213  "hltHighPtPixelTracks",
214  "hltPixelTracksForNoPU",
215 
216  "hltFastPixelHitsVertex",
217  "hltFastPixelTracks",
218  "hltFastPixelTracksRecover",
219 
220  "hltPixelLayerPairs",
221  "hltPixelLayerTriplets",
222  "hltPixelLayerTripletsReg",
223  "hltPixelLayerTripletsHITHB",
224  "hltPixelLayerTripletsHITHE",
225  "hltMixedLayerPairs",
226 
227  "hltFastPrimaryVertexbbPhi",
228  "hltPixelTracksFastPVbbPhi",
229  "hltPixelTracksRecoverbbPhi",
230  "hltFastPixelHitsVertexVHbb",
231  "hltFastPixelTracksVHbb",
232  "hltFastPixelTracksRecoverVHbb",
233 
234  "hltFastPrimaryVertex",
235  "hltFastPVPixelVertexFilter",
236  "hltFastPVPixelTracks",
237  "hltFastPVPixelTracksRecover",
238 
239  # "hltPixelMatchElectronsActivity",
240 
241  "hltMuonCSCDigis",
242  "hltMuonDTDigis",
243  "hltMuonRPCDigis",
244  "hltGtDigis",
245 # "hltL1GtTrigReport",
246  # "hltCsc2DRecHits",
247  # "hltDt1DRecHits",
248  # "hltRpcRecHits",
249  "hltScalersRawToDigi",
250  "hltEcalPreshowerDigis",
251  "hltEcalDigis",
252  "hltEcalDetIdToBeRecovered",
253 
254  )
255 
256  SequencesToRemove = (
257  "HLTL1SeededEgammaRegionalRecoTrackerSequence",
258  "HLTEcalActivityEgammaRegionalRecoTrackerSequence",
259  "HLTPixelMatchElectronActivityTrackingSequence",
260  "HLTDoLocalStripSequence",
261  "HLTDoLocalPixelSequence",
262  "HLTDoLocalPixelSequenceRegL2Tau",
263  "HLTDoLocalStripSequenceReg",
264  "HLTDoLocalPixelSequenceReg",
265  "HLTDoLocalStripSequenceRegForBTag",
266  "HLTDoLocalPixelSequenceRegForBTag",
267  "HLTDoLocalPixelSequenceRegForNoPU",
268  # "hltSiPixelDigis",
269  # "hltSiPixelClusters",
270  # "hltSiPixelRecHits",
271  "HLTRecopixelvertexingSequence",
272 # "HLTEndSequence",
273  "HLTBeginSequence",
274  "HLTBeginSequenceNZS",
275  "HLTBeginSequenceBPTX",
276  "HLTBeginSequenceAntiBPTX",
277  "HLTHBHENoiseSequence",
278  "HLTIterativeTrackingIter04",
279  "HLTIterativeTrackingIter02",
280  "HLTIterativeTracking",
281  "HLTIterativeTrackingForHighPt",
282  "HLTIterativeTrackingTau3Mu",
283  "HLTIterativeTrackingReg",
284  "HLTIterativeTrackingForElectronIter02",
285  "HLTIterativeTrackingForPhotonsIter02",
286  "HLTIterativeTrackingL3MuonIter02",
287  "HLTIterativeTrackingGlbTrkMuonIter02",
288  "HLTIterativeTrackingL3MuonRegIter02",
289  "HLTIterativeTrackingHighPtTkMu",
290  "HLTIterativeTrackingHighPtTkMuIsoIter02",
291  "HLTIterativeTrackingForBTagIter02",
292  "HLTIterativeTrackingForBTagIter12",
293  "HLTIterativeTrackingForTauIter04",
294  "HLTIterativeTrackingForTauIter02",
295  "HLTIterativeTrackingDisplacedJpsiIter02",
296  "HLTIterativeTrackingDisplacedPsiPrimeIter02",
297  "HLTIterativeTrackingDisplacedNRMuMuIter02",
298  "HLTIterativeTrackingForBTagIteration0",
299  "HLTIterativeTrackingIteration4DisplacedJets",
300  "HLTRegionalCKFTracksForL3Isolation",
301  "HLTHBHENoiseCleanerSequence",
302  )
303 
304 # Removing ESmodules
305  for label in ESModulesToRemove:
306  if (hasattr(process,label)):
307  delattr(process,label)
308 
309 # Removing paths
310  import fnmatch,re
311  ExplicitList = []
312  HLTSchedule = tuple( path.label_() for path in process.HLTSchedule)
313  for black in fastSimUnsupportedPaths:
314  compiled = re.compile(fnmatch.translate(black))
315  for path in HLTSchedule:
316  if compiled.search(path) is not None:
317  ExplicitList += [path]
318  UniqueList = []
319  for path in ExplicitList:
320  if path not in UniqueList:
321  UniqueList += [path]
322  for path in UniqueList:
323  process.schedule.remove(getattr(process,path))
324  process.setSchedule_(process.schedule)
325  process.prune()
326 
327 # Removing streams and datasets PSets
328  if hasattr(process,'streams'):
329  delattr(process,'streams')
330  if hasattr(process,'datasets'):
331  delattr(process,'datasets')
332 
333 # Removing sequences, possibly to be taken from fastsim import
334  for label in SequencesToRemove:
335  if hasattr(process,label):
336  if hasattr(fastsim,label):
337  setattr(process,label,getattr(fastsim,label))
338  else:
339  object = getattr(process,label)
340  list = tuple(process.sequences_().keys())
341  for name in list:
342  sequence = getattr(process,name)
343  more=True
344  while more:
345  more = sequence.remove(object)
346  list = tuple(process.paths_().keys())
347  for name in list:
348  path = getattr(process,name)
349  more=True
350  while more:
351  more = path.remove(object)
352  delattr(process,label)
353 
354 # Removing modules, possibly to be taken from fastsim import
355  for label in ModulesToRemove:
356  if hasattr(process,label):
357  if hasattr(fastsim,label):
358  setattr(process,label,getattr(fastsim,label))
359  else:
360  object = getattr(process,label)
361  list = tuple(process.sequences_().keys())
362  for name in list:
363  sequence = getattr(process,name)
364  more=True
365  while more:
366  more = sequence.remove(object)
367  list = tuple(process.paths_().keys())
368  for name in list:
369  path = getattr(process,name)
370  more=True
371  while more:
372  more = path.remove(object)
373  delattr(process,label)
374 
375 # Special transformations:
376  if hasattr(process,'hltGetConditions') and hasattr(process,'HLTriggerFirstPath'):
377  process.hltDummyConditions = cms.EDFilter( "HLTBool", result = cms.bool( True ) )
378  process.HLTriggerFirstPath.replace(process.hltGetConditions,process.hltDummyConditions)
379  if hasattr(process,'hltPixelVertices'):
380  process.hltPixelVertices.beamSpot = cms.InputTag('offlineBeamSpot')
381  specialModules = ( 'hltEcalRecHit', 'hltEcalPreshowerRecHit', )
382  for label in specialModules:
383  if hasattr(process,label):
384  setattr(fastsim,label,getattr(process,label))
385 
386 # Use fastsim imports
387  for label in fastsim.producers_().keys():
388  if hasattr(process,label):
389  setattr(process,label,getattr(fastsim,label))
390  for label in fastsim.filters_().keys():
391  if hasattr(process,label):
392  setattr(process,label,getattr(fastsim,label))
393  for label in fastsim.analyzers_().keys():
394  if hasattr(process,label):
395  setattr(process,label,getattr(fastsim,label))
396  for label in fastsim.sequences_().keys():
397  if hasattr(process,label):
398  setattr(process,label,getattr(fastsim,label))
399 
400 # Update InputTags
401 
402  InputTags = (
403  ('hltGtDigis','gtDigis'),
404  ('hltL1GtObjectMap','gtDigis'),
405  ('hltEcalDigis:ebDigis','ecalDigis:ebDigis'),
406  ('hltEcalDigis:eeDigis','ecalDigis:eeDigis'),
407  ('hltMuonCSCDigis','muonCSCDigis'),
408  ('hltMuonCSCDigis:MuonCSCStripDigi','muonCSCDigis:MuonCSCStripDigi'),
409  ('hltMuonCSCDigis:MuonCSCWireDigi','muonCSCDigis:MuonCSCWireDigi'),
410  ('hltMuonDTDigis','muonDTDigis'),
411  ('hltMuonRPCDigis','muonRPCDigis'),
412  ('hltEcalPreshowerDigis','ecalPreshowerDigis'),
413  ('hltHbhereco', 'hbhereco'),
414  ('hltHoreco', 'horeco'),
415  ('hltHfreco', 'hfreco'),
416 
417  ('hltIter2Merged', 'generalTracks'),
418  ('hltIter2HighPtMerged', 'generalTracks'),
419  ('hltIter2MergedForElectrons', 'generalTracks'),
420  ('hltIter2MergedForPhotons', 'generalTracks'),
421  ('hltIter2L3MuonMerged', 'generalTracks'),
422  ('hltIter2MergedForBTag', 'generalTracks'),
423  ('hltIter2MergedForTau', 'generalTracks'),
424  ('hltIter2GlbTrkMuonMerged', 'generalTracks'),
425  ('hltIter2HighPtTkMuMerged', 'generalTracks'),
426  ('hltIter2HighPtTkMuIsoMerged', 'generalTracks'),
427  ('hltIter2DisplacedJpsiMerged', 'generalTracks'),
428  ('hltIter2DisplacedPsiPrimeMerged', 'generalTracks'),
429  ('hltIter2DisplacedNRMuMuMerged', 'generalTracks'),
430  ('hltIter0PFlowTrackSelectionHighPurityForBTag', 'generalTracks'),
431  ('hltIter4HighPtMerged', 'generalTracks'),
432 
433  ('hltRegionalTracksForL3MuonIsolation', 'hltPixelTracks'),
434 
435  ('hltL1extraParticles','l1extraParticles'),
436  ('hltL1extraParticles:Central','l1extraParticles:Central'),
437  ('hltL1extraParticles:Forward','l1extraParticles:Forward'),
438  ('hltL1extraParticles:Isolated','l1extraParticles:Isolated'),
439  ('hltL1extraParticles:NonIsolated','l1extraParticles:NonIsolated'),
440  ('hltL1extraParticles:Tau','l1extraParticles:Tau'),
441  ('hltL1extraParticles:IsoTau','l1extraParticles:IsoTau'),
442  ('hltOfflineBeamSpot','offlineBeamSpot'),
443  ('hltOnlineBeamSpot','offlineBeamSpot'),
444  ('hltSiStripClusters','MeasurementTrackerEvent'),
445 
446  )
447  from HLTrigger.Configuration.CustomConfigs import MassReplaceInputTag
448  for pair in InputTags:
449  process = MassReplaceInputTag(process,pair[0],pair[1])
450 
451 # Update top-level named parameters
452  NamedParameters = (
453  ('GMTReadoutCollection',cms.InputTag('gtDigis'),cms.InputTag('gmtDigis')),
454  ('killDeadChannels',cms.bool(True),cms.bool(False)),
455  ('recoverEBFE',cms.bool(True),cms.bool(False)),
456  ('recoverEEFE',cms.bool(True),cms.bool(False)),
457  ('src',cms.InputTag('hltHcalTowerNoiseCleaner'),cms.InputTag('hltTowerMakerForAll')),
458  ('initialSeeds',cms.InputTag('noSeedsHere'),cms.InputTag('globalPixelSeeds')),
459  ('preFilteredSeeds',cms.bool(True),cms.bool(False)),
460  )
461  from HLTrigger.Configuration.CustomConfigs import MassReplaceParameter
462  for thrice in NamedParameters:
463  process = MassReplaceParameter(process,thrice[0],thrice[1],thrice[2])
464 
465 # Update nested named parameters
466  for label in ('hltEgammaElectronPixelSeeds','hltEgammaElectronPixelSeedsUnseeded',):
467  if hasattr(process,label):
468  getattr(process,label).SeedConfiguration.initialSeeds = cms.InputTag('globalPixelSeeds')
469  getattr(process,label).SeedConfiguration.preFilteredSeeds = cms.bool(False)
470  if hasattr(fastsim,'globalPixelSeeds'):
471  if hasattr(fastsim.globalPixelSeeds,'outputSeedCollectionName'):
472  getattr(process,label).SeedConfiguration.initialSeeds = cms.InputTag('globalPixelSeeds',fastsim.globalPixelSeeds.outputSeedCollectionName.value())
473 
474 
475 # Extending fastsim import
476  fastsim.extend(process)
477  fastsim.setSchedule_(fastsim.schedule)
478  fastsim.prune()
479 
480  return fastsim
481 
482  else:
483 
484  return process
def MassReplaceParameter