CMS 3D CMS Logo

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.

00144                                                                   :
00145   """patch the process to use custom GMT, GCT and GT results"""
00146 
00147   # explicit replacements to use "simGtDigis", "simGmtDigis" and "simGctDigis" instead of "hltGtDigis" or "hltGctDigis"
00148   if 'hltL1GtObjectMap' in process.__dict__:
00149     process.hltL1GtObjectMap.GmtInputTag = cms.InputTag( customGmt )
00150     process.hltL1GtObjectMap.GctInputTag = cms.InputTag( customGct )
00151   if 'hltL1extraParticles' in process.__dict__:
00152     process.hltL1extraParticles.muonSource          = cms.InputTag( customGmt )
00153     process.hltL1extraParticles.isolatedEmSource    = cms.InputTag( customGct, 'isoEm' )
00154     process.hltL1extraParticles.nonIsolatedEmSource = cms.InputTag( customGct, 'nonIsoEm' )
00155     process.hltL1extraParticles.centralJetSource    = cms.InputTag( customGct, 'cenJets' )
00156     process.hltL1extraParticles.forwardJetSource    = cms.InputTag( customGct, 'forJets' )
00157     process.hltL1extraParticles.tauJetSource        = cms.InputTag( customGct, 'tauJets' )
00158     process.hltL1extraParticles.etTotalSource       = cms.InputTag( customGct )
00159     process.hltL1extraParticles.etHadSource         = cms.InputTag( customGct )
00160     process.hltL1extraParticles.etMissSource        = cms.InputTag( customGct )
00161   if 'hltL2MuonSeeds' in process.__dict__:
00162     process.hltL2MuonSeeds.GMTReadoutCollection = cms.InputTag( customGmt )
00163 
00164   # automatic replacements to use "simGtDigis" and "simGctDigis" instead of "hltGtDigis" or "hltGctDigis"
00165   for module in process.__dict__.itervalues():
00166     if isinstance(module, cms._Module):
00167       for parameter in module.__dict__.itervalues():
00168         if isinstance(parameter, cms.InputTag):
00169           if parameter.moduleLabel == 'hltGtDigis':
00170             parameter.moduleLabel = customGt
00171           elif parameter.moduleLabel == 'hltGctDigis':
00172             parameter.moduleLabel = customGct
00173 
00174   # check if "hltGtDigis" and "hltGctDigis" are defined
00175   hasGtDigis  = 'hltGtDigis'  in process.producers
00176   hasGctDigis = 'hltGctDigis' in process.producers
00177 
00178   # remove "hltGtDigis" and "hltGctDigis" from all paths, endpaths and sequences
00179   for iterable in process.sequences.itervalues():
00180     if hasGtDigis:  iterable.remove( process.hltGtDigis )
00181     if hasGctDigis: iterable.remove( process.hltGctDigis )
00182 
00183   for iterable in process.paths.itervalues():
00184     if hasGtDigis:  iterable.remove( process.hltGtDigis )
00185     if hasGctDigis: iterable.remove( process.hltGctDigis )
00186 
00187   for iterable in process.endpaths.itervalues():
00188     if hasGtDigis:  iterable.remove( process.hltGtDigis )
00189     if hasGctDigis: iterable.remove( process.hltGctDigis )
00190 
00191   return process
00192 

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 4 of file customizeHLTforL1Emulator.py.

