test
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
 

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(), and switchToSimGtReEmulGmtGctDigis().

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.etTotalSource = cms.InputTag( customGct )
159  process.hltL1extraParticles.etHadSource = cms.InputTag( customGct )
160  process.hltL1extraParticles.etMissSource = cms.InputTag( customGct )
161  if 'hltL2MuonSeeds' in process.__dict__:
162  process.hltL2MuonSeeds.GMTReadoutCollection = cms.InputTag( customGmt )
163 
164  # automatic replacements to use "simGtDigis" and "simGctDigis" instead of "hltGtDigis" or "hltGctDigis"
165  for module in process.__dict__.itervalues():
166  if isinstance(module, cms._Module):
167  for parameter in module.__dict__.itervalues():
168  if isinstance(parameter, cms.InputTag):
169  if parameter.moduleLabel == 'hltGtDigis':
170  parameter.moduleLabel = customGt
171  elif parameter.moduleLabel == 'hltGctDigis':
172  parameter.moduleLabel = customGct
173 
174  # check if "hltGtDigis" and "hltGctDigis" are defined
175  hasGtDigis = 'hltGtDigis' in process.producers
176  hasGctDigis = 'hltGctDigis' in process.producers
177 
178  # remove "hltGtDigis" and "hltGctDigis" from all paths, endpaths and sequences
179  for iterable in process.sequences.itervalues():
180  if hasGtDigis: iterable.remove( process.hltGtDigis )
181  if hasGctDigis: iterable.remove( process.hltGctDigis )
182 
183  for iterable in process.paths.itervalues():
184  if hasGtDigis: iterable.remove( process.hltGtDigis )
185  if hasGctDigis: iterable.remove( process.hltGctDigis )
186 
187  for iterable in process.endpaths.itervalues():
188  if hasGtDigis: iterable.remove( process.hltGtDigis )
189  if hasGctDigis: iterable.remove( process.hltGctDigis )
190 
191  return process
192 
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 201 of file customizeHLTforL1Emulator.py.

References switchToCustomL1Digis().

202 def switchToSimGctGtDigis(process):
203  """patch the process to use gtDigis for GMT results, and newly emulated GCT and GT results"""
204  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 197 of file customizeHLTforL1Emulator.py.

References switchToCustomL1Digis().

198 def switchToSimGmtGctGtDigis(process):
199  """patch the process to use newly emulated GMT, GCT and GT results"""
200  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 205 of file customizeHLTforL1Emulator.py.

References switchToCustomL1Digis().

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

Definition at line 193 of file customizeHLTforL1Emulator.py.

References switchToCustomL1Digis().

194 def switchToSimGtDigis(process):
195  """patch the process to use newly emulated GT results"""
196  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 217 of file customizeHLTforL1Emulator.py.

References switchToCustomL1Digis().

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

Definition at line 213 of file customizeHLTforL1Emulator.py.

References switchToCustomL1Digis().

214 def switchToSimGtReEmulGmtDigis(process):
215  """patch the process to use newly emulated GMT and GT results starting from new Muon LUTs (eventually)"""
216  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 209 of file customizeHLTforL1Emulator.py.

References switchToCustomL1Digis().

210 def switchToSimGtReEmulGmtGctDigis(process):
211  """patch the process to use newly emulated GMT, GCT and GT results starting from new Muon and Calo LUTs (eventually)"""
212  return switchToCustomL1Digis(process, 'gmtReEmulDigis', 'gctReEmulDigis', 'simGtDigis')