CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
customizeHLTforL1Emulator Namespace Reference

Functions

def switchToCustomL1Digis
 
def switchToL1Emulator
 
def switchToSimGctGtDigis
 
def switchToSimGmtGctGtDigis
 
def switchToSimGmtGtDigis
 
def switchToSimGtDigis
 
def switchToSimGtReEmulGctDigis
 
def switchToSimGtReEmulGmtDigis
 
def switchToSimGtReEmulGmtGctDigis
 
def switchToSimStage1Digis
 

Function Documentation

def customizeHLTforL1Emulator.switchToCustomL1Digis (   process,
  customGmt,
  customGct,
  customGt 
)
patch the process to use custom GMT, GCT and GT results

Definition at line 143 of file customizeHLTforL1Emulator.py.

Referenced by switchToSimGctGtDigis(), switchToSimGmtGctGtDigis(), switchToSimGmtGtDigis(), switchToSimGtDigis(), switchToSimGtReEmulGctDigis(), switchToSimGtReEmulGmtDigis(), switchToSimGtReEmulGmtGctDigis(), and switchToSimStage1Digis().

144 def switchToCustomL1Digis(process, customGmt, customGct, customGt):
145  """patch the process to use custom GMT, GCT and GT results"""
146 
147  # explicit replacements to use "simGtDigis", "simGmtDigis" and "simGctDigis" instead of "hltGtDigis" or "hltGctDigis"
148  if 'hltL1GtObjectMap' in process.__dict__:
149  process.hltL1GtObjectMap.GmtInputTag = cms.InputTag( customGmt )
150  process.hltL1GtObjectMap.GctInputTag = cms.InputTag( customGct )
151  if 'hltL1extraParticles' in process.__dict__:
152  process.hltL1extraParticles.muonSource = cms.InputTag( customGmt )
153  process.hltL1extraParticles.isolatedEmSource = cms.InputTag( customGct, 'isoEm' )
154  process.hltL1extraParticles.nonIsolatedEmSource = cms.InputTag( customGct, 'nonIsoEm' )
155  process.hltL1extraParticles.centralJetSource = cms.InputTag( customGct, 'cenJets' )
156  process.hltL1extraParticles.forwardJetSource = cms.InputTag( customGct, 'forJets' )
157  process.hltL1extraParticles.tauJetSource = cms.InputTag( customGct, 'tauJets' )
158  process.hltL1extraParticles.isoTauJetSource = cms.InputTag( customGct, 'isoTauJets' )
159  process.hltL1extraParticles.etTotalSource = cms.InputTag( customGct )
160  process.hltL1extraParticles.etHadSource = cms.InputTag( customGct )
161  process.hltL1extraParticles.etMissSource = cms.InputTag( customGct )
162  process.hltL1extraParticles.htMissSource = cms.InputTag( customGct )
163  process.hltL1extraParticles.hfRingEtSumsSource = cms.InputTag( customGct )
164  process.hltL1extraParticles.hfRingBitCountsSource = cms.InputTag( customGct )
165  if 'hltL2MuonSeeds' in process.__dict__:
166  process.hltL2MuonSeeds.GMTReadoutCollection = cms.InputTag( customGmt )
167  if 'hltL2CosmicMuonSeeds' in process.__dict__:
168  process.hltL2CosmicMuonSeeds.GMTReadoutCollection = cms.InputTag( customGmt )
169 
170  # automatic replacements to use "simGtDigis" and "simGctDigis" instead of "hltGtDigis" or "hltGctDigis"
171  for module in process.__dict__.itervalues():
172  if isinstance(module, cms._Module):
173  for parameter in module.__dict__.itervalues():
174  if isinstance(parameter, cms.InputTag):
175  if parameter.moduleLabel == 'hltGtDigis':
176  parameter.moduleLabel = customGt
177  elif parameter.moduleLabel == 'hltGctDigis':
178  parameter.moduleLabel = customGct
179 
180  # check if "hltGtDigis" and "hltGctDigis" are defined
181  hasGtDigis = 'hltGtDigis' in process.producers
182  hasGctDigis = 'hltGctDigis' in process.producers
183 
184  # remove "hltGtDigis" and "hltGctDigis" from all paths, endpaths and sequences
185  for iterable in process.sequences.itervalues():
186  if hasGtDigis: iterable.remove( process.hltGtDigis )
187  if hasGctDigis: iterable.remove( process.hltGctDigis )
188 
189  for iterable in process.paths.itervalues():
190  if hasGtDigis: iterable.remove( process.hltGtDigis )
191  if hasGctDigis: iterable.remove( process.hltGctDigis )
192 
193  for iterable in process.endpaths.itervalues():
194  if hasGtDigis: iterable.remove( process.hltGtDigis )
195  if hasGctDigis: iterable.remove( process.hltGctDigis )
196 
197  return process
198 
def customizeHLTforL1Emulator.switchToL1Emulator (   process,
  newGmtSetting = False,
  MergeMethodPtBrl = 'minPt',
  MergeMethodPtFwd = 'minPt',
  newCSCTFLUTs = False,
  newGctSetting = False,
  newECALLUTs = False,
  newHCALLUTs = False 
)
patch the process to run the RawToDigi and SimL1Emulator sequences instead of unpacking the hltGctDigis and hltGtDigis

