From 5e84df5e409278a86de2494f4a179dd394792405 Mon Sep 17 00:00:00 2001 From: mmusich Date: Tue, 14 Mar 2023 16:39:06 +0100 Subject: [PATCH 1/2] loose dependency on SCAL data in BeamSpotOnlineProducer if ES arbitration is active --- .../python/HLT_75e33/modules/hltOnlineBeamSpot_cfi.py | 8 +++++++- .../BeamSpotProducer/plugins/BeamSpotOnlineProducer.cc | 5 +++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/hltOnlineBeamSpot_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/hltOnlineBeamSpot_cfi.py index 86487e3b6d746..d1ed14060378e 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/modules/hltOnlineBeamSpot_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/modules/hltOnlineBeamSpot_cfi.py @@ -1,3 +1,9 @@ import FWCore.ParameterSet.Config as cms -hltOnlineBeamSpot = cms.EDProducer("BeamSpotProducer") +hltOnlineBeamSpot = cms.EDProducer("BeamSpotOnlineProducer", + useTransientRecord = cms.bool(True), + changeToCMSCoordinates = cms.bool(False), + gtEvmLabel = cms.InputTag(""), + maxRadius = cms.double(2.0), + maxZ = cms.double(40.0), + setSigmaZ = cms.double(0.0)) diff --git a/RecoVertex/BeamSpotProducer/plugins/BeamSpotOnlineProducer.cc b/RecoVertex/BeamSpotProducer/plugins/BeamSpotOnlineProducer.cc index dbfddf0305934..83aa832cfa5f2 100644 --- a/RecoVertex/BeamSpotProducer/plugins/BeamSpotOnlineProducer.cc +++ b/RecoVertex/BeamSpotProducer/plugins/BeamSpotOnlineProducer.cc @@ -62,7 +62,8 @@ BeamSpotOnlineProducer::BeamSpotOnlineProducer(const ParameterSet& iconf) theMaxZ(iconf.getParameter("maxZ")), theSetSigmaZ(iconf.getParameter("setSigmaZ")), useTransientRecord_(iconf.getParameter("useTransientRecord")), - scalerToken_(consumes(iconf.getParameter("src"))), + scalerToken_(useTransientRecord_ ? edm::EDGetTokenT() + : consumes(iconf.getParameter("src"))), l1GtEvmReadoutRecordToken_(consumes(iconf.getParameter("gtEvmLabel"))), beamToken_(esConsumes()), beamTransientToken_(esConsumes()), @@ -79,7 +80,7 @@ void BeamSpotOnlineProducer::fillDescriptions(edm::ConfigurationDescriptions& iD ps.add("maxZ", 40.); ps.add("setSigmaZ", -1.); ps.addUntracked("beamMode", 11); - ps.add("src", InputTag("hltScalersRawToDigi")); + ps.addOptional("src", InputTag("hltScalersRawToDigi"))->setComment("SCAL decommissioned after Run 2"); ps.add("gtEvmLabel", InputTag("")); ps.add("maxRadius", 2.0); ps.add("useTransientRecord", false); From de56fce9cc078d24270949dcf4ec62319844c756 Mon Sep 17 00:00:00 2001 From: mmusich Date: Mon, 27 Mar 2023 12:19:27 +0200 Subject: [PATCH 2/2] supply OnlineBeamSpotESProducer into the HLT_75e33 menu --- .../eventsetup/hltOnlineBeamSpotESProducer_cfi.py | 7 +++++++ HLTrigger/Configuration/python/HLT_75e33_cff.py | 1 + 2 files changed, 8 insertions(+) create mode 100644 HLTrigger/Configuration/python/HLT_75e33/eventsetup/hltOnlineBeamSpotESProducer_cfi.py diff --git a/HLTrigger/Configuration/python/HLT_75e33/eventsetup/hltOnlineBeamSpotESProducer_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/eventsetup/hltOnlineBeamSpotESProducer_cfi.py new file mode 100644 index 0000000000000..3227f366783f1 --- /dev/null +++ b/HLTrigger/Configuration/python/HLT_75e33/eventsetup/hltOnlineBeamSpotESProducer_cfi.py @@ -0,0 +1,7 @@ +import FWCore.ParameterSet.Config as cms + +hltOnlineBeamSpotESProducer = cms.ESProducer("OnlineBeamSpotESProducer", + timeThreshold = cms.int32( 48 ), + sigmaZThreshold = cms.double( 2.0 ), + sigmaXYThreshold = cms.double( 4.0 ) +) diff --git a/HLTrigger/Configuration/python/HLT_75e33_cff.py b/HLTrigger/Configuration/python/HLT_75e33_cff.py index 50b8f19c1f294..9b0f8ede763c3 100644 --- a/HLTrigger/Configuration/python/HLT_75e33_cff.py +++ b/HLTrigger/Configuration/python/HLT_75e33_cff.py @@ -55,6 +55,7 @@ fragment.load("HLTrigger/Configuration/HLT_75e33/eventsetup/muonSeededTrajectoryCleanerBySharedHits_cfi") ### Mostly comes from HLT-like configuration, not RECO-like configuration +fragment.load("HLTrigger/Configuration/HLT_75e33/eventsetup/hltOnlineBeamSpotESProducer_cfi") fragment.load("HLTrigger/Configuration/HLT_75e33/eventsetup/hltESPBwdElectronPropagator_cfi") fragment.load("HLTrigger/Configuration/HLT_75e33/eventsetup/hltESPChi2ChargeMeasurementEstimator2000_cfi") fragment.load("HLTrigger/Configuration/HLT_75e33/eventsetup/hltESPChi2ChargeMeasurementEstimator30_cfi")