From 96972d3645ebb1e07d77ce307e829181102ed2b8 Mon Sep 17 00:00:00 2001 From: Christopher Jones Date: Tue, 8 Aug 2023 16:45:01 -0500 Subject: [PATCH 1/3] Moved creating SiPixelTemplateStore from DB to an ESProducer All DB construction was switched to using EventSetup. Cases using reading from files were kept local to module. The new ESProducer was added as a Task to all needed Sequences. --- .../python/tools/trackselectionRefitting.py | 6 ++ .../python/TkAlAllInOneTool/JetHT_cfg.py | 7 +- .../python/TkAlAllInOneTool/SplitV_cfg.py | 5 +- .../test/DiMuonVertexValidation_cfg.py | 4 +- .../test/eopTreeWriter_cfg.py | 4 +- .../src/SiPixelLorentzAnglePCLWorker.cc | 14 ++-- ...omptCalibProdSiPixelLorentzAngleMCS_cff.py | 4 +- ...OPromptCalibProdSiPixelLorentzAngle_cff.py | 4 +- ...ARECOPromptCalibProdSiStripGainsAAG_cff.py | 6 +- .../ALCARECOSiPixelCalSingleMuonTight_cff.py | 4 +- .../src/T_EventSetup_SiPixelTemplateStore.cc | 19 +++++ .../SiPixelPhase1OfflineDQM_source_cff.py | 5 +- .../SiPixelPhase1OnlineDQM_Timing_cff.py | 11 ++- .../python/SiPixelPhase1OnlineDQM_cff.py | 9 ++- .../plugins/SiPixelPhase1TrackClusters.cc | 13 ++- .../python/SiPixel_OfflineMonitoring_cff.py | 4 +- .../python/SiStrip_OfflineMonitoring_cff.py | 1 + .../python/Reconstruction_BefMix_cff.py | 4 +- .../interface/PixelTemplateSmearerBase.h | 8 +- .../interface/TrackingRecHitAlgorithm.h | 2 +- .../plugins/TrackingRecHitProducer.cc | 15 ++-- .../src/PixelTemplateSmearerBase.cc | 8 +- .../src/TrackingRecHitAlgorithm.cc | 2 +- .../python/customizeHLTforCMSSW.py | 8 ++ .../python/HighPtTracking_PbPb_cff.py | 2 + .../interface/PixelCPEClusterRepair.h | 4 +- .../interface/PixelCPETemplateReco.h | 4 +- .../SiPixelRecHits/plugins/BuildFile.xml | 1 + .../PixelCPEClusterRepairESProducer.cc | 3 + .../plugins/PixelCPETemplateRecoESProducer.cc | 3 + .../plugins/SiPixelTemplateStoreESProducer.cc | 80 +++++++++++++++++++ .../src/PixelCPEClusterRepair.cc | 17 ++-- .../src/PixelCPETemplateReco.cc | 15 ++-- .../python/MergeTrackCollections_cff.py | 4 +- .../python/cosmicDC_cff.py | 3 +- .../TrackProducer/test/refitFromAOD.py | 5 +- .../TrackProducer/test/refitFromMINIAOD.py | 3 +- .../python/TTRHBuilders_cff.py | 1 + 38 files changed, 232 insertions(+), 80 deletions(-) create mode 100644 CondFormats/SiPixelTransient/src/T_EventSetup_SiPixelTemplateStore.cc create mode 100644 RecoLocalTracker/SiPixelRecHits/plugins/SiPixelTemplateStoreESProducer.cc diff --git a/Alignment/CommonAlignment/python/tools/trackselectionRefitting.py b/Alignment/CommonAlignment/python/tools/trackselectionRefitting.py index 948f56d12aee0..57ccd748e2c18 100644 --- a/Alignment/CommonAlignment/python/tools/trackselectionRefitting.py +++ b/Alignment/CommonAlignment/python/tools/trackselectionRefitting.py @@ -391,6 +391,10 @@ def getSequence(process, collection, modules.append(getattr(process, src)) moduleSum = process.offlineBeamSpot # first element of the sequence + tasks = [] + if usePixelQualityFlag: + process.load("RecoLocalTracker.SiPixelRecHits.SiPixelTemplateStoreESProducer_cfi") + tasks =[process.SiPixelTemplateStoreESProducer] if g4Refitting: # g4Refitter needs measurements moduleSum += getattr(process,"MeasurementTrackerEvent") @@ -421,6 +425,8 @@ def getSequence(process, collection, moduleSum += module # append the other modules + if tasks: + return cms.Sequence(moduleSum, cms.Task(*tasks)) return cms.Sequence(moduleSum) ############################### diff --git a/Alignment/OfflineValidation/python/TkAlAllInOneTool/JetHT_cfg.py b/Alignment/OfflineValidation/python/TkAlAllInOneTool/JetHT_cfg.py index 6984e04e5a8b6..669d3b28a4dd1 100644 --- a/Alignment/OfflineValidation/python/TkAlAllInOneTool/JetHT_cfg.py +++ b/Alignment/OfflineValidation/python/TkAlAllInOneTool/JetHT_cfg.py @@ -289,16 +289,19 @@ ) +process.load("RecoLocalTracker.SiPixelRecHits.SiPixelTemplateStoreESProducer_cfi") if (triggerFilter == "nothing" or triggerFilter == ""): process.p = cms.Path(process.offlineBeamSpot + process.TrackRefitter + process.offlinePrimaryVerticesFromRefittedTrks + - process.jetHTAnalyzer) + process.jetHTAnalyzer, + cms.Task(process.SiPixelTemplateStoreESProducer)) else: process.p = cms.Path(process.HLTFilter + process.offlineBeamSpot + process.TrackRefitter + process.offlinePrimaryVerticesFromRefittedTrks + - process.jetHTAnalyzer) + process.jetHTAnalyzer, + cms.Task(process.SiPixelTemplateStoreESProducer)) diff --git a/Alignment/OfflineValidation/python/TkAlAllInOneTool/SplitV_cfg.py b/Alignment/OfflineValidation/python/TkAlAllInOneTool/SplitV_cfg.py index 6ff3e9878f363..342db62706218 100644 --- a/Alignment/OfflineValidation/python/TkAlAllInOneTool/SplitV_cfg.py +++ b/Alignment/OfflineValidation/python/TkAlAllInOneTool/SplitV_cfg.py @@ -196,10 +196,13 @@ ) print("Saving the output at %s" % process.TFileService.fileName.value()) + +process.load("RecoLocalTracker.SiPixelRecHits.SiPixelTemplateStoreESProducer_cfi") process.theValidSequence = cms.Sequence(process.offlineBeamSpot + process.TrackRefitter + process.offlinePrimaryVerticesFromRefittedTrks + - process.PrimaryVertexResolution) + process.PrimaryVertexResolution, + cms.Task(process.SiPixelTemplateStoreESProducer)) HLTSel = config["validation"].get("HLTselection", False) diff --git a/Alignment/OfflineValidation/test/DiMuonVertexValidation_cfg.py b/Alignment/OfflineValidation/test/DiMuonVertexValidation_cfg.py index db6378f119b13..1002ff4f9dc71 100644 --- a/Alignment/OfflineValidation/test/DiMuonVertexValidation_cfg.py +++ b/Alignment/OfflineValidation/test/DiMuonVertexValidation_cfg.py @@ -228,10 +228,12 @@ def best_match(rcd): #################################################################### # Sequence #################################################################### +process.load("RecoLocalTracker.SiPixelRecHits.SiPixelTemplateStoreESProducer_cfi") process.seqTrackselRefit = cms.Sequence(process.offlineBeamSpot* # in case NavigatioSchool is set !='' #process.MeasurementTrackerEvent* - process.TrackRefitter) + process.TrackRefitter, + cms.Task(process.SiPixelTemplateStoreESProducer)) #################################################################### # Re-do vertices diff --git a/Alignment/OfflineValidation/test/eopTreeWriter_cfg.py b/Alignment/OfflineValidation/test/eopTreeWriter_cfg.py index f1e925443543c..f560948a59c8d 100644 --- a/Alignment/OfflineValidation/test/eopTreeWriter_cfg.py +++ b/Alignment/OfflineValidation/test/eopTreeWriter_cfg.py @@ -150,8 +150,10 @@ #################################################################### # Path #################################################################### +process.load("RecoLocalTracker.SiPixelRecHits.SiPixelTemplateStoreESProducer_cfi") process.p = cms.Path(process.MeasurementTrackerEvent* process.offlineBeamSpot* process.AlignmentTrackSelector* process.TrackRefitter* - process.energyOverMomentumTree) + process.energyOverMomentumTree, + cms.Task(process.SiPixelTemplateStoreESProducer)) diff --git a/CalibTracker/SiPixelLorentzAngle/src/SiPixelLorentzAnglePCLWorker.cc b/CalibTracker/SiPixelLorentzAngle/src/SiPixelLorentzAnglePCLWorker.cc index a6d5bc0329e39..732ec0febc758 100644 --- a/CalibTracker/SiPixelLorentzAngle/src/SiPixelLorentzAnglePCLWorker.cc +++ b/CalibTracker/SiPixelLorentzAngle/src/SiPixelLorentzAnglePCLWorker.cc @@ -128,7 +128,7 @@ class SiPixelLorentzAnglePCLWorker : public DQMEDAnalyzer { // template stuff edm::ESWatcher watchSiPixelTemplateRcd_; const SiPixelTemplateDBObject* templateDBobject_; - std::vector thePixelTemp_; + const std::vector* thePixelTemp_ = nullptr; LorentzAngleAnalysisTypeEnum analysisType_; std::string folder_; @@ -195,6 +195,7 @@ class SiPixelLorentzAnglePCLWorker : public DQMEDAnalyzer { edm::ESGetToken geomEsToken_; edm::ESGetToken topoEsToken_; edm::ESGetToken siPixelTemplateEsToken_; + edm::ESGetToken, SiPixelTemplateDBObjectESProducerRcd> siPixelTemplateStoreEsToken_; edm::ESGetToken topoPerEventEsToken_; edm::ESGetToken geomPerEventEsToken_; edm::ESGetToken magneticFieldToken_; @@ -223,6 +224,7 @@ SiPixelLorentzAnglePCLWorker::SiPixelLorentzAnglePCLWorker(const edm::ParameterS geomEsToken_(esConsumes()), topoEsToken_(esConsumes()), siPixelTemplateEsToken_(esConsumes()), + siPixelTemplateStoreEsToken_(esConsumes()), topoPerEventEsToken_(esConsumes()), geomPerEventEsToken_(esConsumes()), magneticFieldToken_(esConsumes()) { @@ -467,7 +469,7 @@ void SiPixelLorentzAnglePCLWorker::analyze(edm::Event const& iEvent, edm::EventS if (notInPCL_) { // fill the template from the store (from dqmBeginRun) - SiPixelTemplate theTemplate(thePixelTemp_); + SiPixelTemplate theTemplate(*thePixelTemp_); float locBx = (cotbeta < 0.) ? -1 : 1.; float locBz = (cotalpha < 0.) ? -locBx : locBx; @@ -639,7 +641,7 @@ void SiPixelLorentzAnglePCLWorker::analyze(edm::Event const& iEvent, edm::EventS if (notInPCL_) { // fill the template from the store (from dqmBeginRun) - SiPixelTemplate theTemplate(thePixelTemp_); + SiPixelTemplate theTemplate(*thePixelTemp_); float locBx = (cotbeta < 0.) ? -1 : 1.; float locBz = (cotalpha < 0.) ? -locBx : locBx; @@ -730,11 +732,7 @@ void SiPixelLorentzAnglePCLWorker::dqmBeginRun(edm::Run const& run, edm::EventSe // Initialize 1D templates if (watchSiPixelTemplateRcd_.check(iSetup)) { templateDBobject_ = &iSetup.getData(siPixelTemplateEsToken_); - if (!SiPixelTemplate::pushfile(*templateDBobject_, thePixelTemp_)) { - edm::LogError("SiPixelLorentzAnglePCLWorker") - << "Templates not filled correctly. Check the sqlite file. Using SiPixelTemplateDBObject version " - << (*templateDBobject_).version(); - } + thePixelTemp_ = &iSetup.getData(siPixelTemplateStoreEsToken_); } } diff --git a/Calibration/TkAlCaRecoProducers/python/ALCARECOPromptCalibProdSiPixelLorentzAngleMCS_cff.py b/Calibration/TkAlCaRecoProducers/python/ALCARECOPromptCalibProdSiPixelLorentzAngleMCS_cff.py index a03ef70f2e36d..9a0358f88c3af 100644 --- a/Calibration/TkAlCaRecoProducers/python/ALCARECOPromptCalibProdSiPixelLorentzAngleMCS_cff.py +++ b/Calibration/TkAlCaRecoProducers/python/ALCARECOPromptCalibProdSiPixelLorentzAngleMCS_cff.py @@ -26,6 +26,7 @@ from RecoTracker.Configuration.RecoTrackerP5_cff import * from RecoTracker.TrackProducer.TrackRefitter_cfi import * from TrackingTools.TransientTrack.TransientTrackBuilder_cfi import * +from RecoLocalTracker.SiPixelRecHits.SiPixelTemplateStoreESProducer_cfi import * ALCARECOPixelLACalibrationTracksRefitMCS = TrackRefitter.clone(src = "ALCARECOPixelLACalibrationTracksMCS", TrajectoryInEvent = True, @@ -65,5 +66,6 @@ ALCARECOCalCosmicsFilterForSiPixelLorentzAngleMCS * ALCARECOPixelLATrackFilterRefitMCS * ALCARECOSiPixelLACalibMCS * - MEtoEDMConvertSiPixelLorentzAngleMCS + MEtoEDMConvertSiPixelLorentzAngleMCS, + cms.Task(SiPixelTemplateStoreESProducer) ) diff --git a/Calibration/TkAlCaRecoProducers/python/ALCARECOPromptCalibProdSiPixelLorentzAngle_cff.py b/Calibration/TkAlCaRecoProducers/python/ALCARECOPromptCalibProdSiPixelLorentzAngle_cff.py index d7de69d618d6d..7fbb485038ee6 100644 --- a/Calibration/TkAlCaRecoProducers/python/ALCARECOPromptCalibProdSiPixelLorentzAngle_cff.py +++ b/Calibration/TkAlCaRecoProducers/python/ALCARECOPromptCalibProdSiPixelLorentzAngle_cff.py @@ -62,9 +62,11 @@ ) # The actual sequence +from RecoLocalTracker.SiPixelRecHits.SiPixelTemplateStoreESProducer_cfi import * seqALCARECOPromptCalibProdSiPixelLorentzAngle = cms.Sequence( ALCARECOCalSignleMuonFilterForSiPixelLorentzAngle * ALCARECOPixelLATrackFilterRefit * ALCARECOSiPixelLACalib * - MEtoEDMConvertSiPixelLorentzAngle + MEtoEDMConvertSiPixelLorentzAngle, + cms.Task(SiPixelTemplateStoreESProducer) ) diff --git a/Calibration/TkAlCaRecoProducers/python/ALCARECOPromptCalibProdSiStripGainsAAG_cff.py b/Calibration/TkAlCaRecoProducers/python/ALCARECOPromptCalibProdSiStripGainsAAG_cff.py index 9dde4ff8f48f7..cf2d4c0223d2d 100644 --- a/Calibration/TkAlCaRecoProducers/python/ALCARECOPromptCalibProdSiStripGainsAAG_cff.py +++ b/Calibration/TkAlCaRecoProducers/python/ALCARECOPromptCalibProdSiStripGainsAAG_cff.py @@ -63,10 +63,12 @@ ) # refit and BS can be dropped if done together with RECO. -# track filter can be moved in acalreco if no otehr users +# track filter can be moved in acalreco if no other users +from RecoLocalTracker.SiPixelRecHits.SiPixelTemplateStoreESProducer_cfi import SiPixelTemplateStoreESProducer ALCARECOTrackFilterRefitAAG = cms.Sequence(ALCARECOCalibrationTracksAAG + offlineBeamSpot + - ALCARECOCalibrationTracksRefitAAG ) + ALCARECOCalibrationTracksRefitAAG, + cms.Task(SiPixelTemplateStoreESProducer) ) # ------------------------------------------------------------------------------ # This is the module actually doing the calibration diff --git a/Calibration/TkAlCaRecoProducers/python/ALCARECOSiPixelCalSingleMuonTight_cff.py b/Calibration/TkAlCaRecoProducers/python/ALCARECOSiPixelCalSingleMuonTight_cff.py index 88e76099e8a53..72f37bf57bb0c 100644 --- a/Calibration/TkAlCaRecoProducers/python/ALCARECOSiPixelCalSingleMuonTight_cff.py +++ b/Calibration/TkAlCaRecoProducers/python/ALCARECOSiPixelCalSingleMuonTight_cff.py @@ -76,8 +76,10 @@ ################################################################## # Sequence: track refit + close-by-pixel producer ################################################################## +from RecoLocalTracker.SiPixelRecHits.SiPixelTemplateStoreESProducer_cfi import SiPixelTemplateStoreESProducer ALCARECOSiPixelCalSingleMuonTightOffTrackClusters = cms.Sequence(ALCARECOSiPixelCalSingleMuonTightTracksRefit + - closebyPixelClusters) + closebyPixelClusters , + cms.Task(SiPixelTemplateStoreESProducer)) ################################################################## # Producer of distances value map diff --git a/CondFormats/SiPixelTransient/src/T_EventSetup_SiPixelTemplateStore.cc b/CondFormats/SiPixelTransient/src/T_EventSetup_SiPixelTemplateStore.cc new file mode 100644 index 0000000000000..8c6b40d07fa1a --- /dev/null +++ b/CondFormats/SiPixelTransient/src/T_EventSetup_SiPixelTemplateStore.cc @@ -0,0 +1,19 @@ +// -*- C++ -*- +// +// Package: CondFormats/SiPixelTransient +// Class : T_EventSetup_SiPixelTemplateStore +// +// Implementation: +// [Notes on implementation] +// +// Original Author: Christopher Jones +// Created: Tue, 08 Aug 2023 15:33:48 GMT +// + +// system include files + +// user include files +#include "CondFormats/SiPixelTransient/interface/SiPixelTemplate.h" +#include "FWCore/Utilities/interface/typelookup.h" + +TYPELOOKUP_DATA_REG(std::vector); diff --git a/DQM/SiPixelPhase1Config/python/SiPixelPhase1OfflineDQM_source_cff.py b/DQM/SiPixelPhase1Config/python/SiPixelPhase1OfflineDQM_source_cff.py index a2e0da8bddb68..982bcde17f748 100644 --- a/DQM/SiPixelPhase1Config/python/SiPixelPhase1OfflineDQM_source_cff.py +++ b/DQM/SiPixelPhase1Config/python/SiPixelPhase1OfflineDQM_source_cff.py @@ -14,6 +14,7 @@ from DQM.SiPixelPhase1Track.SiPixelPhase1ResidualsExtra_cfi import * # Clusters ontrack/offtrack (also general tracks) from DQM.SiPixelPhase1Track.SiPixelPhase1TrackClusters_cfi import * +from RecoLocalTracker.SiPixelRecHits.SiPixelTemplateStoreESProducer_cfi import * # Hit Efficiencies from DQM.SiPixelPhase1Track.SiPixelPhase1TrackEfficiency_cfi import * # FED/RAW Data @@ -24,7 +25,6 @@ from DQM.SiPixelPhase1Summary.SiPixelBarycenter_cfi import * - from RecoPixelVertexing.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import * from RecoLocalTracker.SiStripClusterizer.SiStripClusterChargeCut_cfi import * from DQM.SiPixelPhase1Track.SiPixelPhase1EfficiencyExtras_cfi import * @@ -39,7 +39,8 @@ + SiPixelPhase1RecHitsAnalyzer + SiPixelPhase1TrackResidualsAnalyzer + SiPixelPhase1TrackClustersAnalyzer - + SiPixelPhase1TrackEfficiencyAnalyzer + + SiPixelPhase1TrackEfficiencyAnalyzer, + cms.Task(SiPixelTemplateStoreESProducer) ) diff --git a/DQM/SiPixelPhase1Config/python/SiPixelPhase1OnlineDQM_Timing_cff.py b/DQM/SiPixelPhase1Config/python/SiPixelPhase1OnlineDQM_Timing_cff.py index ff64e24c45200..e268b8062f012 100644 --- a/DQM/SiPixelPhase1Config/python/SiPixelPhase1OnlineDQM_Timing_cff.py +++ b/DQM/SiPixelPhase1Config/python/SiPixelPhase1OnlineDQM_Timing_cff.py @@ -97,12 +97,12 @@ # Cluster (track-independent) monitoring from DQM.SiPixelPhase1Common.SiPixelPhase1Clusters_cfi import * +from RecoLocalTracker.SiPixelRecHits.SiPixelTemplateStoreESProducer_cfi import * # Track cluster from DQM.SiPixelPhase1Track.SiPixelPhase1TrackClusters_cfi import * from DQM.SiPixelPhase1Track.SiPixelPhase1TrackResiduals_cfi import * - # Raw data errors from DQM.SiPixelPhase1Common.SiPixelPhase1RawData_cfi import * @@ -115,7 +115,8 @@ + SiPixelPhase1ClustersAnalyzer + SiPixelPhase1RawDataAnalyzer + SiPixelPhase1TrackClustersAnalyzer - + SiPixelPhase1TrackResidualsAnalyzer + + SiPixelPhase1TrackResidualsAnalyzer, + cms.Task(SiPixelTemplateStoreESProducer) ) siPixelPhase1OnlineDQM_harvesting = cms.Sequence( @@ -149,7 +150,8 @@ + SiPixelPhase1ClustersAnalyzer + SiPixelPhase1RawDataAnalyzer + SiPixelPhase1TrackClustersAnalyzer_cosmics - + SiPixelPhase1TrackResidualsAnalyzer_cosmics + + SiPixelPhase1TrackResidualsAnalyzer_cosmics, + cms.Task(SiPixelTemplateStoreESProducer) ) ## Additional settings for pp_run (Phase 0 test) @@ -177,6 +179,7 @@ + SiPixelPhase1RawDataAnalyzer + SiPixelPhase1TrackClustersAnalyzer_pprun + SiPixelPhase1TrackResidualsAnalyzer_pprun - + SiPixelPhase1TrackEfficiencyAnalyzer_pprun + + SiPixelPhase1TrackEfficiencyAnalyzer_pprun, + cms.Task(SiPixelTemplateStoreESProducer) ) diff --git a/DQM/SiPixelPhase1Config/python/SiPixelPhase1OnlineDQM_cff.py b/DQM/SiPixelPhase1Config/python/SiPixelPhase1OnlineDQM_cff.py index 48a54228082a7..5e9cc8a6a9a3b 100644 --- a/DQM/SiPixelPhase1Config/python/SiPixelPhase1OnlineDQM_cff.py +++ b/DQM/SiPixelPhase1Config/python/SiPixelPhase1OnlineDQM_cff.py @@ -70,6 +70,8 @@ # Track cluster from DQM.SiPixelPhase1Track.SiPixelPhase1TrackClusters_cfi import * +from RecoLocalTracker.SiPixelRecHits.SiPixelTemplateStoreESProducer_cfi import * + SiPixelPhase1TrackClustersOnTrackCorrCharge.enabled=cms.bool(False) SiPixelPhase1TrackTemplateCorr.enabled=cms.bool(False) SiPixelPhase1TrackClustersOnTrackCorrChargeOuter.enabled=cms.bool(False) @@ -86,6 +88,7 @@ + SiPixelPhase1TrackClustersAnalyzer + SiPixelPhase1TrackResidualsAnalyzer # + SiPixelPhase1GeometryDebugAnalyzer + , cms.Task(SiPixelTemplateStoreESProducer) ) siPixelPhase1OnlineDQM_harvesting = cms.Sequence( @@ -119,7 +122,8 @@ + SiPixelPhase1ClustersAnalyzer + SiPixelPhase1RawDataAnalyzer + SiPixelPhase1TrackClustersAnalyzer_cosmics - + SiPixelPhase1TrackResidualsAnalyzer_cosmics + + SiPixelPhase1TrackResidualsAnalyzer_cosmics, + cms.Task(SiPixelTemplateStoreESProducer) ) ## Additional settings for pp_run @@ -142,7 +146,8 @@ + SiPixelPhase1ClustersAnalyzer + SiPixelPhase1RawDataAnalyzer + SiPixelPhase1TrackClustersAnalyzer_pprun - + SiPixelPhase1TrackResidualsAnalyzer_pprun + + SiPixelPhase1TrackResidualsAnalyzer_pprun, + cms.Task(SiPixelTemplateStoreESProducer) ) siPixelPhase1OnlineDQM_timing_harvesting = siPixelPhase1OnlineDQM_harvesting.copyAndExclude([ diff --git a/DQM/SiPixelPhase1Track/plugins/SiPixelPhase1TrackClusters.cc b/DQM/SiPixelPhase1Track/plugins/SiPixelPhase1TrackClusters.cc index 4f57ba4617981..4ecd002bb7863 100644 --- a/DQM/SiPixelPhase1Track/plugins/SiPixelPhase1TrackClusters.cc +++ b/DQM/SiPixelPhase1Track/plugins/SiPixelPhase1TrackClusters.cc @@ -88,8 +88,8 @@ namespace { private: const bool applyVertexCut_; - const SiPixelTemplateDBObject* templateDBobject_; - std::vector thePixelTemp_; + const SiPixelTemplateDBObject* templateDBobject_ = nullptr; + const std::vector* thePixelTemp_ = nullptr; const TrackerTopology* tkTpl = nullptr; edm::EDGetTokenT tracksToken_; @@ -101,6 +101,7 @@ namespace { edm::ESGetToken clusterShapeHitFilterToken_; edm::ESGetToken templateDBobjectToken_; + edm::ESGetToken, SiPixelTemplateDBObjectESProducerRcd> templateStoreToken_; }; SiPixelPhase1TrackClusters::SiPixelPhase1TrackClusters(const edm::ParameterSet& iConfig) @@ -118,6 +119,7 @@ namespace { trackerGeomToken_ = esConsumes(); clusterShapeHitFilterToken_ = esConsumes(edm::ESInputTag("", "ClusterShapeHitFilter")); + templateStoreToken_ = esConsumes(); templateDBobjectToken_ = esConsumes(); } @@ -127,10 +129,7 @@ namespace { // Initialize 1D templates templateDBobject_ = &iSetup.getData(templateDBobjectToken_); - if (!SiPixelTemplate::pushfile(*templateDBobject_, thePixelTemp_)) - edm::LogError("SiPixelPhase1TrackClusters") - << "Templates not filled correctly. Check the sqlite file. Using SiPixelTemplateDBObject version " - << (*templateDBobject_).version() << std::endl; + thePixelTemp_ = &iSetup.getData(templateStoreToken_); } void SiPixelPhase1TrackClusters::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) { @@ -162,7 +161,7 @@ namespace { return; } - SiPixelTemplate templ(thePixelTemp_); + SiPixelTemplate templ(*thePixelTemp_); edm::Handle pixelClusterShapeCacheH; iEvent.getByToken(pixelClusterShapeCacheToken_, pixelClusterShapeCacheH); diff --git a/DQMOffline/Trigger/python/SiPixel_OfflineMonitoring_cff.py b/DQMOffline/Trigger/python/SiPixel_OfflineMonitoring_cff.py index 6c9814bfb2074..2035bae48d610 100644 --- a/DQMOffline/Trigger/python/SiPixel_OfflineMonitoring_cff.py +++ b/DQMOffline/Trigger/python/SiPixel_OfflineMonitoring_cff.py @@ -4,6 +4,7 @@ from DQMOffline.Trigger.SiPixel_OfflineMonitoring_TrackCluster_cff import * from RecoPixelVertexing.PixelLowPtUtilities.siPixelClusterShapeCache_cfi import * from DQM.SiPixelMonitorTrack.RefitterForPixelDQM import * +from RecoLocalTracker.SiPixelRecHits.SiPixelTemplateStoreESProducer_cfi import * hltSiPixelClusterShapeCache = siPixelClusterShapeCache.clone(src = 'hltSiPixelClusters') hltrefittedForPixelDQM = refittedForPixelDQM.clone(src ='hltMergedTracks', @@ -14,5 +15,6 @@ hltSiPixelClusterShapeCache + hltSiPixelPhase1ClustersAnalyzer + hltrefittedForPixelDQM - + hltSiPixelPhase1TrackClustersAnalyzer + + hltSiPixelPhase1TrackClustersAnalyzer, + cms.Task(SiPixelTemplateStoreESProducer) ) diff --git a/DQMOffline/Trigger/python/SiStrip_OfflineMonitoring_cff.py b/DQMOffline/Trigger/python/SiStrip_OfflineMonitoring_cff.py index 504aae8564d97..35c9ed9776c9f 100644 --- a/DQMOffline/Trigger/python/SiStrip_OfflineMonitoring_cff.py +++ b/DQMOffline/Trigger/python/SiStrip_OfflineMonitoring_cff.py @@ -7,6 +7,7 @@ #HLTsiStripClusters.SiStripRefGetter = cms.InputTag("hltSiStripClusters") # SiStripCluster monitoring +from RecoLocalTracker.SiPixelRecHits.SiPixelTemplateStoreESProducer_cfi import SiPixelTemplateStoreESProducer import DQM.SiStripMonitorCluster.SiStripMonitorCluster_cfi HLTSiStripMonitorCluster = DQM.SiStripMonitorCluster.SiStripMonitorCluster_cfi.SiStripMonitorCluster.clone( ClusterProducerStrip = "hltSiStripRawToClustersFacility", diff --git a/FastSimulation/Configuration/python/Reconstruction_BefMix_cff.py b/FastSimulation/Configuration/python/Reconstruction_BefMix_cff.py index 91bda4c77044c..b91aa1dd999e8 100644 --- a/FastSimulation/Configuration/python/Reconstruction_BefMix_cff.py +++ b/FastSimulation/Configuration/python/Reconstruction_BefMix_cff.py @@ -41,6 +41,7 @@ from FastSimulation.Tracking.iterativeTk_cff import * from TrackingTools.TrackFitters.TrackFitters_cff import * +from RecoLocalTracker.SiPixelRecHits.SiPixelTemplateStoreESProducer_cfi import * reconstruction_befmix = cms.Sequence( offlineBeamSpot @@ -48,5 +49,6 @@ * fastMatchedTrackerRecHits * fastMatchedTrackerRecHitCombinations * MeasurementTrackerEvent - * iterTracking + * iterTracking, + cms.Task(SiPixelTemplateStoreESProducer) ) diff --git a/FastSimulation/TrackingRecHitProducer/interface/PixelTemplateSmearerBase.h b/FastSimulation/TrackingRecHitProducer/interface/PixelTemplateSmearerBase.h index 9dd5a6d7904c2..627e9bc205a14 100644 --- a/FastSimulation/TrackingRecHitProducer/interface/PixelTemplateSmearerBase.h +++ b/FastSimulation/TrackingRecHitProducer/interface/PixelTemplateSmearerBase.h @@ -49,9 +49,9 @@ class PixelTemplateSmearerBase : public TrackingRecHitAlgorithm { bool mergeHitsOn = false; // if true then see if neighboring hits might merge //--- Template DB Object(s) - const SiPixelTemplateDBObject* pixelTemplateDBObject_ = nullptr; // needed for template<-->DetId map. - std::vector thePixelTemp_; // our own template storage - std::vector& thePixelTempRef = thePixelTemp_; // points to the one we will use. + const SiPixelTemplateDBObject* pixelTemplateDBObject_ = nullptr; // needed for template<-->DetId map. + std::vector thePixelTemp_; // our own template storage + const std::vector* thePixelTempRef = &thePixelTemp_; // points to the one we will use. int templateId = -1; //--- Flag to tell us whether we are in barrel or in forward. @@ -92,7 +92,7 @@ class PixelTemplateSmearerBase : public TrackingRecHitAlgorithm { void beginRun(edm::Run const& run, const edm::EventSetup& eventSetup, const SiPixelTemplateDBObject* pixelTemplateDBObjectPtr, - std::vector& tempStoreRef) override; + const std::vector& tempStoreRef) override; // void endEvent(edm::Event& event, const edm::EventSetup& eventSetup) override; //--- Process all unmerged hits. Calls smearHit() for each. diff --git a/FastSimulation/TrackingRecHitProducer/interface/TrackingRecHitAlgorithm.h b/FastSimulation/TrackingRecHitProducer/interface/TrackingRecHitAlgorithm.h index 806d3a0c73734..d0edaff3601cf 100644 --- a/FastSimulation/TrackingRecHitProducer/interface/TrackingRecHitAlgorithm.h +++ b/FastSimulation/TrackingRecHitProducer/interface/TrackingRecHitAlgorithm.h @@ -51,7 +51,7 @@ class TrackingRecHitAlgorithm { virtual void beginRun(edm::Run const& run, const edm::EventSetup& eventSetup, const SiPixelTemplateDBObject* pixelTemplateDBObjectPtr, - std::vector& tempStoreRef); + const std::vector& tempStoreRef); //this function will only be called once per event virtual void beginEvent(edm::Event& event, const edm::EventSetup& eventSetup); diff --git a/FastSimulation/TrackingRecHitProducer/plugins/TrackingRecHitProducer.cc b/FastSimulation/TrackingRecHitProducer/plugins/TrackingRecHitProducer.cc index a0487ba7d33d6..1ab8f99218e21 100644 --- a/FastSimulation/TrackingRecHitProducer/plugins/TrackingRecHitProducer.cc +++ b/FastSimulation/TrackingRecHitProducer/plugins/TrackingRecHitProducer.cc @@ -48,8 +48,9 @@ class TrackingRecHitProducer : public edm::stream::EDProducer<> { unsigned long long _trackerTopologyCacheID = 0; std::map _detIdPipes; void setupDetIdPipes(const edm::EventSetup& eventSetup); - std::vector _pixelTempStore; // pixel template storage const edm::ESGetToken siPixelTemplateDBObjectESToken_; + const edm::ESGetToken, SiPixelTemplateDBObjectESProducerRcd> + siPixelTemplateStoreESToken_; const edm::ESGetToken trackerGeometryESToken_; const edm::ESGetToken trackerTopologyESToken_; @@ -69,6 +70,7 @@ class TrackingRecHitProducer : public edm::stream::EDProducer<> { TrackingRecHitProducer::TrackingRecHitProducer(const edm::ParameterSet& config) : siPixelTemplateDBObjectESToken_(esConsumes()), + siPixelTemplateStoreESToken_(esConsumes()), trackerGeometryESToken_(esConsumes()), trackerTopologyESToken_(esConsumes()) { edm::ConsumesCollector consumeCollector = consumesCollector(); @@ -115,17 +117,10 @@ void TrackingRecHitProducer::beginRun(edm::Run const& run, const edm::EventSetup // to a no-op. const SiPixelTemplateDBObject& pixelTemplateDBObject = eventSetup.getData(siPixelTemplateDBObjectESToken_); - - //--- Now that we have the DB object, load the correct templates from the DB. - // (They are needed for data and full sim MC, so in a production FastSim - // run, everything should already be in the DB.) - if (!SiPixelTemplate::pushfile(pixelTemplateDBObject, _pixelTempStore)) { - throw cms::Exception("TrackingRecHitProducer:") - << "SiPixel Templates not loaded correctly from the DB object!" << std::endl; - } + const auto& pixelTemplateStore = eventSetup.getData(siPixelTemplateStoreESToken_); for (auto& algo : _recHitAlgorithms) { - algo->beginRun(run, eventSetup, &pixelTemplateDBObject, _pixelTempStore); + algo->beginRun(run, eventSetup, &pixelTemplateDBObject, pixelTemplateStore); } } diff --git a/FastSimulation/TrackingRecHitProducer/src/PixelTemplateSmearerBase.cc b/FastSimulation/TrackingRecHitProducer/src/PixelTemplateSmearerBase.cc index 0b2ab2b963670..d7c2ab27e0afe 100644 --- a/FastSimulation/TrackingRecHitProducer/src/PixelTemplateSmearerBase.cc +++ b/FastSimulation/TrackingRecHitProducer/src/PixelTemplateSmearerBase.cc @@ -136,14 +136,14 @@ PixelTemplateSmearerBase::~PixelTemplateSmearerBase() {} void PixelTemplateSmearerBase::beginRun(edm::Run const& run, const edm::EventSetup& eventSetup, const SiPixelTemplateDBObject* pixelTemplateDBObjectPtr, - std::vector& tempStoreRef) { + const std::vector& tempStoreRef) { //--- Check if we need to use the template from the DB (namely if // id == -1). Otherwise the template has already been loaded from // the ascii file in constructor, and thePixelTempRef wakes up // pointing to thePixelTemp_, so then we use our own store. // if (templateId == -1) { - thePixelTempRef = tempStoreRef; // we use the store from TrackingRecHitProducer + thePixelTempRef = &tempStoreRef; // we use the store from TrackingRecHitProducer pixelTemplateDBObject_ = pixelTemplateDBObjectPtr; // needed for template<-->DetId map. } @@ -392,7 +392,7 @@ FastSingleTrackerRecHit PixelTemplateSmearerBase::smearHit(const PSimHit& simHit } //--- Make the template object - SiPixelTemplate templ(thePixelTempRef); + SiPixelTemplate templ(*thePixelTempRef); //--- Produce the template that corresponds to our local angles. templ.interpolate(ID, cotalpha, cotbeta); @@ -778,7 +778,7 @@ FastSingleTrackerRecHit PixelTemplateSmearerBase::smearMergeGroup(MergeGroup* mg } //--- Make the template object - SiPixelTemplate templ(thePixelTempRef); + SiPixelTemplate templ(*thePixelTempRef); //--- Produce the template that corresponds to our local angles. templ.interpolate(ID, cotalpha, cotbeta); diff --git a/FastSimulation/TrackingRecHitProducer/src/TrackingRecHitAlgorithm.cc b/FastSimulation/TrackingRecHitProducer/src/TrackingRecHitAlgorithm.cc index 2ac1c9f781d45..bcb6852039c21 100644 --- a/FastSimulation/TrackingRecHitProducer/src/TrackingRecHitAlgorithm.cc +++ b/FastSimulation/TrackingRecHitProducer/src/TrackingRecHitAlgorithm.cc @@ -66,7 +66,7 @@ void TrackingRecHitAlgorithm::beginStream(const edm::StreamID& id) { void TrackingRecHitAlgorithm::beginRun(edm::Run const& run, const edm::EventSetup& eventSetup, const SiPixelTemplateDBObject* pixelTemplateDBObjectPtr, - std::vector& tempStoreRef) { + const std::vector& tempStoreRef) { // The default is to do nothing. } diff --git a/HLTrigger/Configuration/python/customizeHLTforCMSSW.py b/HLTrigger/Configuration/python/customizeHLTforCMSSW.py index 53b007a50b775..4b7a75f6b34a6 100644 --- a/HLTrigger/Configuration/python/customizeHLTforCMSSW.py +++ b/HLTrigger/Configuration/python/customizeHLTforCMSSW.py @@ -211,6 +211,13 @@ def customiseForOffline(process): return process +def customizeHLTfor42514(process): + for p in esproducers_by_type(process, 'SiPixelTemplateDBObjectESProducer'): + process.load('RecoLocalTracker.SiPixelRecHits.SiPixelTemplateStoreESProducer_cfi') + break + + return process + # CMSSW version specific customizations def customizeHLTforCMSSW(process, menuType="GRun"): @@ -218,5 +225,6 @@ def customizeHLTforCMSSW(process, menuType="GRun"): # add call to action function in proper order: newest last! # process = customiseFor12718(process) + process = customizeHLTfor42514(process) return process diff --git a/RecoHI/HiTracking/python/HighPtTracking_PbPb_cff.py b/RecoHI/HiTracking/python/HighPtTracking_PbPb_cff.py index 88920af36a676..a499ad0f192a2 100644 --- a/RecoHI/HiTracking/python/HighPtTracking_PbPb_cff.py +++ b/RecoHI/HiTracking/python/HighPtTracking_PbPb_cff.py @@ -4,6 +4,7 @@ from TrackingTools.TransientTrack.TransientTrackBuilder_cfi import * #also includes global tracking geometry from RecoTracker.TransientTrackingRecHit.TTRHBuilders_cff import * from RecoLocalTracker.SiPixelRecHits.PixelCPEESProducers_cff import * #cluster parameter estimator producer +from RecoLocalTracker.SiPixelRecHits.SiPixelTemplateStoreESProducer_cfi import SiPixelTemplateStoreESProducer from RecoTracker.TkSeedingLayers.PixelLayerTriplets_cfi import * ### pixel primary vertices @@ -31,4 +32,5 @@ , hiPrimTrackCandidates , hiGlobalPrimTracks , hiTracksWithQualityTask + , SiPixelTemplateStoreESProducer ) diff --git a/RecoLocalTracker/SiPixelRecHits/interface/PixelCPEClusterRepair.h b/RecoLocalTracker/SiPixelRecHits/interface/PixelCPEClusterRepair.h index 2c753edf03c00..1982cff15f81c 100644 --- a/RecoLocalTracker/SiPixelRecHits/interface/PixelCPEClusterRepair.h +++ b/RecoLocalTracker/SiPixelRecHits/interface/PixelCPEClusterRepair.h @@ -56,6 +56,7 @@ class PixelCPEClusterRepair : public PixelCPEBase { const TrackerGeometry &, const TrackerTopology &, const SiPixelLorentzAngle *, + const std::vector *, const SiPixelTemplateDBObject *, const SiPixel2DTemplateDBObject *); @@ -97,7 +98,8 @@ class PixelCPEClusterRepair : public PixelCPEBase { void fill2DTemplIDs(); // Template storage - std::vector thePixelTemp_; + std::vector const *thePixelTemp_; + std::vector thePixelTempCache_; std::vector thePixelTemp2D_; int speed_; diff --git a/RecoLocalTracker/SiPixelRecHits/interface/PixelCPETemplateReco.h b/RecoLocalTracker/SiPixelRecHits/interface/PixelCPETemplateReco.h index 93e8ee9971891..dc92fae67d4c6 100644 --- a/RecoLocalTracker/SiPixelRecHits/interface/PixelCPETemplateReco.h +++ b/RecoLocalTracker/SiPixelRecHits/interface/PixelCPETemplateReco.h @@ -56,6 +56,7 @@ class PixelCPETemplateReco : public PixelCPEBase { const TrackerGeometry &, const TrackerTopology &, const SiPixelLorentzAngle *, + const std::vector *, const SiPixelTemplateDBObject *); ~PixelCPETemplateReco() override; @@ -74,7 +75,8 @@ class PixelCPETemplateReco : public PixelCPEBase { LocalError localError(DetParam const &theDetParam, ClusterParam &theClusterParam) const override; // Template storage - std::vector thePixelTemp_; + std::vector thePixelTempCache_; + const std::vector *thePixelTemp_; int speed_; diff --git a/RecoLocalTracker/SiPixelRecHits/plugins/BuildFile.xml b/RecoLocalTracker/SiPixelRecHits/plugins/BuildFile.xml index 3a1a0bec51250..00c88eadd4b51 100644 --- a/RecoLocalTracker/SiPixelRecHits/plugins/BuildFile.xml +++ b/RecoLocalTracker/SiPixelRecHits/plugins/BuildFile.xml @@ -6,6 +6,7 @@ + diff --git a/RecoLocalTracker/SiPixelRecHits/plugins/PixelCPEClusterRepairESProducer.cc b/RecoLocalTracker/SiPixelRecHits/plugins/PixelCPEClusterRepairESProducer.cc index 1c97241056c31..9ffd3759bb585 100644 --- a/RecoLocalTracker/SiPixelRecHits/plugins/PixelCPEClusterRepairESProducer.cc +++ b/RecoLocalTracker/SiPixelRecHits/plugins/PixelCPEClusterRepairESProducer.cc @@ -30,6 +30,7 @@ class PixelCPEClusterRepairESProducer : public edm::ESProducer { edm::ESGetToken pDDToken_; edm::ESGetToken hTTToken_; edm::ESGetToken lorentzAngleToken_; + edm::ESGetToken, SiPixelTemplateDBObjectESProducerRcd> templateStoreToken_; edm::ESGetToken templateDBobjectToken_; edm::ESGetToken templateDBobject2DToken_; @@ -51,6 +52,7 @@ PixelCPEClusterRepairESProducer::PixelCPEClusterRepairESProducer(const edm::Para magfieldToken_ = c.consumes(); pDDToken_ = c.consumes(); hTTToken_ = c.consumes(); + templateStoreToken_ = c.consumes(); templateDBobjectToken_ = c.consumes(); templateDBobject2DToken_ = c.consumes(); if (useLAFromDB_ || doLorentzFromAlignment_) { @@ -91,6 +93,7 @@ std::unique_ptr PixelCPEClusterRepairESProducer: iRecord.get(pDDToken_), iRecord.get(hTTToken_), lorentzAngleProduct, + &iRecord.get(templateStoreToken_), &iRecord.get(templateDBobjectToken_), &iRecord.get(templateDBobject2DToken_)); } diff --git a/RecoLocalTracker/SiPixelRecHits/plugins/PixelCPETemplateRecoESProducer.cc b/RecoLocalTracker/SiPixelRecHits/plugins/PixelCPETemplateRecoESProducer.cc index 696d3700f96f7..074c1290f7d54 100644 --- a/RecoLocalTracker/SiPixelRecHits/plugins/PixelCPETemplateRecoESProducer.cc +++ b/RecoLocalTracker/SiPixelRecHits/plugins/PixelCPETemplateRecoESProducer.cc @@ -28,6 +28,7 @@ class PixelCPETemplateRecoESProducer : public edm::ESProducer { edm::ESGetToken hTTToken_; edm::ESGetToken lorentzAngleToken_; edm::ESGetToken templateDBobjectToken_; + edm::ESGetToken, SiPixelTemplateDBObjectESProducerRcd> templateStoreToken_; edm::ParameterSet pset_; bool doLorentzFromAlignment_; @@ -48,6 +49,7 @@ PixelCPETemplateRecoESProducer::PixelCPETemplateRecoESProducer(const edm::Parame pDDToken_ = c.consumes(); hTTToken_ = c.consumes(); templateDBobjectToken_ = c.consumes(); + templateStoreToken_ = c.consumes(); if (useLAFromDB_ || doLorentzFromAlignment_) { char const* laLabel = doLorentzFromAlignment_ ? "fromAlignment" : ""; lorentzAngleToken_ = c.consumes(edm::ESInputTag("", laLabel)); @@ -69,6 +71,7 @@ std::unique_ptr PixelCPETemplateRecoESProducer:: iRecord.get(pDDToken_), iRecord.get(hTTToken_), lorentzAngleProduct, + &iRecord.get(templateStoreToken_), &iRecord.get(templateDBobjectToken_)); } diff --git a/RecoLocalTracker/SiPixelRecHits/plugins/SiPixelTemplateStoreESProducer.cc b/RecoLocalTracker/SiPixelRecHits/plugins/SiPixelTemplateStoreESProducer.cc new file mode 100644 index 0000000000000..4a9b9ab2907bf --- /dev/null +++ b/RecoLocalTracker/SiPixelRecHits/plugins/SiPixelTemplateStoreESProducer.cc @@ -0,0 +1,80 @@ +// -*- C++ -*- +// +// Package: RecoLocalTracker/SiPixelRecHits +// Class : SiPixelTemplateStoreESProducer +// +// Implementation: +// [Notes on implementation] +// +// Original Author: Christopher Jones +// Created: Tue, 08 Aug 2023 14:21:50 GMT +// + +// system include files + +// user include files +#include "FWCore/Framework/interface/ESProducer.h" +#include "FWCore/Framework/interface/ModuleFactory.h" + +#include "CondFormats/SiPixelTransient/interface/SiPixelTemplate.h" +#include "CondFormats/SiPixelObjects/interface/SiPixel2DTemplateDBObject.h" + +#include "CalibTracker/Records/interface/SiPixelTemplateDBObjectESProducerRcd.h" + +class SiPixelTemplateStoreESProducer : public edm::ESProducer { +public: + SiPixelTemplateStoreESProducer(edm::ParameterSet const&); + static void fillDescriptions(edm::ConfigurationDescriptions&); + + std::unique_ptr> produce(const SiPixelTemplateDBObjectESProducerRcd&); + +private: + edm::ESGetToken token_; +}; + +// +// constants, enums and typedefs +// + +// +// static data member definitions +// + +// +// constructors and destructor +// +SiPixelTemplateStoreESProducer::SiPixelTemplateStoreESProducer(edm::ParameterSet const& iPSet) { + token_ = setWhatProduced(this).consumes(); +} + +// +// member functions +// +std::unique_ptr> SiPixelTemplateStoreESProducer::produce( + const SiPixelTemplateDBObjectESProducerRcd& iRecord) { + auto returnValue = std::make_unique>(); + + if (not SiPixelTemplate::pushfile(iRecord.get(token_), *returnValue)) { + throw cms::Exception("SiPixelTemplateDBObjectFailure") + << "Templates not filled correctly. Check the DB. Using SiPixelTemplateDBObject version " + << iRecord.get(token_).version(); + } + + return returnValue; +} + +// +// const member functions +// + +// +// static member functions +// +void SiPixelTemplateStoreESProducer::fillDescriptions(edm::ConfigurationDescriptions& iDesc) { + edm::ParameterSetDescription iPSet; + iDesc.addDefault(iPSet); + iDesc.add("SiPixelTemplateStoreESProducer", iPSet); +} + +DEFINE_FWK_EVENTSETUP_MODULE(SiPixelTemplateStoreESProducer); +; diff --git a/RecoLocalTracker/SiPixelRecHits/src/PixelCPEClusterRepair.cc b/RecoLocalTracker/SiPixelRecHits/src/PixelCPEClusterRepair.cc index ac84748b74be1..8a7df758538f5 100644 --- a/RecoLocalTracker/SiPixelRecHits/src/PixelCPEClusterRepair.cc +++ b/RecoLocalTracker/SiPixelRecHits/src/PixelCPEClusterRepair.cc @@ -40,6 +40,7 @@ PixelCPEClusterRepair::PixelCPEClusterRepair(edm::ParameterSet const& conf, const TrackerGeometry& geom, const TrackerTopology& ttopo, const SiPixelLorentzAngle* lorentzAngle, + const std::vector* templateStore, const SiPixelTemplateDBObject* templateDBobject, const SiPixel2DTemplateDBObject* templateDBobject2D) : PixelCPEBase(conf, mag, geom, ttopo, lorentzAngle, nullptr, templateDBobject, nullptr, 1) { @@ -47,12 +48,7 @@ PixelCPEClusterRepair::PixelCPEClusterRepair(edm::ParameterSet const& conf, //--- Parameter to decide between DB or text file template access if (LoadTemplatesFromDB_) { - // Initialize template store to the selected ID [Morris, 6/25/08] - if (!SiPixelTemplate::pushfile(*templateDBobject_, thePixelTemp_)) - throw cms::Exception("PixelCPEClusterRepair") - << "\nERROR: Templates not filled correctly. Check the sqlite file. Using SiPixelTemplateDBObject version " - << (*templateDBobject_).version() << "\n\n"; - + thePixelTemp_ = templateStore; // Initialize template store to the selected ID [Morris, 6/25/08] if (!SiPixelTemplate2D::pushfile(*templateDBobject2D, thePixelTemp2D_)) throw cms::Exception("PixelCPEClusterRepair") @@ -65,13 +61,14 @@ PixelCPEClusterRepair::PixelCPEClusterRepair(edm::ParameterSet const& conf, barrelTemplateID_ = conf.getParameter("barrelTemplateID"); forwardTemplateID_ = conf.getParameter("forwardTemplateID"); templateDir_ = conf.getParameter("directoryWithTemplates"); + thePixelTemp_ = &thePixelTempCache_; - if (!SiPixelTemplate::pushfile(barrelTemplateID_, thePixelTemp_, templateDir_)) + if (!SiPixelTemplate::pushfile(barrelTemplateID_, thePixelTempCache_, templateDir_)) throw cms::Exception("PixelCPEClusterRepair") << "\nERROR: Template ID " << barrelTemplateID_ << " not loaded correctly from text file. Reconstruction will fail.\n\n"; - if (!SiPixelTemplate::pushfile(forwardTemplateID_, thePixelTemp_, templateDir_)) + if (!SiPixelTemplate::pushfile(forwardTemplateID_, thePixelTempCache_, templateDir_)) throw cms::Exception("PixelCPEClusterRepair") << "\nERROR: Template ID " << forwardTemplateID_ << " not loaded correctly from text file. Reconstruction will fail.\n\n"; @@ -312,7 +309,7 @@ void PixelCPEClusterRepair::callTempReco1D(DetParam const& theDetParam, SiPixelTemplateReco::ClusMatrix& clusterPayload, int ID, LocalPoint& lp) const { - SiPixelTemplate templ(thePixelTemp_); + SiPixelTemplate templ(*thePixelTemp_); // Output: float nonsense = -99999.9f; // nonsense init value @@ -551,7 +548,7 @@ void PixelCPEClusterRepair::checkRecommend2D(DetParam const& theDetParam, return; } // The 1d pixel template - SiPixelTemplate templ(thePixelTemp_); + SiPixelTemplate templ(*thePixelTemp_); if (!templ.interpolate(ID, theClusterParam.cotalpha, theClusterParam.cotbeta, theDetParam.bz, theDetParam.bx)) { //error setting up template, return false theClusterParam.recommended2D_ = false; diff --git a/RecoLocalTracker/SiPixelRecHits/src/PixelCPETemplateReco.cc b/RecoLocalTracker/SiPixelRecHits/src/PixelCPETemplateReco.cc index 48752c6e12757..e29aa902ca8f9 100644 --- a/RecoLocalTracker/SiPixelRecHits/src/PixelCPETemplateReco.cc +++ b/RecoLocalTracker/SiPixelRecHits/src/PixelCPETemplateReco.cc @@ -45,6 +45,7 @@ PixelCPETemplateReco::PixelCPETemplateReco(edm::ParameterSet const& conf, const TrackerGeometry& geom, const TrackerTopology& ttopo, const SiPixelLorentzAngle* lorentzAngle, + const std::vector* templateStore, const SiPixelTemplateDBObject* templateDBobject) : PixelCPEBase(conf, mag, geom, ttopo, lorentzAngle, nullptr, templateDBobject, nullptr, 1) { //cout << endl; @@ -62,24 +63,20 @@ PixelCPETemplateReco::PixelCPETemplateReco(edm::ParameterSet const& conf, if (LoadTemplatesFromDB_) { //cout << "PixelCPETemplateReco: Loading templates from database (DB) --------- " << endl; - - // Initialize template store to the selected ID [Morris, 6/25/08] - if (!SiPixelTemplate::pushfile(*templateDBobject_, thePixelTemp_)) - throw cms::Exception("PixelCPETemplateReco") - << "\nERROR: Templates not filled correctly. Check the sqlite file. Using SiPixelTemplateDBObject version " - << (*templateDBobject_).version() << "\n\n"; + thePixelTemp_ = templateStore; } else { //cout << "PixelCPETemplateReco : Loading templates for barrel and forward from ASCII files ----------" << endl; barrelTemplateID_ = conf.getParameter("barrelTemplateID"); forwardTemplateID_ = conf.getParameter("forwardTemplateID"); templateDir_ = conf.getParameter("directoryWithTemplates"); - if (!SiPixelTemplate::pushfile(barrelTemplateID_, thePixelTemp_, templateDir_)) + thePixelTemp_ = &thePixelTempCache_; + if (!SiPixelTemplate::pushfile(barrelTemplateID_, thePixelTempCache_, templateDir_)) throw cms::Exception("PixelCPETemplateReco") << "\nERROR: Template ID " << barrelTemplateID_ << " not loaded correctly from text file. Reconstruction will fail.\n\n"; - if (!SiPixelTemplate::pushfile(forwardTemplateID_, thePixelTemp_, templateDir_)) + if (!SiPixelTemplate::pushfile(forwardTemplateID_, thePixelTempCache_, templateDir_)) throw cms::Exception("PixelCPETemplateReco") << "\nERROR: Template ID " << forwardTemplateID_ << " not loaded correctly from text file. Reconstruction will fail.\n\n"; @@ -129,7 +126,7 @@ LocalPoint PixelCPETemplateReco::localPosition(DetParam const& theDetParam, Clus } //cout << "PixelCPETemplateReco : ID = " << ID << endl; - SiPixelTemplate templ(thePixelTemp_); + SiPixelTemplate templ(*thePixelTemp_); // Preparing to retrieve ADC counts from the SiPixeltheClusterParam.theCluster-> In the cluster, // we have the following: diff --git a/RecoTracker/FinalTrackSelectors/python/MergeTrackCollections_cff.py b/RecoTracker/FinalTrackSelectors/python/MergeTrackCollections_cff.py index c0315cbcaabaa..51c6934d93aab 100644 --- a/RecoTracker/FinalTrackSelectors/python/MergeTrackCollections_cff.py +++ b/RecoTracker/FinalTrackSelectors/python/MergeTrackCollections_cff.py @@ -3,6 +3,7 @@ from RecoTracker.FinalTrackSelectors.DuplicateTrackMerger_cfi import * from RecoTracker.FinalTrackSelectors.DuplicateListMerger_cfi import * from RecoTracker.FinalTrackSelectors.trackAlgoPriorityOrder_cfi import trackAlgoPriorityOrder +from RecoLocalTracker.SiPixelRecHits.SiPixelTemplateStoreESProducer_cfi import SiPixelTemplateStoreESProducer from TrackingTools.KalmanUpdators.Chi2MeasurementEstimator_cfi import Chi2MeasurementEstimator as _Chi2MeasurementEstimator duplicateTrackCandidatesChi2Est = _Chi2MeasurementEstimator.clone( @@ -48,7 +49,8 @@ duplicateTrackCandidates, mergedDuplicateTracks, duplicateTrackClassifier, - generalTracks + generalTracks, + SiPixelTemplateStoreESProducer ) generalTracksSequence = cms.Sequence(generalTracksTask) diff --git a/RecoTracker/SpecialSeedGenerators/python/cosmicDC_cff.py b/RecoTracker/SpecialSeedGenerators/python/cosmicDC_cff.py index 978cb0b9d24ad..68a500fb115fc 100644 --- a/RecoTracker/SpecialSeedGenerators/python/cosmicDC_cff.py +++ b/RecoTracker/SpecialSeedGenerators/python/cosmicDC_cff.py @@ -52,5 +52,6 @@ ) # Final Sequence -cosmicDCTracksSeqTask = cms.Task( cosmicDCSeeds , cosmicDCCkfTrackCandidates , cosmicDCTracks ) +from RecoLocalTracker.SiPixelRecHits.SiPixelTemplateStoreESProducer_cfi import SiPixelTemplateStoreESProducer +cosmicDCTracksSeqTask = cms.Task( cosmicDCSeeds , cosmicDCCkfTrackCandidates , cosmicDCTracks , SiPixelTemplateStoreESProducer ) cosmicDCTracksSeq = cms.Sequence(cosmicDCTracksSeqTask) diff --git a/RecoTracker/TrackProducer/test/refitFromAOD.py b/RecoTracker/TrackProducer/test/refitFromAOD.py index 0f95da7e0e76c..9c84173af1ef1 100644 --- a/RecoTracker/TrackProducer/test/refitFromAOD.py +++ b/RecoTracker/TrackProducer/test/refitFromAOD.py @@ -75,8 +75,11 @@ Fitter = 'FlexibleKFFittingSmoother' ) +from RecoLocalTracker.SiPixelRecHits.SiPixelTemplateStoreESProducer_cfi import * + # Path and EndPath definitions -process.reconstruction_step = cms.Path(process.trackExtraRekeyer*process.myRefittedTracks) +process.reconstruction_step = cms.Path(process.trackExtraRekeyer*process.myRefittedTracks, + cms.Task(process.TTRHBuilderAngleAndTemplate, process.templates, process.SiPixelTemplateStoreESProducer)) process.endjob_step = cms.EndPath(process.endOfProcess) process.RECOSIMoutput_step = cms.EndPath(process.RECOSIMoutput) diff --git a/RecoTracker/TrackProducer/test/refitFromMINIAOD.py b/RecoTracker/TrackProducer/test/refitFromMINIAOD.py index f709a1ff552f6..9abfee5732fc6 100644 --- a/RecoTracker/TrackProducer/test/refitFromMINIAOD.py +++ b/RecoTracker/TrackProducer/test/refitFromMINIAOD.py @@ -75,7 +75,8 @@ ) # Path and EndPath definitions -process.reconstruction_step = cms.Path(process.tracksFromMuons*process.myRefittedTracks) +process.reconstruction_step = cms.Path(process.tracksFromMuons*process.myRefittedTracks, + cms.Task(process.TTRHBuilderAngleAndTemplate, process.templates, process.SiPixelTemplateStoreESProducer)) process.endjob_step = cms.EndPath(process.endOfProcess) process.RECOSIMoutput_step = cms.EndPath(process.RECOSIMoutput) diff --git a/RecoTracker/TransientTrackingRecHit/python/TTRHBuilders_cff.py b/RecoTracker/TransientTrackingRecHit/python/TTRHBuilders_cff.py index 4646e8bfad076..3022edc925406 100644 --- a/RecoTracker/TransientTrackingRecHit/python/TTRHBuilders_cff.py +++ b/RecoTracker/TransientTrackingRecHit/python/TTRHBuilders_cff.py @@ -14,3 +14,4 @@ from RecoLocalTracker.Phase2TrackerRecHits.Phase2StripCPEESProducer_cfi import * from RecoTracker.TransientTrackingRecHit.TTRHBuilderWithTemplate_cfi import * +from RecoLocalTracker.SiPixelRecHits.SiPixelTemplateStoreESProducer_cfi import * From 6ac69d6bdfbab83e96cf2ca1f108d834cadeab72 Mon Sep 17 00:00:00 2001 From: Christopher Jones Date: Thu, 17 Aug 2023 16:41:13 +0200 Subject: [PATCH 2/3] Do not use a Task with SiPixelTemplateStoreESProducer The use of a Task at this time causes to much disruption. Moving ES modules to Tasks should wait till a dedicated campaign. --- .../python/tools/trackselectionRefitting.py | 6 ------ .../python/TkAlAllInOneTool/JetHT_cfg.py | 8 +++----- .../python/TkAlAllInOneTool/SplitV_cfg.py | 4 +--- .../OfflineValidation/test/DiMuonVertexValidation_cfg.py | 4 +--- Alignment/OfflineValidation/test/eopTreeWriter_cfg.py | 4 +--- .../ALCARECOPromptCalibProdSiPixelLorentzAngleMCS_cff.py | 4 +--- .../ALCARECOPromptCalibProdSiPixelLorentzAngle_cff.py | 3 +-- .../python/ALCARECOPromptCalibProdSiStripGainsAAG_cff.py | 3 +-- .../python/ALCARECOSiPixelCalSingleMuonTight_cff.py | 3 +-- .../python/SiPixelPhase1OfflineDQM_source_cff.py | 3 +-- .../python/SiPixelPhase1OnlineDQM_Timing_cff.py | 9 +++------ .../python/SiPixelPhase1OnlineDQM_cff.py | 7 ++----- .../Configuration/python/Reconstruction_BefMix_cff.py | 3 +-- RecoHI/HiTracking/python/HighPtTracking_PbPb_cff.py | 1 - .../python/MergeTrackCollections_cff.py | 3 +-- RecoTracker/SpecialSeedGenerators/python/cosmicDC_cff.py | 3 +-- 16 files changed, 19 insertions(+), 49 deletions(-) diff --git a/Alignment/CommonAlignment/python/tools/trackselectionRefitting.py b/Alignment/CommonAlignment/python/tools/trackselectionRefitting.py index 57ccd748e2c18..948f56d12aee0 100644 --- a/Alignment/CommonAlignment/python/tools/trackselectionRefitting.py +++ b/Alignment/CommonAlignment/python/tools/trackselectionRefitting.py @@ -391,10 +391,6 @@ def getSequence(process, collection, modules.append(getattr(process, src)) moduleSum = process.offlineBeamSpot # first element of the sequence - tasks = [] - if usePixelQualityFlag: - process.load("RecoLocalTracker.SiPixelRecHits.SiPixelTemplateStoreESProducer_cfi") - tasks =[process.SiPixelTemplateStoreESProducer] if g4Refitting: # g4Refitter needs measurements moduleSum += getattr(process,"MeasurementTrackerEvent") @@ -425,8 +421,6 @@ def getSequence(process, collection, moduleSum += module # append the other modules - if tasks: - return cms.Sequence(moduleSum, cms.Task(*tasks)) return cms.Sequence(moduleSum) ############################### diff --git a/Alignment/OfflineValidation/python/TkAlAllInOneTool/JetHT_cfg.py b/Alignment/OfflineValidation/python/TkAlAllInOneTool/JetHT_cfg.py index 669d3b28a4dd1..14cc483eedcdb 100644 --- a/Alignment/OfflineValidation/python/TkAlAllInOneTool/JetHT_cfg.py +++ b/Alignment/OfflineValidation/python/TkAlAllInOneTool/JetHT_cfg.py @@ -289,19 +289,17 @@ ) -process.load("RecoLocalTracker.SiPixelRecHits.SiPixelTemplateStoreESProducer_cfi") if (triggerFilter == "nothing" or triggerFilter == ""): process.p = cms.Path(process.offlineBeamSpot + process.TrackRefitter + process.offlinePrimaryVerticesFromRefittedTrks + - process.jetHTAnalyzer, - cms.Task(process.SiPixelTemplateStoreESProducer)) + process.jetHTAnalyzer) else: process.p = cms.Path(process.HLTFilter + process.offlineBeamSpot + process.TrackRefitter + process.offlinePrimaryVerticesFromRefittedTrks + - process.jetHTAnalyzer, - cms.Task(process.SiPixelTemplateStoreESProducer)) + process.jetHTAnalyzer) + diff --git a/Alignment/OfflineValidation/python/TkAlAllInOneTool/SplitV_cfg.py b/Alignment/OfflineValidation/python/TkAlAllInOneTool/SplitV_cfg.py index 342db62706218..00c651df40961 100644 --- a/Alignment/OfflineValidation/python/TkAlAllInOneTool/SplitV_cfg.py +++ b/Alignment/OfflineValidation/python/TkAlAllInOneTool/SplitV_cfg.py @@ -197,12 +197,10 @@ print("Saving the output at %s" % process.TFileService.fileName.value()) -process.load("RecoLocalTracker.SiPixelRecHits.SiPixelTemplateStoreESProducer_cfi") process.theValidSequence = cms.Sequence(process.offlineBeamSpot + process.TrackRefitter + process.offlinePrimaryVerticesFromRefittedTrks + - process.PrimaryVertexResolution, - cms.Task(process.SiPixelTemplateStoreESProducer)) + process.PrimaryVertexResolution) HLTSel = config["validation"].get("HLTselection", False) diff --git a/Alignment/OfflineValidation/test/DiMuonVertexValidation_cfg.py b/Alignment/OfflineValidation/test/DiMuonVertexValidation_cfg.py index 1002ff4f9dc71..db6378f119b13 100644 --- a/Alignment/OfflineValidation/test/DiMuonVertexValidation_cfg.py +++ b/Alignment/OfflineValidation/test/DiMuonVertexValidation_cfg.py @@ -228,12 +228,10 @@ def best_match(rcd): #################################################################### # Sequence #################################################################### -process.load("RecoLocalTracker.SiPixelRecHits.SiPixelTemplateStoreESProducer_cfi") process.seqTrackselRefit = cms.Sequence(process.offlineBeamSpot* # in case NavigatioSchool is set !='' #process.MeasurementTrackerEvent* - process.TrackRefitter, - cms.Task(process.SiPixelTemplateStoreESProducer)) + process.TrackRefitter) #################################################################### # Re-do vertices diff --git a/Alignment/OfflineValidation/test/eopTreeWriter_cfg.py b/Alignment/OfflineValidation/test/eopTreeWriter_cfg.py index f560948a59c8d..f1e925443543c 100644 --- a/Alignment/OfflineValidation/test/eopTreeWriter_cfg.py +++ b/Alignment/OfflineValidation/test/eopTreeWriter_cfg.py @@ -150,10 +150,8 @@ #################################################################### # Path #################################################################### -process.load("RecoLocalTracker.SiPixelRecHits.SiPixelTemplateStoreESProducer_cfi") process.p = cms.Path(process.MeasurementTrackerEvent* process.offlineBeamSpot* process.AlignmentTrackSelector* process.TrackRefitter* - process.energyOverMomentumTree, - cms.Task(process.SiPixelTemplateStoreESProducer)) + process.energyOverMomentumTree) diff --git a/Calibration/TkAlCaRecoProducers/python/ALCARECOPromptCalibProdSiPixelLorentzAngleMCS_cff.py b/Calibration/TkAlCaRecoProducers/python/ALCARECOPromptCalibProdSiPixelLorentzAngleMCS_cff.py index 9a0358f88c3af..c2b46e714a1cc 100644 --- a/Calibration/TkAlCaRecoProducers/python/ALCARECOPromptCalibProdSiPixelLorentzAngleMCS_cff.py +++ b/Calibration/TkAlCaRecoProducers/python/ALCARECOPromptCalibProdSiPixelLorentzAngleMCS_cff.py @@ -26,7 +26,6 @@ from RecoTracker.Configuration.RecoTrackerP5_cff import * from RecoTracker.TrackProducer.TrackRefitter_cfi import * from TrackingTools.TransientTrack.TransientTrackBuilder_cfi import * -from RecoLocalTracker.SiPixelRecHits.SiPixelTemplateStoreESProducer_cfi import * ALCARECOPixelLACalibrationTracksRefitMCS = TrackRefitter.clone(src = "ALCARECOPixelLACalibrationTracksMCS", TrajectoryInEvent = True, @@ -66,6 +65,5 @@ ALCARECOCalCosmicsFilterForSiPixelLorentzAngleMCS * ALCARECOPixelLATrackFilterRefitMCS * ALCARECOSiPixelLACalibMCS * - MEtoEDMConvertSiPixelLorentzAngleMCS, - cms.Task(SiPixelTemplateStoreESProducer) + MEtoEDMConvertSiPixelLorentzAngleMCS ) diff --git a/Calibration/TkAlCaRecoProducers/python/ALCARECOPromptCalibProdSiPixelLorentzAngle_cff.py b/Calibration/TkAlCaRecoProducers/python/ALCARECOPromptCalibProdSiPixelLorentzAngle_cff.py index 7fbb485038ee6..f339cda514359 100644 --- a/Calibration/TkAlCaRecoProducers/python/ALCARECOPromptCalibProdSiPixelLorentzAngle_cff.py +++ b/Calibration/TkAlCaRecoProducers/python/ALCARECOPromptCalibProdSiPixelLorentzAngle_cff.py @@ -67,6 +67,5 @@ ALCARECOCalSignleMuonFilterForSiPixelLorentzAngle * ALCARECOPixelLATrackFilterRefit * ALCARECOSiPixelLACalib * - MEtoEDMConvertSiPixelLorentzAngle, - cms.Task(SiPixelTemplateStoreESProducer) + MEtoEDMConvertSiPixelLorentzAngle ) diff --git a/Calibration/TkAlCaRecoProducers/python/ALCARECOPromptCalibProdSiStripGainsAAG_cff.py b/Calibration/TkAlCaRecoProducers/python/ALCARECOPromptCalibProdSiStripGainsAAG_cff.py index cf2d4c0223d2d..cf7ccca0cec34 100644 --- a/Calibration/TkAlCaRecoProducers/python/ALCARECOPromptCalibProdSiStripGainsAAG_cff.py +++ b/Calibration/TkAlCaRecoProducers/python/ALCARECOPromptCalibProdSiStripGainsAAG_cff.py @@ -67,8 +67,7 @@ from RecoLocalTracker.SiPixelRecHits.SiPixelTemplateStoreESProducer_cfi import SiPixelTemplateStoreESProducer ALCARECOTrackFilterRefitAAG = cms.Sequence(ALCARECOCalibrationTracksAAG + offlineBeamSpot + - ALCARECOCalibrationTracksRefitAAG, - cms.Task(SiPixelTemplateStoreESProducer) ) + ALCARECOCalibrationTracksRefitAAG ) # ------------------------------------------------------------------------------ # This is the module actually doing the calibration diff --git a/Calibration/TkAlCaRecoProducers/python/ALCARECOSiPixelCalSingleMuonTight_cff.py b/Calibration/TkAlCaRecoProducers/python/ALCARECOSiPixelCalSingleMuonTight_cff.py index 72f37bf57bb0c..9bed193180521 100644 --- a/Calibration/TkAlCaRecoProducers/python/ALCARECOSiPixelCalSingleMuonTight_cff.py +++ b/Calibration/TkAlCaRecoProducers/python/ALCARECOSiPixelCalSingleMuonTight_cff.py @@ -78,8 +78,7 @@ ################################################################## from RecoLocalTracker.SiPixelRecHits.SiPixelTemplateStoreESProducer_cfi import SiPixelTemplateStoreESProducer ALCARECOSiPixelCalSingleMuonTightOffTrackClusters = cms.Sequence(ALCARECOSiPixelCalSingleMuonTightTracksRefit + - closebyPixelClusters , - cms.Task(SiPixelTemplateStoreESProducer)) + closebyPixelClusters) ################################################################## # Producer of distances value map diff --git a/DQM/SiPixelPhase1Config/python/SiPixelPhase1OfflineDQM_source_cff.py b/DQM/SiPixelPhase1Config/python/SiPixelPhase1OfflineDQM_source_cff.py index 982bcde17f748..a83ad5b1046cc 100644 --- a/DQM/SiPixelPhase1Config/python/SiPixelPhase1OfflineDQM_source_cff.py +++ b/DQM/SiPixelPhase1Config/python/SiPixelPhase1OfflineDQM_source_cff.py @@ -39,8 +39,7 @@ + SiPixelPhase1RecHitsAnalyzer + SiPixelPhase1TrackResidualsAnalyzer + SiPixelPhase1TrackClustersAnalyzer - + SiPixelPhase1TrackEfficiencyAnalyzer, - cms.Task(SiPixelTemplateStoreESProducer) + + SiPixelPhase1TrackEfficiencyAnalyzer ) diff --git a/DQM/SiPixelPhase1Config/python/SiPixelPhase1OnlineDQM_Timing_cff.py b/DQM/SiPixelPhase1Config/python/SiPixelPhase1OnlineDQM_Timing_cff.py index e268b8062f012..f1c4268f8eb2c 100644 --- a/DQM/SiPixelPhase1Config/python/SiPixelPhase1OnlineDQM_Timing_cff.py +++ b/DQM/SiPixelPhase1Config/python/SiPixelPhase1OnlineDQM_Timing_cff.py @@ -115,8 +115,7 @@ + SiPixelPhase1ClustersAnalyzer + SiPixelPhase1RawDataAnalyzer + SiPixelPhase1TrackClustersAnalyzer - + SiPixelPhase1TrackResidualsAnalyzer, - cms.Task(SiPixelTemplateStoreESProducer) + + SiPixelPhase1TrackResidualsAnalyzer ) siPixelPhase1OnlineDQM_harvesting = cms.Sequence( @@ -150,8 +149,7 @@ + SiPixelPhase1ClustersAnalyzer + SiPixelPhase1RawDataAnalyzer + SiPixelPhase1TrackClustersAnalyzer_cosmics - + SiPixelPhase1TrackResidualsAnalyzer_cosmics, - cms.Task(SiPixelTemplateStoreESProducer) + + SiPixelPhase1TrackResidualsAnalyzer_cosmics ) ## Additional settings for pp_run (Phase 0 test) @@ -179,7 +177,6 @@ + SiPixelPhase1RawDataAnalyzer + SiPixelPhase1TrackClustersAnalyzer_pprun + SiPixelPhase1TrackResidualsAnalyzer_pprun - + SiPixelPhase1TrackEfficiencyAnalyzer_pprun, - cms.Task(SiPixelTemplateStoreESProducer) + + SiPixelPhase1TrackEfficiencyAnalyzer_pprun ) diff --git a/DQM/SiPixelPhase1Config/python/SiPixelPhase1OnlineDQM_cff.py b/DQM/SiPixelPhase1Config/python/SiPixelPhase1OnlineDQM_cff.py index 5e9cc8a6a9a3b..e5047911f33fa 100644 --- a/DQM/SiPixelPhase1Config/python/SiPixelPhase1OnlineDQM_cff.py +++ b/DQM/SiPixelPhase1Config/python/SiPixelPhase1OnlineDQM_cff.py @@ -88,7 +88,6 @@ + SiPixelPhase1TrackClustersAnalyzer + SiPixelPhase1TrackResidualsAnalyzer # + SiPixelPhase1GeometryDebugAnalyzer - , cms.Task(SiPixelTemplateStoreESProducer) ) siPixelPhase1OnlineDQM_harvesting = cms.Sequence( @@ -122,8 +121,7 @@ + SiPixelPhase1ClustersAnalyzer + SiPixelPhase1RawDataAnalyzer + SiPixelPhase1TrackClustersAnalyzer_cosmics - + SiPixelPhase1TrackResidualsAnalyzer_cosmics, - cms.Task(SiPixelTemplateStoreESProducer) + + SiPixelPhase1TrackResidualsAnalyzer_cosmics ) ## Additional settings for pp_run @@ -146,8 +144,7 @@ + SiPixelPhase1ClustersAnalyzer + SiPixelPhase1RawDataAnalyzer + SiPixelPhase1TrackClustersAnalyzer_pprun - + SiPixelPhase1TrackResidualsAnalyzer_pprun, - cms.Task(SiPixelTemplateStoreESProducer) + + SiPixelPhase1TrackResidualsAnalyzer_pprun ) siPixelPhase1OnlineDQM_timing_harvesting = siPixelPhase1OnlineDQM_harvesting.copyAndExclude([ diff --git a/FastSimulation/Configuration/python/Reconstruction_BefMix_cff.py b/FastSimulation/Configuration/python/Reconstruction_BefMix_cff.py index b91aa1dd999e8..eb1d27571f5df 100644 --- a/FastSimulation/Configuration/python/Reconstruction_BefMix_cff.py +++ b/FastSimulation/Configuration/python/Reconstruction_BefMix_cff.py @@ -49,6 +49,5 @@ * fastMatchedTrackerRecHits * fastMatchedTrackerRecHitCombinations * MeasurementTrackerEvent - * iterTracking, - cms.Task(SiPixelTemplateStoreESProducer) + * iterTracking ) diff --git a/RecoHI/HiTracking/python/HighPtTracking_PbPb_cff.py b/RecoHI/HiTracking/python/HighPtTracking_PbPb_cff.py index a499ad0f192a2..fcbb7b7b1282f 100644 --- a/RecoHI/HiTracking/python/HighPtTracking_PbPb_cff.py +++ b/RecoHI/HiTracking/python/HighPtTracking_PbPb_cff.py @@ -32,5 +32,4 @@ , hiPrimTrackCandidates , hiGlobalPrimTracks , hiTracksWithQualityTask - , SiPixelTemplateStoreESProducer ) diff --git a/RecoTracker/FinalTrackSelectors/python/MergeTrackCollections_cff.py b/RecoTracker/FinalTrackSelectors/python/MergeTrackCollections_cff.py index 51c6934d93aab..907e3126a5cd7 100644 --- a/RecoTracker/FinalTrackSelectors/python/MergeTrackCollections_cff.py +++ b/RecoTracker/FinalTrackSelectors/python/MergeTrackCollections_cff.py @@ -49,8 +49,7 @@ duplicateTrackCandidates, mergedDuplicateTracks, duplicateTrackClassifier, - generalTracks, - SiPixelTemplateStoreESProducer + generalTracks ) generalTracksSequence = cms.Sequence(generalTracksTask) diff --git a/RecoTracker/SpecialSeedGenerators/python/cosmicDC_cff.py b/RecoTracker/SpecialSeedGenerators/python/cosmicDC_cff.py index 68a500fb115fc..978cb0b9d24ad 100644 --- a/RecoTracker/SpecialSeedGenerators/python/cosmicDC_cff.py +++ b/RecoTracker/SpecialSeedGenerators/python/cosmicDC_cff.py @@ -52,6 +52,5 @@ ) # Final Sequence -from RecoLocalTracker.SiPixelRecHits.SiPixelTemplateStoreESProducer_cfi import SiPixelTemplateStoreESProducer -cosmicDCTracksSeqTask = cms.Task( cosmicDCSeeds , cosmicDCCkfTrackCandidates , cosmicDCTracks , SiPixelTemplateStoreESProducer ) +cosmicDCTracksSeqTask = cms.Task( cosmicDCSeeds , cosmicDCCkfTrackCandidates , cosmicDCTracks ) cosmicDCTracksSeq = cms.Sequence(cosmicDCTracksSeqTask) From 06cb627add4eef9a5382fd1c0ae55adf78a60e6c Mon Sep 17 00:00:00 2001 From: mmusich Date: Thu, 24 Aug 2023 19:19:51 +0200 Subject: [PATCH 3/3] remove a bunch of useless includes of SiPixelTemplateStoreESProducer_cfi --- .../OfflineValidation/python/TkAlAllInOneTool/JetHT_cfg.py | 3 --- .../OfflineValidation/python/TkAlAllInOneTool/SplitV_cfg.py | 1 - .../python/ALCARECOPromptCalibProdSiPixelLorentzAngle_cff.py | 1 - .../python/ALCARECOPromptCalibProdSiStripGainsAAG_cff.py | 1 - .../python/ALCARECOSiPixelCalSingleMuonTight_cff.py | 1 - 5 files changed, 7 deletions(-) diff --git a/Alignment/OfflineValidation/python/TkAlAllInOneTool/JetHT_cfg.py b/Alignment/OfflineValidation/python/TkAlAllInOneTool/JetHT_cfg.py index 14cc483eedcdb..266d61d6289c7 100644 --- a/Alignment/OfflineValidation/python/TkAlAllInOneTool/JetHT_cfg.py +++ b/Alignment/OfflineValidation/python/TkAlAllInOneTool/JetHT_cfg.py @@ -300,6 +300,3 @@ process.TrackRefitter + process.offlinePrimaryVerticesFromRefittedTrks + process.jetHTAnalyzer) - - - diff --git a/Alignment/OfflineValidation/python/TkAlAllInOneTool/SplitV_cfg.py b/Alignment/OfflineValidation/python/TkAlAllInOneTool/SplitV_cfg.py index 00c651df40961..6ff3e9878f363 100644 --- a/Alignment/OfflineValidation/python/TkAlAllInOneTool/SplitV_cfg.py +++ b/Alignment/OfflineValidation/python/TkAlAllInOneTool/SplitV_cfg.py @@ -196,7 +196,6 @@ ) print("Saving the output at %s" % process.TFileService.fileName.value()) - process.theValidSequence = cms.Sequence(process.offlineBeamSpot + process.TrackRefitter + process.offlinePrimaryVerticesFromRefittedTrks + diff --git a/Calibration/TkAlCaRecoProducers/python/ALCARECOPromptCalibProdSiPixelLorentzAngle_cff.py b/Calibration/TkAlCaRecoProducers/python/ALCARECOPromptCalibProdSiPixelLorentzAngle_cff.py index f339cda514359..8bceb8b0f9024 100644 --- a/Calibration/TkAlCaRecoProducers/python/ALCARECOPromptCalibProdSiPixelLorentzAngle_cff.py +++ b/Calibration/TkAlCaRecoProducers/python/ALCARECOPromptCalibProdSiPixelLorentzAngle_cff.py @@ -62,7 +62,6 @@ ) # The actual sequence -from RecoLocalTracker.SiPixelRecHits.SiPixelTemplateStoreESProducer_cfi import * seqALCARECOPromptCalibProdSiPixelLorentzAngle = cms.Sequence( ALCARECOCalSignleMuonFilterForSiPixelLorentzAngle * ALCARECOPixelLATrackFilterRefit * diff --git a/Calibration/TkAlCaRecoProducers/python/ALCARECOPromptCalibProdSiStripGainsAAG_cff.py b/Calibration/TkAlCaRecoProducers/python/ALCARECOPromptCalibProdSiStripGainsAAG_cff.py index cf7ccca0cec34..88bb2c13c3a70 100644 --- a/Calibration/TkAlCaRecoProducers/python/ALCARECOPromptCalibProdSiStripGainsAAG_cff.py +++ b/Calibration/TkAlCaRecoProducers/python/ALCARECOPromptCalibProdSiStripGainsAAG_cff.py @@ -64,7 +64,6 @@ # refit and BS can be dropped if done together with RECO. # track filter can be moved in acalreco if no other users -from RecoLocalTracker.SiPixelRecHits.SiPixelTemplateStoreESProducer_cfi import SiPixelTemplateStoreESProducer ALCARECOTrackFilterRefitAAG = cms.Sequence(ALCARECOCalibrationTracksAAG + offlineBeamSpot + ALCARECOCalibrationTracksRefitAAG ) diff --git a/Calibration/TkAlCaRecoProducers/python/ALCARECOSiPixelCalSingleMuonTight_cff.py b/Calibration/TkAlCaRecoProducers/python/ALCARECOSiPixelCalSingleMuonTight_cff.py index 9bed193180521..88e76099e8a53 100644 --- a/Calibration/TkAlCaRecoProducers/python/ALCARECOSiPixelCalSingleMuonTight_cff.py +++ b/Calibration/TkAlCaRecoProducers/python/ALCARECOSiPixelCalSingleMuonTight_cff.py @@ -76,7 +76,6 @@ ################################################################## # Sequence: track refit + close-by-pixel producer ################################################################## -from RecoLocalTracker.SiPixelRecHits.SiPixelTemplateStoreESProducer_cfi import SiPixelTemplateStoreESProducer ALCARECOSiPixelCalSingleMuonTightOffTrackClusters = cms.Sequence(ALCARECOSiPixelCalSingleMuonTightTracksRefit + closebyPixelClusters)