Definition at line 12 of file customizeHLTforL1Emulator.py.

12 
13  newHCALLUTs = False):
14  """patch the process to run the RawToDigi and SimL1Emulator sequences instead of unpacking the hltGctDigis and hltGtDigis"""
15 
16  # redefine the HLTL1UnpackerSequence
17  HLTL1UnpackerSequence = cms.Sequence( process.RawToDigi + process.SimL1Emulator + process.hltL1GtObjectMap + process.hltL1extraParticles )
18 
19  for iterable in process.sequences.itervalues():
20  iterable.replace( process.HLTL1UnpackerSequence, HLTL1UnpackerSequence)
21 
22  for iterable in process.paths.itervalues():
23  iterable.replace( process.HLTL1UnpackerSequence, HLTL1UnpackerSequence)
24 
25  for iterable in process.endpaths.itervalues():
26  iterable.replace( process.HLTL1UnpackerSequence, HLTL1UnpackerSequence)
27 
28  process.HLTL1UnpackerSequence = HLTL1UnpackerSequence
29 
30  # redefine the single hltGtDigis module, for paths that do not use the HLTL1UnpackerSequence
31  process.HLTL1GtDigisSequence = cms.Sequence( process.RawToDigi + process.SimL1Emulator )
32 
33  for iterable in process.sequences.itervalues():
34  iterable.replace( process.hltGtDigis, process.HLTL1GtDigisSequence)
35 
36  for iterable in process.paths.itervalues():
37  iterable.replace( process.hltGtDigis, process.HLTL1GtDigisSequence)
38 
39  for iterable in process.endpaths.itervalues():
40  iterable.replace( process.hltGtDigis, process.HLTL1GtDigisSequence)
41 
42  # GMT re-emulation
43  if newGmtSetting:
44  process.load('L1TriggerConfig.GMTConfigProducers.L1MuGMTParameters_cfi')
45 
46  # configure muon rank algo for GMT re-emulation
47  process.L1MuGMTParameters.MergeMethodPtBrl = cms.string(MergeMethodPtBrl)
48  process.L1MuGMTParameters.MergeMethodPtFwd = cms.string(MergeMethodPtFwd)
49 
50  process.L1MuGMTParameters.VersionSortRankEtaQLUT = cms.uint32(275)
51 
52  import L1Trigger.CSCTrackFinder.csctfDigis_cfi as csctfDigisGMT
53 
54  process.csctfReEmulDigis = csctfDigisGMT.csctfDigis.clone()
55  process.csctfReEmulDigis.CSCTrackProducer = cms.untracked.InputTag("csctfReEmulTracks")
56 
57  import L1Trigger.CSCTrackFinder.csctfTrackDigis_cfi as csctfTrackDigis
58 
59  process.csctfReEmulTracks = csctfTrackDigis.csctfTrackDigis.clone()
60  process.csctfReEmulTracks.readDtDirect = True
61  process.csctfReEmulTracks.SectorReceiverInput = cms.untracked.InputTag("csctfDigis")
62  process.csctfReEmulTracks.DtDirectProd = cms.untracked.InputTag("csctfDigis", "DT")
63  process.csctfReEmulTracks.SectorProcessor.initializeFromPSet = True
64 
65  process.load("L1Trigger.RPCTrigger.rpcTriggerDigis_cfi")
66  process.rpcReEmulDigis = process.rpcTriggerDigis.clone()
67 
68  process.load("L1Trigger.GlobalMuonTrigger.gmtDigis_cfi")
69  process.gmtReEmulDigis = process.gmtDigis.clone()
70  process.gmtReEmulDigis.DTCandidates = cms.InputTag("gtDigis","DT")
71  process.gmtReEmulDigis.RPCbCandidates = cms.InputTag("gtDigis","RPCb")
72 
73  # switch GMT input to use new re-emulated CSCTF input
74  if newCSCTFLUTs:
75  process.gmtReEmulDigis.CSCCandidates = cms.InputTag("csctfReEmulDigis","CSC")
76  else:
77  process.gmtReEmulDigis.CSCCandidates = cms.InputTag("gtDigis","CSC")
78 
79  process.gmtReEmulDigis.RPCfCandidates = cms.InputTag("gtDigis","RPCf")
80  process.gmtReEmulDigis.MipIsoData = cms.InputTag("none")
81 
82  HLTL1MuonTriggerSequence = cms.Sequence( process.csctfReEmulTracks + process.csctfReEmulDigis + process.gmtReEmulDigis )
83 
84  # configure GT re-emulation to use new re-emulated GMT input
85  process.simGtDigis.GmtInputTag = 'gmtReEmulDigis'
86  process.HLTL1MuonTriggerSequence = HLTL1MuonTriggerSequence
87  process.HLTL1UnpackerSequence.replace( process.simGtDigis, process.HLTL1MuonTriggerSequence + process.simGtDigis)
88 
89  # GCT re-emulation
90  if newGctSetting:
91  process.load('SimCalorimetry.EcalTrigPrimProducers.ecalTriggerPrimitiveDigis_cff')
92  process.load('SimCalorimetry.HcalTrigPrimProducers.hcaltpdigi_cff')
93 
94  # settings for using new ECAL LUTs
95  if newECALLUTs:
96  process.ecalReEmulDigis = process.simEcalTriggerPrimitiveDigis.clone()
97  process.ecalReEmulDigis.Label = 'ecalDigis'
98  process.ecalReEmulDigis.InstanceEB = 'ebDigis'
99  process.ecalReEmulDigis.InstanceEE = 'eeDigis'
100  process.ecalReEmulDigis.BarrelOnly = False
101 
102  # settings for using new HCAL LUTs
103  if newHCALLUTs:
104  process.hcalReEmulDigis = process.simHcalTriggerPrimitiveDigis.clone()
105  process.hcalReEmulDigis.inputLabel = cms.VInputTag(cms.InputTag('hcalDigis'), cms.InputTag('hcalDigis'))
106  process.HcalTPGCoderULUT.LUTGenerationMode = cms.bool(False)
107 
108  # configure RCT re-emulation
110  process.rctReEmulDigis = L1Trigger.RegionalCaloTrigger.rctDigis_cfi.rctDigis.clone()
111 
112  if newECALLUTs:
113  process.rctReEmulDigis.ecalDigis = cms.VInputTag( cms.InputTag( 'ecalReEmulDigis' ) )
114  else:
115  process.rctReEmulDigis.ecalDigis = cms.VInputTag( cms.InputTag( 'ecalDigis:EcalTriggerPrimitives' ) )
116 
117  if newHCALLUTs:
118  process.rctReEmulDigis.hcalDigis = cms.VInputTag( cms.InputTag( 'hcalReEmulDigis' ) )
119  else:
120  process.rctReEmulDigis.hcalDigis = cms.VInputTag( cms.InputTag( 'hcalDigis' ) )
121 
122  # configure GCT re-emulation
124  process.gctReEmulDigis = L1Trigger.GlobalCaloTrigger.gctDigis_cfi.gctDigis.clone()
125  process.gctReEmulDigis.inputLabel = 'rctReEmulDigis'
126 
127  if newECALLUTs and newHCALLUTs:
128  HLTL1CaloTriggerSequence = cms.Sequence( process.ecalReEmulDigis + process.hcalReEmulDigis + process.rctReEmulDigis + process.gctReEmulDigis )
129  elif newECALLUTs:
130  HLTL1CaloTriggerSequence = cms.Sequence( process.ecalReEmulDigis + process.rctReEmulDigis + process.gctReEmulDigis )
131  elif newHCALLUTs:
132  HLTL1CaloTriggerSequence = cms.Sequence( process.hcalReEmulDigis + process.rctReEmulDigis + process.gctReEmulDigis )
133  else:
134  HLTL1CaloTriggerSequence = cms.Sequence( process.rctReEmulDigis + process.gctReEmulDigis )
135 
136  # configure GT re-emulation to use new re-emulated GCT input
137  process.simGtDigis.GctInputTag = 'gctReEmulDigis'
138  process.HLTL1CaloTriggerSequence = HLTL1CaloTriggerSequence
139  process.HLTL1UnpackerSequence.replace( process.simGtDigis, process.HLTL1CaloTriggerSequence + process.simGtDigis)
140 
141  return process
142 
def customizeHLTforL1Emulator.switchToSimGctGtDigis (   process)
patch the process to use gtDigis for GMT results, and newly emulated GCT and GT results

