Skip to content

Commit

Permalink
fix HLT customisations to run on 2018 data (SCAL digis for beamspot, …
Browse files Browse the repository at this point in the history
…pixel-local-reco paramenters)
  • Loading branch information
missirol committed Sep 14, 2023
1 parent 87dd7f8 commit a3857ce
Showing 1 changed file with 31 additions and 12 deletions.
43 changes: 31 additions & 12 deletions HLTrigger/Configuration/python/customizeHLTforCMSSW.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,17 +112,17 @@ def customisePixelGainForRun2Input(process):
"""
# revert the Pixel parameters to be compatible with the Run 2 conditions
for producer in producers_by_type(process, "SiPixelClusterProducer"):
producer.VCaltoElectronGain = 47
producer.VCaltoElectronGain_L1 = 50
producer.VCaltoElectronOffset = -60
producer.VCaltoElectronGain = 47
producer.VCaltoElectronGain_L1 = 50
producer.VCaltoElectronOffset = -60
producer.VCaltoElectronOffset_L1 = -670

for producer in producers_by_type(process, "SiPixelRawToClusterCUDA"):
producer.VCaltoElectronGain = cms.double(1.)
producer.VCaltoElectronGain_L1 = cms.double(1.)
producer.VCaltoElectronOffset = cms.double(0.)
producer.VCaltoElectronOffset_L1 = cms.double(0.)
producer.isRun2 = True
for pluginType in ["SiPixelRawToClusterCUDA", "SiPixelRawToClusterCUDAPhase1", "SiPixelRawToClusterCUDAHIonPhase1"]:
for producer in producers_by_type(process, pluginType):
producer.VCaltoElectronGain = 47
producer.VCaltoElectronGain_L1 = 50
producer.VCaltoElectronOffset = -60
producer.VCaltoElectronOffset_L1 = -670

return process

Expand All @@ -131,9 +131,10 @@ def customisePixelL1ClusterThresholdForRun2Input(process):
for producer in producers_by_type(process, "SiPixelClusterProducer"):
if hasattr(producer,"ClusterThreshold_L1"):
producer.ClusterThreshold_L1 = 2000
for producer in producers_by_type(process, "SiPixelRawToClusterCUDA"):
if hasattr(producer,"clusterThreshold_layer1"):
producer.clusterThreshold_layer1 = 2000
for pluginType in ["SiPixelRawToClusterCUDA", "SiPixelRawToClusterCUDAPhase1", "SiPixelRawToClusterCUDAHIonPhase1"]:
for producer in producers_by_type(process, pluginType):
if hasattr(producer,"clusterThreshold_layer1"):
producer.clusterThreshold_layer1 = 2000
for producer in producers_by_type(process, "SiPixelDigisClustersFromSoA"):
if hasattr(producer,"clusterThreshold_layer1"):
producer.clusterThreshold_layer1 = 2000
Expand Down Expand Up @@ -167,6 +168,24 @@ def customiseBeamSpotFor2018Input(process):
for espLabel in onlineBeamSpotESPLabels:
delattr(process, espLabel)

# re-introduce SCAL digis, if missing
if not hasattr(process, 'hltScalersRawToDigi') and hasattr(process, 'HLTBeamSpot') and isinstance(process.HLTBeamSpot, cms.Sequence):

if hasattr(process, 'hltOnlineBeamSpot'):
process.hltOnlineBeamSpot.src = 'hltScalersRawToDigi'

if hasattr(process, 'hltPixelTrackerHVOn'):
process.hltPixelTrackerHVOn.DcsStatusLabel = 'hltScalersRawToDigi'

if hasattr(process, 'hltStripTrackerHVOn'):
process.hltStripTrackerHVOn.DcsStatusLabel = 'hltScalersRawToDigi'

process.hltScalersRawToDigi = cms.EDProducer( "ScalersRawToDigi",
scalersInputTag = cms.InputTag( "rawDataCollector" )
)

process.HLTBeamSpot.insert(0, process.hltScalersRawToDigi)

return process

def customiseECALCalibrationsFor2018Input(process):
Expand Down

0 comments on commit a3857ce

Please sign in to comment.