1 import FWCore.ParameterSet.Config
as cms
7 MergeMethodPtBrl =
'minPt',
8 MergeMethodPtFwd =
'minPt',
10 newGctSetting =
False,
13 """patch the process to run the RawToDigi and SimL1Emulator sequences instead of unpacking the hltGctDigis and hltGtDigis"""
16 HLTL1UnpackerSequence = cms.Sequence( process.RawToDigi + process.SimL1Emulator + process.hltL1GtObjectMap + process.hltL1extraParticles )
18 for iterable
in process.sequences.itervalues():
19 iterable.replace( process.HLTL1UnpackerSequence, HLTL1UnpackerSequence)
21 for iterable
in process.paths.itervalues():
22 iterable.replace( process.HLTL1UnpackerSequence, HLTL1UnpackerSequence)
24 for iterable
in process.endpaths.itervalues():
25 iterable.replace( process.HLTL1UnpackerSequence, HLTL1UnpackerSequence)
27 process.HLTL1UnpackerSequence = HLTL1UnpackerSequence
30 process.HLTL1GtDigisSequence = cms.Sequence( process.RawToDigi + process.SimL1Emulator )
32 for iterable
in process.sequences.itervalues():
33 iterable.replace( process.hltGtDigis, process.HLTL1GtDigisSequence)
35 for iterable
in process.paths.itervalues():
36 iterable.replace( process.hltGtDigis, process.HLTL1GtDigisSequence)
38 for iterable
in process.endpaths.itervalues():
39 iterable.replace( process.hltGtDigis, process.HLTL1GtDigisSequence)
43 process.load(
'L1TriggerConfig.GMTConfigProducers.L1MuGMTParameters_cfi')
46 process.L1MuGMTParameters.MergeMethodPtBrl = cms.string(MergeMethodPtBrl)
47 process.L1MuGMTParameters.MergeMethodPtFwd = cms.string(MergeMethodPtFwd)
49 process.L1MuGMTParameters.VersionSortRankEtaQLUT = cms.uint32(275)
53 process.csctfReEmulDigis = csctfDigisGMT.csctfDigis.clone()
54 process.csctfReEmulDigis.CSCTrackProducer = cms.untracked.InputTag(
"csctfReEmulTracks")
58 process.csctfReEmulTracks = csctfTrackDigis.csctfTrackDigis.clone()
59 process.csctfReEmulTracks.readDtDirect =
True
60 process.csctfReEmulTracks.SectorReceiverInput = cms.untracked.InputTag(
"csctfDigis")
61 process.csctfReEmulTracks.DtDirectProd = cms.untracked.InputTag(
"csctfDigis",
"DT")
62 process.csctfReEmulTracks.SectorProcessor.initializeFromPSet =
True
64 process.load(
"L1Trigger.RPCTrigger.rpcTriggerDigis_cfi")
65 process.rpcReEmulDigis = process.rpcTriggerDigis.clone()
67 process.load(
"L1Trigger.GlobalMuonTrigger.gmtDigis_cfi")
68 process.gmtReEmulDigis = process.gmtDigis.clone()
69 process.gmtReEmulDigis.DTCandidates = cms.InputTag(
"gtDigis",
"DT")
70 process.gmtReEmulDigis.RPCbCandidates = cms.InputTag(
"gtDigis",
"RPCb")
74 process.gmtReEmulDigis.CSCCandidates = cms.InputTag(
"csctfReEmulDigis",
"CSC")
76 process.gmtReEmulDigis.CSCCandidates = cms.InputTag(
"gtDigis",
"CSC")
78 process.gmtReEmulDigis.RPCfCandidates = cms.InputTag(
"gtDigis",
"RPCf")
79 process.gmtReEmulDigis.MipIsoData = cms.InputTag(
"none")
81 HLTL1MuonTriggerSequence = cms.Sequence( process.csctfReEmulTracks + process.csctfReEmulDigis + process.gmtReEmulDigis )
84 process.simGtDigis.GmtInputTag =
'gmtReEmulDigis'
85 process.HLTL1MuonTriggerSequence = HLTL1MuonTriggerSequence
86 process.HLTL1UnpackerSequence.replace( process.simGtDigis, process.HLTL1MuonTriggerSequence + process.simGtDigis)
90 process.load(
'SimCalorimetry.EcalTrigPrimProducers.ecalTriggerPrimitiveDigis_cff')
91 process.load(
'SimCalorimetry.HcalTrigPrimProducers.hcaltpdigi_cff')
95 process.ecalReEmulDigis = process.simEcalTriggerPrimitiveDigis.clone()
96 process.ecalReEmulDigis.Label =
'ecalDigis'
97 process.ecalReEmulDigis.InstanceEB =
'ebDigis'
98 process.ecalReEmulDigis.InstanceEE =
'eeDigis'
99 process.ecalReEmulDigis.BarrelOnly =
False
103 process.hcalReEmulDigis = process.simHcalTriggerPrimitiveDigis.clone()
104 process.hcalReEmulDigis.inputLabel = cms.VInputTag(cms.InputTag(
'hcalDigis'), cms.InputTag(
'hcalDigis'))
105 process.HcalTPGCoderULUT.LUTGenerationMode = cms.bool(
False)
109 process.rctReEmulDigis = L1Trigger.RegionalCaloTrigger.rctDigis_cfi.rctDigis.clone()
112 process.rctReEmulDigis.ecalDigis = cms.VInputTag( cms.InputTag(
'ecalReEmulDigis' ) )
114 process.rctReEmulDigis.ecalDigis = cms.VInputTag( cms.InputTag(
'ecalDigis:EcalTriggerPrimitives' ) )
117 process.rctReEmulDigis.hcalDigis = cms.VInputTag( cms.InputTag(
'hcalReEmulDigis' ) )
119 process.rctReEmulDigis.hcalDigis = cms.VInputTag( cms.InputTag(
'hcalDigis' ) )
123 process.gctReEmulDigis = L1Trigger.GlobalCaloTrigger.gctDigis_cfi.gctDigis.clone()
124 process.gctReEmulDigis.inputLabel =
'rctReEmulDigis'
126 if newECALLUTs
and newHCALLUTs:
127 HLTL1CaloTriggerSequence = cms.Sequence( process.ecalReEmulDigis + process.hcalReEmulDigis + process.rctReEmulDigis + process.gctReEmulDigis )
129 HLTL1CaloTriggerSequence = cms.Sequence( process.ecalReEmulDigis + process.rctReEmulDigis + process.gctReEmulDigis )
131 HLTL1CaloTriggerSequence = cms.Sequence( process.hcalReEmulDigis + process.rctReEmulDigis + process.gctReEmulDigis )
133 HLTL1CaloTriggerSequence = cms.Sequence( process.rctReEmulDigis + process.gctReEmulDigis )
136 process.simGtDigis.GctInputTag =
'gctReEmulDigis'
137 process.HLTL1CaloTriggerSequence = HLTL1CaloTriggerSequence
138 process.HLTL1UnpackerSequence.replace( process.simGtDigis, process.HLTL1CaloTriggerSequence + process.simGtDigis)
144 """patch the process to use custom GMT, GCT and GT results"""
147 if 'hltL1GtObjectMap' in process.__dict__:
148 process.hltL1GtObjectMap.GmtInputTag = cms.InputTag( customGmt )
149 process.hltL1GtObjectMap.GctInputTag = cms.InputTag( customGct )
150 if 'hltL1extraParticles' in process.__dict__:
151 process.hltL1extraParticles.muonSource = cms.InputTag( customGmt )
152 process.hltL1extraParticles.isolatedEmSource = cms.InputTag( customGct,
'isoEm' )
153 process.hltL1extraParticles.nonIsolatedEmSource = cms.InputTag( customGct,
'nonIsoEm' )
154 process.hltL1extraParticles.centralJetSource = cms.InputTag( customGct,
'cenJets' )
155 process.hltL1extraParticles.forwardJetSource = cms.InputTag( customGct,
'forJets' )
156 process.hltL1extraParticles.tauJetSource = cms.InputTag( customGct,
'tauJets' )
157 process.hltL1extraParticles.isoTauJetSource = cms.InputTag( customGct,
'isoTauJets' )
158 process.hltL1extraParticles.etTotalSource = cms.InputTag( customGct )
159 process.hltL1extraParticles.etHadSource = cms.InputTag( customGct )
160 process.hltL1extraParticles.etMissSource = cms.InputTag( customGct )
161 process.hltL1extraParticles.htMissSource = cms.InputTag( customGct )
162 process.hltL1extraParticles.hfRingEtSumsSource = cms.InputTag( customGct )
163 process.hltL1extraParticles.hfRingBitCountsSource = cms.InputTag( customGct )
164 if 'hltL2MuonSeeds' in process.__dict__:
165 process.hltL2MuonSeeds.GMTReadoutCollection = cms.InputTag( customGmt )
166 if 'hltL2CosmicMuonSeeds' in process.__dict__:
167 process.hltL2CosmicMuonSeeds.GMTReadoutCollection = cms.InputTag( customGmt )
170 for module
in process.__dict__.itervalues():
171 if isinstance(module, cms._Module):
172 for parameter
in module.__dict__.itervalues():
173 if isinstance(parameter, cms.InputTag):
174 if parameter.moduleLabel ==
'hltGtDigis':
175 parameter.moduleLabel = customGt
176 elif parameter.moduleLabel ==
'hltGctDigis':
177 parameter.moduleLabel = customGct
180 hasGtDigis =
'hltGtDigis' in process.producers
181 hasGctDigis =
'hltGctDigis' in process.producers
184 for iterable
in process.sequences.itervalues():
185 if hasGtDigis: iterable.remove( process.hltGtDigis )
186 if hasGctDigis: iterable.remove( process.hltGctDigis )
188 for iterable
in process.paths.itervalues():
189 if hasGtDigis: iterable.remove( process.hltGtDigis )
190 if hasGctDigis: iterable.remove( process.hltGctDigis )
192 for iterable
in process.endpaths.itervalues():
193 if hasGtDigis: iterable.remove( process.hltGtDigis )
194 if hasGctDigis: iterable.remove( process.hltGctDigis )
200 """patch the process to use newly emulated GT results"""
204 """patch the process to use newly emulated GMT, GCT and GT results"""
208 """patch the process to use newly emulated GMT, GCT and GT results"""
209 return switchToCustomL1Digis(process,
'gmtReEmulDigis',
'simCaloStage1LegacyFormatDigis',
'simGtDigis')
212 """patch the process to use gtDigis for GMT results, and newly emulated GCT and GT results"""
216 """patch the process to use gctDigis for GCT results, and newly emulated GMT and GT results"""
220 """patch the process to use newly emulated GMT, GCT and GT results starting from new Muon and Calo LUTs (eventually)"""
224 """patch the process to use newly emulated GMT and GT results starting from new Muon LUTs (eventually)"""
228 """patch the process to use newly emulated GCT and GT results starting from new Calo LUTs (eventually)"""
def switchToCustomL1Digis
def switchToSimGmtGctGtDigis
def switchToSimStage1Digis
def switchToSimGtReEmulGctDigis
def switchToSimGmtGtDigis
def switchToSimGtReEmulGmtGctDigis
def switchToSimGctGtDigis
def switchToSimGtReEmulGmtDigis