Skip to content

Commit

Permalink
customise the CombinedSecondaryVertexESProducer to read b-tagging cal…
Browse files Browse the repository at this point in the history
…ibrations with the "HLT" label
  • Loading branch information
fwyzard committed Oct 26, 2015
1 parent c43a59a commit eb202c2
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions HLTrigger/Configuration/python/customizeHLTforCMSSW.py
@@ -1,8 +1,11 @@
import FWCore.ParameterSet.Config as cms

# reusable functions
def producers_by_type(process, type):
return (module for module in process._Process__producers.values() if module._TypedParameterizable__type == type)
def producers_by_type(process, *types):
return (module for module in process._Process__producers.values() if module._TypedParameterizable__type in types)

def esproducers_by_type(process, *types):
return (module for module in process._Process__esproducers.values() if module._TypedParameterizable__type in types)


# Update to replace old jet corrector mechanism
Expand Down Expand Up @@ -193,6 +196,14 @@ def customiseFor12044(process):
return process


def customiseFor12062(process):
# add a label to indentify the b-tagging calibrations
for module in esproducers_by_type(process, 'CombinedSecondaryVertexESProducer'):
if not 'recordLabel' in module.__dict__:
module.recordLabel = cms.string('HLT')
return process


# CMSSW version specific customizations
def customiseHLTforCMSSW(process, menuType="GRun", fastSim=False):
import os
Expand All @@ -205,6 +216,7 @@ def customiseHLTforCMSSW(process, menuType="GRun", fastSim=False):
process = customiseFor11183(process)
process = customiseFor11497(process)
process = customiseFor12044(process)
process = customiseFor12062(process)
if cmsswVersion >= "CMSSW_7_5":
process = customiseFor10927(process)
process = customiseFor9232(process)
Expand Down

0 comments on commit eb202c2

Please sign in to comment.