Definition at line 211 of file customizeHLTforL1Emulator.py.

References switchToCustomL1Digis().

212 def switchToSimGctGtDigis(process):
213  """patch the process to use gtDigis for GMT results, and newly emulated GCT and GT results"""
214  return switchToCustomL1Digis(process, 'gtDigis', 'simGctDigis', 'simGtDigis')
def customizeHLTforL1Emulator.switchToSimGmtGctGtDigis (   process)
patch the process to use newly emulated GMT, GCT and GT results

Definition at line 203 of file customizeHLTforL1Emulator.py.

References switchToCustomL1Digis().

204 def switchToSimGmtGctGtDigis(process):
205  """patch the process to use newly emulated GMT, GCT and GT results"""
206  return switchToCustomL1Digis(process, 'simGmtDigis', 'simGctDigis', 'simGtDigis')
def customizeHLTforL1Emulator.switchToSimGmtGtDigis (   process)
patch the process to use gctDigis for GCT results, and newly emulated GMT and GT results

Definition at line 215 of file customizeHLTforL1Emulator.py.

References switchToCustomL1Digis().

216 def switchToSimGmtGtDigis(process):
217  """patch the process to use gctDigis for GCT results, and newly emulated GMT and GT results"""
218  return switchToCustomL1Digis(process, 'simGmtDigis', 'gctDigis', 'simGtDigis')
def customizeHLTforL1Emulator.switchToSimGtDigis (   process)
patch the process to use newly emulated GT results