00013                            :
00014   """patch the process to run the RawToDigi and SimL1Emulator sequences instead of unpacking the hltGctDigis and hltGtDigis"""
00015 
00016   # redefine the HLTL1UnpackerSequence
00017   HLTL1UnpackerSequence = cms.Sequence( process.RawToDigi + process.SimL1Emulator + process.hltL1GtObjectMap + process.hltL1extraParticles )
00018 
00019   for iterable in process.sequences.itervalues():
00020       iterable.replace( process.HLTL1UnpackerSequence, HLTL1UnpackerSequence)
00021 
00022   for iterable in process.paths.itervalues():
00023       iterable.replace( process.HLTL1UnpackerSequence, HLTL1UnpackerSequence)
00024 
00025   for iterable in process.endpaths.itervalues():
00026       iterable.replace( process.HLTL1UnpackerSequence, HLTL1UnpackerSequence)
00027 
00028   process.HLTL1UnpackerSequence = HLTL1UnpackerSequence
00029 
00030   # redefine the single hltGtDigis module, for paths that do not use the HLTL1UnpackerSequence
00031   process.HLTL1GtDigisSequence = cms.Sequence( process.RawToDigi + process.SimL1Emulator )
00032 
00033   for iterable in process.sequences.itervalues():
00034       iterable.replace( process.hltGtDigis, process.HLTL1GtDigisSequence)
00035 
00036   for iterable in process.paths.itervalues():
00037       iterable.replace( process.hltGtDigis, process.HLTL1GtDigisSequence)
00038 
00039   for iterable in process.endpaths.itervalues():
00040       iterable.replace( process.hltGtDigis, process.HLTL1GtDigisSequence)
00041 
00042   # GMT re-emulation
00043   if newGmtSetting:
00044     process.load('L1TriggerConfig.GMTConfigProducers.L1MuGMTParameters_cfi')
00045 
00046     # configure muon rank algo for GMT re-emulation
00047     process.L1MuGMTParameters.MergeMethodPtBrl = cms.string(MergeMethodPtBrl)
00048     process.L1MuGMTParameters.MergeMethodPtFwd = cms.string(MergeMethodPtFwd)
00049 
00050     process.L1MuGMTParameters.VersionSortRankEtaQLUT = cms.uint32(275)
00051 
00052     import L1Trigger.CSCTrackFinder.csctfDigis_cfi as csctfDigisGMT
00053 
00054     process.csctfReEmulDigis =  csctfDigisGMT.csctfDigis.clone()
00055     process.csctfReEmulDigis.CSCTrackProducer = cms.untracked.InputTag("csctfReEmulTracks")
00056 
00057     import L1Trigger.CSCTrackFinder.csctfTrackDigis_cfi as csctfTrackDigis
00058 
00059     process.csctfReEmulTracks = csctfTrackDigis.csctfTrackDigis.clone()
00060     process.csctfReEmulTracks.readDtDirect                       = True
00061     process.csctfReEmulTracks.SectorReceiverInput                = cms.untracked.InputTag("csctfDigis")
00062     process.csctfReEmulTracks.DtDirectProd                       = cms.untracked.InputTag("csctfDigis", "DT")
00063     process.csctfReEmulTracks.SectorProcessor.initializeFromPSet = True
00064 
00065     process.load("L1Trigger.RPCTrigger.rpcTriggerDigis_cfi")
00066     process.rpcReEmulDigis = process.rpcTriggerDigis.clone()
00067 
00068     process.load("L1Trigger.GlobalMuonTrigger.gmtDigis_cfi")
00069     process.gmtReEmulDigis = process.gmtDigis.clone()
00070     process.gmtReEmulDigis.DTCandidates = cms.InputTag("gtDigis","DT")
00071     process.gmtReEmulDigis.RPCbCandidates = cms.InputTag("gtDigis","RPCb")
00072 
00073     # switch GMT input to use new re-emulated CSCTF input
00074     if newCSCTFLUTs:
00075       process.gmtReEmulDigis.CSCCandidates = cms.InputTag("csctfReEmulDigis","CSC")
00076     else:
00077       process.gmtReEmulDigis.CSCCandidates = cms.InputTag("gtDigis","CSC")
00078 
00079     process.gmtReEmulDigis.RPCfCandidates = cms.InputTag("gtDigis","RPCf")
00080     process.gmtReEmulDigis.MipIsoData = cms.InputTag("none")
00081 
00082     HLTL1MuonTriggerSequence = cms.Sequence( process.csctfReEmulTracks + process.csctfReEmulDigis + process.gmtReEmulDigis )
00083 
00084     # configure GT re-emulation to use new re-emulated GMT input
00085     process.simGtDigis.GmtInputTag = 'gmtReEmulDigis'
00086     process.HLTL1MuonTriggerSequence = HLTL1MuonTriggerSequence
00087     process.HLTL1UnpackerSequence.replace( process.simGtDigis, process.HLTL1MuonTriggerSequence + process.simGtDigis)
00088 
00089   # GCT re-emulation
00090   if newGctSetting:
00091     process.load('SimCalorimetry.EcalTrigPrimProducers.ecalTriggerPrimitiveDigis_cff')
00092     process.load('SimCalorimetry.HcalTrigPrimProducers.hcaltpdigi_cff')
00093 
00094     # settings for using new ECAL LUTs
00095     if newECALLUTs:
00096       process.ecalReEmulDigis = process.simEcalTriggerPrimitiveDigis.clone()
00097       process.ecalReEmulDigis.Label = 'ecalDigis'
00098       process.ecalReEmulDigis.InstanceEB = 'ebDigis'
00099       process.ecalReEmulDigis.InstanceEE = 'eeDigis'
00100       process.ecalReEmulDigis.BarrelOnly = False
00101 
00102     # settings for using new HCAL LUTs
00103     if newHCALLUTs:
00104       process.hcalReEmulDigis = process.simHcalTriggerPrimitiveDigis.clone()
00105       process.hcalReEmulDigis.inputLabel = cms.VInputTag(cms.InputTag('hcalDigis'), cms.InputTag('hcalDigis'))
00106       process.HcalTPGCoderULUT.LUTGenerationMode = cms.bool(False)
00107 
00108     # configure RCT re-emulation
00109     import L1Trigger.RegionalCaloTrigger.rctDigis_cfi
00110     process.rctReEmulDigis = L1Trigger.RegionalCaloTrigger.rctDigis_cfi.rctDigis.clone()
00111 
00112     if newECALLUTs:
00113       process.rctReEmulDigis.ecalDigis = cms.VInputTag( cms.InputTag( 'ecalReEmulDigis' ) )
00114     else:
00115       process.rctReEmulDigis.ecalDigis = cms.VInputTag( cms.InputTag( 'ecalDigis:EcalTriggerPrimitives' ) )
00116 
00117     if newHCALLUTs:
00118       process.rctReEmulDigis.hcalDigis = cms.VInputTag( cms.InputTag( 'hcalReEmulDigis' ) )
00119     else:
00120       process.rctReEmulDigis.hcalDigis = cms.VInputTag( cms.InputTag( 'hcalDigis' ) )
00121 
00122     # configure GCT re-emulation
00123     import L1Trigger.GlobalCaloTrigger.gctDigis_cfi
00124     process.gctReEmulDigis = L1Trigger.GlobalCaloTrigger.gctDigis_cfi.gctDigis.clone()
00125     process.gctReEmulDigis.inputLabel = 'rctReEmulDigis'
00126 
00127     if newECALLUTs and newHCALLUTs:
00128       HLTL1CaloTriggerSequence = cms.Sequence( process.ecalReEmulDigis + process.hcalReEmulDigis + process.rctReEmulDigis + process.gctReEmulDigis )
00129     elif newECALLUTs:
00130       HLTL1CaloTriggerSequence = cms.Sequence( process.ecalReEmulDigis + process.rctReEmulDigis + process.gctReEmulDigis )
00131     elif newHCALLUTs:
00132       HLTL1CaloTriggerSequence = cms.Sequence( process.hcalReEmulDigis + process.rctReEmulDigis + process.gctReEmulDigis )
00133     else:
00134       HLTL1CaloTriggerSequence = cms.Sequence( process.rctReEmulDigis + process.gctReEmulDigis )
00135 
00136     # configure GT re-emulation to use new re-emulated GCT input
00137     process.simGtDigis.GctInputTag = 'gctReEmulDigis'
00138     process.HLTL1CaloTriggerSequence = HLTL1CaloTriggerSequence
00139     process.HLTL1UnpackerSequence.replace( process.simGtDigis, process.HLTL1CaloTriggerSequence + process.simGtDigis)
00140 
00141   return process
00142 

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.

00202                                   :
00203   """patch the process to use gtDigis for GMT results, and newly emulated GCT and GT results"""
00204   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.

00198                                      :
00199   """patch the process to use newly emulated GMT, GCT and GT results"""
00200   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.

00206                                   :
00207   """patch the process to use gctDigis for GCT results, and newly emulated GMT and GT results"""
00208   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.

00194                                :
00195   """patch the process to use newly emulated GT results"""
00196   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.

00218                                         :
00219   """patch the process to use newly emulated GCT and GT results starting from new Calo LUTs (eventually)"""
00220   return switchToCustomL1Digis(process, 'gtDigis', 'gctReEmulDigis', 'simGtDigis')
00221 
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.

00214                                         :
00215   """patch the process to use newly emulated GMT and GT results starting from new Muon LUTs (eventually)"""
00216   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.

00210                                            :
00211   """patch the process to use newly emulated GMT, GCT and GT results starting from new Muon and Calo LUTs (eventually)"""
00212   return switchToCustomL1Digis(process, 'gmtReEmulDigis', 'gctReEmulDigis', 'simGtDigis')