CMS 3D CMS Logo

patchToRerunL1Emulator Namespace Reference


Functions

def switchToSimGtDigis


Function Documentation

def patchToRerunL1Emulator::switchToSimGtDigis (   process  ) 

patch the process to use 'sim*Digis' from the L1 emulator instead of 'hlt*Digis' from the RAW data

Definition at line 3 of file patchToRerunL1Emulator.py.

00003                                :
00004   """patch the process to use 'sim*Digis' from the L1 emulator instead of 'hlt*Digis' from the RAW data"""
00005 
00006   # explicit replacements to use "simGtDigis", "simGmtDigis" and "simGctDigis" instead of "hltGtDigis", "hltGmtDigis" or "hltGctDigis"
00007   process.hltL1GtObjectMap.GmtInputTag = Config.InputTag( 'simGmtDigis' )
00008   process.hltL1GtObjectMap.GctInputTag = Config.InputTag( 'simGctDigis' )
00009   process.hltL1extraParticles.muonSource = Config.InputTag( 'simGmtDigis' )
00010   process.hltL1extraParticles.isolatedEmSource = Config.InputTag( 'simGctDigis','isoEm' )
00011   process.hltL1extraParticles.nonIsolatedEmSource = Config.InputTag( 'simGctDigis','nonIsoEm' )
00012   process.hltL1extraParticles.centralJetSource = Config.InputTag( 'simGctDigis','cenJets' )
00013   process.hltL1extraParticles.forwardJetSource = Config.InputTag( 'simGctDigis','forJets' )
00014   process.hltL1extraParticles.tauJetSource = Config.InputTag( 'simGctDigis','tauJets' )
00015   process.hltL1extraParticles.etTotalSource = Config.InputTag( 'simGctDigis' )
00016   process.hltL1extraParticles.etHadSource = Config.InputTag( 'simGctDigis' )
00017   process.hltL1extraParticles.etMissSource = Config.InputTag( 'simGctDigis' )
00018   process.hltL2MuonSeeds.GMTReadoutCollection = Config.InputTag( 'simGmtDigis' )
00019 
00020   # automatic replacements to use "simGtDigis", "simGmtDigis" and "simGctDigis" instead of "hltGtDigis", "hltGmtDigis" or "hltGctDigis"
00021   for module in process.__dict__.itervalues():
00022     if isinstance(module, Mixins._Parameterizable):
00023       for parameter in module.__dict__.itervalues():
00024         if isinstance(parameter, Config.InputTag):
00025           if parameter.moduleLabel == 'hltGtDigis':
00026             parameter.moduleLabel = 'simGtDigis'
00027           elif parameter.moduleLabel == 'hltGmtDigis':
00028             parameter.moduleLabel = 'simGmtDigis'
00029           elif parameter.moduleLabel == 'hltGctDigis':
00030             parameter.moduleLabel = 'simGctDigis'
00031 
00032   # check if "hltGtDigis", "hltGmtDigis" and "hltGctDigis" are defined
00033   hasGtDigis  = 'hltGtDigis'  in process.producers
00034   hasGmtDigis = 'hltGmtDigis' in process.producers
00035   hasGctDigis = 'hltGctDigis' in process.producers
00036 
00037   # remove "hltGtDigis", "hltGmtDigis" and "hltGctDigis" from all paths, endpaths and sequences
00038   for iterable in process.sequences.itervalues():
00039     if hasGtDigis:  iterable.remove( process.hltGtDigis )
00040     if hasGmtDigis: iterable.remove( process.hltGmtDigis )
00041     if hasGctDigis: iterable.remove( process.hltGctDigis )
00042 
00043   for iterable in process.paths.itervalues():
00044     if hasGtDigis:  iterable.remove( process.hltGtDigis )
00045     if hasGmtDigis: iterable.remove( process.hltGmtDigis )
00046     if hasGctDigis: iterable.remove( process.hltGctDigis )
00047 
00048   for iterable in process.endpaths.itervalues():
00049     if hasGtDigis:  iterable.remove( process.hltGtDigis )
00050     if hasGmtDigis: iterable.remove( process.hltGmtDigis )
00051     if hasGctDigis: iterable.remove( process.hltGctDigis )
00052 


Generated on Tue Jun 9 18:49:58 2009 for CMSSW by  doxygen 1.5.4