From 5a4746fd65779d0dfd2e6e1f966f79fc0adce656 Mon Sep 17 00:00:00 2001 From: Jan-Frederik Schulte Date: Mon, 28 Nov 2016 09:08:24 -0500 Subject: [PATCH] make adaption of ClusterShapeHitFilterESProducer and SiPixelRawToDigi dynamic and move everythin into a single file --- .../python/customizeHLTPhaseIPixelGeom.py | 12 ------------ ...py => customizeHLTTrackingForPhaseI2017.py} | 18 +++++++++++------- 2 files changed, 11 insertions(+), 19 deletions(-) delete mode 100755 HLTrigger/Configuration/python/customizeHLTPhaseIPixelGeom.py rename HLTrigger/Configuration/python/{customizeHLTForPFTrackingPhaseI2017.py => customizeHLTTrackingForPhaseI2017.py} (95%) diff --git a/HLTrigger/Configuration/python/customizeHLTPhaseIPixelGeom.py b/HLTrigger/Configuration/python/customizeHLTPhaseIPixelGeom.py deleted file mode 100755 index 3b33f72ba47ba..0000000000000 --- a/HLTrigger/Configuration/python/customizeHLTPhaseIPixelGeom.py +++ /dev/null @@ -1,12 +0,0 @@ -import FWCore.ParameterSet.Config as cms - - -def customizeHLTPhaseIPixelGeom(process): - - process.ClusterShapeHitFilterESProducer.PixelShapeFile = 'RecoPixelVertexing/PixelLowPtUtilities/data/pixelShape_Phase1TkNewFPix.par' - process.hltSiPixelDigis.UsePhase1 = cms.bool( True ) - process.hltSiPixelDigisRegForBTag.UsePhase1 = cms.bool( True ) - process.hltSiPixelDigisReg.UsePhase1 = cms.bool( True ) - - - return process diff --git a/HLTrigger/Configuration/python/customizeHLTForPFTrackingPhaseI2017.py b/HLTrigger/Configuration/python/customizeHLTTrackingForPhaseI2017.py similarity index 95% rename from HLTrigger/Configuration/python/customizeHLTForPFTrackingPhaseI2017.py rename to HLTrigger/Configuration/python/customizeHLTTrackingForPhaseI2017.py index 326a221fcefa4..e32c02f92cc54 100755 --- a/HLTrigger/Configuration/python/customizeHLTForPFTrackingPhaseI2017.py +++ b/HLTrigger/Configuration/python/customizeHLTTrackingForPhaseI2017.py @@ -3,16 +3,20 @@ def producers_by_type(process, *types): return (module for module in process._Process__producers.values() if module._TypedParameterizable__type in types) - -def customizeHLTForPFTrackingPhaseI2017(process): - +def esproducers_by_type(process, *types): + return (module for module in process._Process__esproducers.values() if module._TypedParameterizable__type in types) - process.ClusterShapeHitFilterESProducer.PixelShapeFile = 'RecoPixelVertexing/PixelLowPtUtilities/data/pixelShape_Phase1TkNewFPix.par' - process.hltSiPixelDigis.UsePhase1 = cms.bool( True ) - process.hltSiPixelDigisRegForBTag.UsePhase1 = cms.bool( True ) - process.hltSiPixelDigisReg.UsePhase1 = cms.bool( True ) +def customizeHLTPhaseIPixelGeom(process): + for esproducer in esproducers_by_type(process,"ClusterShapeHitFilterESProducer"): + esproducer.PixelShapeFile = 'RecoPixelVertexing/PixelLowPtUtilities/data/pixelShape_Phase1TkNewFPix.par' + for producer in producers_by_type(process,"SiPixelRawToDigi"): + if "hlt" in producer.label(): + producer.UsePhase1 = cms.bool( True ) + return process + +def customizeHLTForPFTrackingPhaseI2017(process): process.hltPixelLayerTriplets.layerList = cms.vstring( 'BPix1+BPix2+BPix3', 'BPix2+BPix3+BPix4',