Definition at line 199 of file customizeHLTforL1Emulator.py.

References switchToCustomL1Digis().

200 def switchToSimGtDigis(process):
201  """patch the process to use newly emulated GT results"""
202  return switchToCustomL1Digis(process, 'gtDigis', 'gctDigis', 'simGtDigis')
def customizeHLTforL1Emulator.switchToSimGtReEmulGctDigis (   process)
patch the process to use newly emulated GCT and GT results starting from new Calo LUTs (eventually)

Definition at line 227 of file customizeHLTforL1Emulator.py.

References switchToCustomL1Digis().

228 def switchToSimGtReEmulGctDigis(process):
229  """patch the process to use newly emulated GCT and GT results starting from new Calo LUTs (eventually)"""
230  return switchToCustomL1Digis(process, 'gtDigis', 'gctReEmulDigis', 'simGtDigis')
231 
def customizeHLTforL1Emulator.switchToSimGtReEmulGmtDigis (   process)
patch the process to use newly emulated GMT and GT results starting from new Muon LUTs (eventually)

Definition at line 223 of file customizeHLTforL1Emulator.py.

References switchToCustomL1Digis().

224 def switchToSimGtReEmulGmtDigis(process):
225  """patch the process to use newly emulated GMT and GT results starting from new Muon LUTs (eventually)"""
226  return switchToCustomL1Digis(process, 'gmtReEmulDigis', 'gctDigis', 'simGtDigis')
def customizeHLTforL1Emulator.switchToSimGtReEmulGmtGctDigis (   process)
patch the process to use newly emulated GMT, GCT and GT results starting from new Muon and Calo LUTs (eventually)

Definition at line 219 of file customizeHLTforL1Emulator.py.

References switchToCustomL1Digis().

220 def switchToSimGtReEmulGmtGctDigis(process):
221  """patch the process to use newly emulated GMT, GCT and GT results starting from new Muon and Calo LUTs (eventually)"""
222  return switchToCustomL1Digis(process, 'gmtReEmulDigis', 'gctReEmulDigis', 'simGtDigis')
def customizeHLTforL1Emulator.switchToSimStage1Digis (   process)
patch the process to use newly emulated GMT, GCT and GT results

Definition at line 207 of file customizeHLTforL1Emulator.py.

References switchToCustomL1Digis().

208 def switchToSimStage1Digis(process):
209  """patch the process to use newly emulated GMT, GCT and GT results"""
210  return switchToCustomL1Digis(process, 'gmtReEmulDigis', 'simCaloStage1LegacyFormatDigis', 'simGtDigis')