Skip to content

Commit

Permalink
Merge pull request #11583 from mark-grimes/fixRun2EraInFastSim
Browse files Browse the repository at this point in the history
Update Run 2 eras to configure FastSim properly
  • Loading branch information
cmsbuild committed Oct 5, 2015
2 parents 27d4094 + bf86a00 commit dff2f99
Showing 1 changed file with 25 additions and 15 deletions.
40 changes: 25 additions & 15 deletions FastSimulation/Configuration/python/L1Reco_cff.py
Expand Up @@ -9,23 +9,33 @@
modifyFastSimulationConfigurationL1RecoForStage1Trigger_ = eras.stage1L1Trigger.makeProcessModifier( _customiseForStage1 )

# some collections have different labels
l1extraParticles.isolatedEmSource = cms.InputTag("simGctDigis","isoEm")
l1extraParticles.nonIsolatedEmSource = cms.InputTag("simGctDigis","nonIsoEm")

l1extraParticles.centralJetSource = cms.InputTag("simGctDigis","cenJets")
l1extraParticles.tauJetSource = cms.InputTag("simGctDigis","tauJets")
l1extraParticles.isoTauJetSource = cms.InputTag("simGctDigis","isoTauJets")
l1extraParticles.forwardJetSource = cms.InputTag("simGctDigis","forJets")

def _changeLabelForFastSim( object ) :
"""
Takes an InputTag, changes the first letter of the module label to a capital
and adds "sim" in front, e.g. "gctDigid" -> "simGctDigis".
This works for both Run 1 and Run 2 collections.
"""
object.moduleLabel="sim"+object.moduleLabel[0].upper()+object.moduleLabel[1:]

_changeLabelForFastSim( l1extraParticles.isolatedEmSource )
_changeLabelForFastSim( l1extraParticles.nonIsolatedEmSource )

_changeLabelForFastSim( l1extraParticles.centralJetSource )
_changeLabelForFastSim( l1extraParticles.tauJetSource )
_changeLabelForFastSim( l1extraParticles.isoTauJetSource )
_changeLabelForFastSim( l1extraParticles.forwardJetSource )

_changeLabelForFastSim( l1extraParticles.etTotalSource )
_changeLabelForFastSim( l1extraParticles.etHadSource )
_changeLabelForFastSim( l1extraParticles.htMissSource )
_changeLabelForFastSim( l1extraParticles.etMissSource )

_changeLabelForFastSim( l1extraParticles.hfRingEtSumsSource )
_changeLabelForFastSim( l1extraParticles.hfRingBitCountsSource )

# This one is subtly different, but is the same for Run 1 and Run 2 FastSim
l1extraParticles.muonSource = cms.InputTag('simGmtDigis')

l1extraParticles.etTotalSource = cms.InputTag("simGctDigis")
l1extraParticles.etHadSource = cms.InputTag("simGctDigis")
l1extraParticles.htMissSource = cms.InputTag("simGctDigis")
l1extraParticles.etMissSource = cms.InputTag("simGctDigis")

l1extraParticles.hfRingEtSumsSource = cms.InputTag("simGctDigis")
l1extraParticles.hfRingBitCountsSource = cms.InputTag("simGctDigis")

# must be set to true when used in HLT, as is the case for FastSim
l1extraParticles.centralBxOnly = True
Expand Down

0 comments on commit dff2f99

Please sign in to comment.