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
 

Function Documentation

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

Definition at line 20 of file customizeHLTforL1Emulator.py.

Referenced by switchToSimGctGtDigis(), switchToSimGmtGctGtDigis(), switchToSimGmtGtDigis(), and switchToSimGtDigis().

20 
21 def switchToCustomL1Digis(process, customGmt, customGct, customGt):
22  """patch the process to use custom GMT, GCT and GT results"""
23 
24  # explicit replacements to use "simGtDigis", "simGmtDigis" and "simGctDigis" instead of "hltGtDigis" or "hltGctDigis"
25  if 'hltL1GtObjectMap' in process.__dict__:
26  process.hltL1GtObjectMap.GmtInputTag = cms.InputTag( customGmt )
27  process.hltL1GtObjectMap.GctInputTag = cms.InputTag( customGct )
28  if 'hltL1extraParticles' in process.__dict__:
29  process.hltL1extraParticles.muonSource = cms.InputTag( customGmt )
30  process.hltL1extraParticles.isolatedEmSource = cms.InputTag( customGct, 'isoEm' )
31  process.hltL1extraParticles.nonIsolatedEmSource = cms.InputTag( customGct, 'nonIsoEm' )
32  process.hltL1extraParticles.centralJetSource = cms.InputTag( customGct, 'cenJets' )
33  process.hltL1extraParticles.forwardJetSource = cms.InputTag( customGct, 'forJets' )
34  process.hltL1extraParticles.tauJetSource = cms.InputTag( customGct, 'tauJets' )
35  process.hltL1extraParticles.etTotalSource = cms.InputTag( customGct )
36  process.hltL1extraParticles.etHadSource = cms.InputTag( customGct )
37  process.hltL1extraParticles.etMissSource = cms.InputTag( customGct )
38  if 'hltL2MuonSeeds' in process.__dict__:
39  process.hltL2MuonSeeds.GMTReadoutCollection = cms.InputTag( customGmt )
40 
41  # automatic replacements to use "simGtDigis" and "simGctDigis" instead of "hltGtDigis" or "hltGctDigis"
42  for module in process.__dict__.itervalues():
43  if isinstance(module, cms._Parameterizable):
44  for parameter in module.__dict__.itervalues():
45  if isinstance(parameter, cms.InputTag):
46  if parameter.moduleLabel == 'hltGtDigis':
47  parameter.moduleLabel = customGt
48  elif parameter.moduleLabel == 'hltGctDigis':
49  parameter.moduleLabel = customGct
50 
51  # check if "hltGtDigis" and "hltGctDigis" are defined
52  hasGtDigis = 'hltGtDigis' in process.producers
53  hasGctDigis = 'hltGctDigis' in process.producers
54 
55  # remove "hltGtDigis" and "hltGctDigis" from all paths, endpaths and sequences
56  for iterable in process.sequences.itervalues():
57  if hasGtDigis: iterable.remove( process.hltGtDigis )
58  if hasGctDigis: iterable.remove( process.hltGctDigis )
59 
60  for iterable in process.paths.itervalues():
61  if hasGtDigis: iterable.remove( process.hltGtDigis )
62  if hasGctDigis: iterable.remove( process.hltGctDigis )
63 
64  for iterable in process.endpaths.itervalues():
65  if hasGtDigis: iterable.remove( process.hltGtDigis )
66  if hasGctDigis: iterable.remove( process.hltGctDigis )
67 
68  return process
69 
def customizeHLTforL1Emulator.switchToL1Emulator (   process)
patch the process to run the RawToDigi and SimL1Emulator sequences instead of unpacking the hltGctDigis and hltGtDigis

Definition at line 3 of file customizeHLTforL1Emulator.py.

3 
4 def switchToL1Emulator(process):
5  """patch the process to run the RawToDigi and SimL1Emulator sequences instead of unpacking the hltGctDigis and hltGtDigis"""
6  HLTL1UnpackerSequence = cms.Sequence( process.RawToDigi + process.SimL1Emulator + process.hltL1GtObjectMap + process.hltL1extraParticles )
7 
8  for iterable in process.sequences.itervalues():
9  iterable.replace( process.HLTL1UnpackerSequence, HLTL1UnpackerSequence)
10 
11  for iterable in process.paths.itervalues():
12  iterable.replace( process.HLTL1UnpackerSequence, HLTL1UnpackerSequence)
13 
14  for iterable in process.endpaths.itervalues():
15  iterable.replace( process.HLTL1UnpackerSequence, HLTL1UnpackerSequence)
16 
17  process.HLTL1UnpackerSequence = HLTL1UnpackerSequence
18 
19  return process
def customizeHLTforL1Emulator.switchToSimGctGtDigis (   process)
patch the process to use gtDigis for GMT results, and newly emulated GCT and GT results

Definition at line 80 of file customizeHLTforL1Emulator.py.

References switchToCustomL1Digis().

80 
81 def switchToSimGctGtDigis(process):
82  """patch the process to use gtDigis for GMT results, and newly emulated GCT and GT results"""
83  return switchToCustomL1Digis(process, 'gtDigis', 'simGctDigis', 'simGtDigis')
84 
def customizeHLTforL1Emulator.switchToSimGmtGctGtDigis (   process)
patch the process to use newly emulated GMT, GCT and GT results

Definition at line 75 of file customizeHLTforL1Emulator.py.

References switchToCustomL1Digis().

75 
76 def switchToSimGmtGctGtDigis(process):
77  """patch the process to use newly emulated GMT, GCT and GT results"""
78  return switchToCustomL1Digis(process, 'simGmtDigis', 'simGctDigis', 'simGtDigis')
79 
def customizeHLTforL1Emulator.switchToSimGmtGtDigis (   process)
patch the process to use gctDigis for GCT results, and newly emulated GMT and GT results

Definition at line 85 of file customizeHLTforL1Emulator.py.

References switchToCustomL1Digis().

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

Definition at line 70 of file customizeHLTforL1Emulator.py.

References switchToCustomL1Digis().

70 
71 def switchToSimGtDigis(process):
72  """patch the process to use newly emulated GMT, GCT and GT results"""
73  return switchToCustomL1Digis(process, 'gtDigis', 'gctDigis', 'simGtDigis')
74