From 4a1417a6a6d48252f47106afdf07db51e5961058 Mon Sep 17 00:00:00 2001 From: mmusich Date: Thu, 30 May 2024 10:41:02 +0200 Subject: [PATCH] add fillDescriptions to a bunch of RECO plugins used at HLT --- .../DTRawToDigi/plugins/DTuROSRawToDigi.cc | 2 +- .../src/RawDataCollectorByLabel.cc | 2 +- ...TkMuonMaskedMeasurementTrackerEvent_cfi.py | 1 - .../modules/hltSiPixelRecHits_cfi.py | 1 - .../python/customizeHLTforCMSSW.py | 21 ++++++++ .../CSCSegment/src/CSCSegmentBuilder.cc | 35 +++++++++++-- .../CSCSegment/src/CSCSegmentBuilder.h | 10 ++-- .../CSCSegment/src/CSCSegmentProducer.cc | 23 ++++++--- .../CSCSegment/src/CSCSegmentProducer.h | 5 ++ .../plugins/SiPixelRecHitConverter.cc | 11 ++++ .../python/SiPixelRecHits_cfi.py | 3 +- .../plugins/SiStripClusterizer.cc | 17 +++++++ .../plugins/SiStripClusterizer.h | 3 ++ .../src/JetCoreClusterSplitter.cc | 15 +++--- .../interface/CSCHaloDataProducer.h | 6 ++- .../interface/EcalHaloDataProducer.h | 6 ++- .../interface/GlobalHaloDataProducer.h | 4 ++ .../interface/HcalHaloDataProducer.h | 6 ++- .../METProducers/python/EcalHaloData_cfi.py | 5 +- .../METProducers/python/HcalHaloData_cfi.py | 7 +-- .../METProducers/src/CSCHaloDataProducer.cc | 50 ++++++++++++++++++- .../METProducers/src/EcalHaloDataProducer.cc | 21 ++++++-- .../src/GlobalHaloDataProducer.cc | 40 +++++++++++++++ .../METProducers/src/HcalHaloDataProducer.cc | 15 +++++- .../plugins/CosmicMuonSeedGenerator.cc | 13 +++++ .../plugins/CosmicMuonSeedGenerator.h | 5 ++ .../interface/MuonSegmentMatcher.h | 3 ++ .../TrackingTools/src/MuonSegmentMatcher.cc | 9 ++++ .../plugins/LightPFTrackProducer.cc | 2 + .../plugins/TrackListMerger.cc | 39 ++++++++++++++- .../MaskedMeasurementTrackerEventProducer.cc | 32 ++++++++---- .../TkSeedGenerator/plugins/SeedCombiner.h | 6 ++- .../plugins/PixelVertexProducer.cc | 47 ++++++++++++++--- 33 files changed, 392 insertions(+), 73 deletions(-) diff --git a/EventFilter/DTRawToDigi/plugins/DTuROSRawToDigi.cc b/EventFilter/DTRawToDigi/plugins/DTuROSRawToDigi.cc index 7bbaf0b3ca2a2..91b307a3f3b3d 100644 --- a/EventFilter/DTRawToDigi/plugins/DTuROSRawToDigi.cc +++ b/EventFilter/DTRawToDigi/plugins/DTuROSRawToDigi.cc @@ -43,7 +43,7 @@ DTuROSRawToDigi::DTuROSRawToDigi(const edm::ParameterSet& pset) { void DTuROSRawToDigi::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { edm::ParameterSetDescription desc; - desc.add("inputLabel"); + desc.add("inputLabel", edm::InputTag("rawDataCollector")); desc.addUntracked("debug", false); descriptions.addWithDefaultLabel(desc); } diff --git a/EventFilter/RawDataCollector/src/RawDataCollectorByLabel.cc b/EventFilter/RawDataCollector/src/RawDataCollectorByLabel.cc index bca2083e57e1c..f6457acb70ecb 100644 --- a/EventFilter/RawDataCollector/src/RawDataCollectorByLabel.cc +++ b/EventFilter/RawDataCollector/src/RawDataCollectorByLabel.cc @@ -34,7 +34,7 @@ RawDataCollectorByLabel::RawDataCollectorByLabel(const edm::ParameterSet &pset) void RawDataCollectorByLabel::fillDescriptions(edm::ConfigurationDescriptions &descriptions) { edm::ParameterSetDescription desc; - desc.add >("RawCollectionList"); + desc.add >("RawCollectionList", {edm::InputTag("SiStripDigiToZSRaw", "rawDataCollector")}); desc.addUntracked("verbose", 0); descriptions.addWithDefaultLabel(desc); } diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/hltIter2Phase2L3FromL1TkMuonMaskedMeasurementTrackerEvent_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/hltIter2Phase2L3FromL1TkMuonMaskedMeasurementTrackerEvent_cfi.py index 4c21c9e410770..ec464e133b5c1 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/modules/hltIter2Phase2L3FromL1TkMuonMaskedMeasurementTrackerEvent_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/modules/hltIter2Phase2L3FromL1TkMuonMaskedMeasurementTrackerEvent_cfi.py @@ -1,7 +1,6 @@ import FWCore.ParameterSet.Config as cms hltIter2Phase2L3FromL1TkMuonMaskedMeasurementTrackerEvent = cms.EDProducer("MaskedMeasurementTrackerEventProducer", - OnDemand = cms.bool(False), phase2clustersToSkip = cms.InputTag("hltIter2Phase2L3FromL1TkMuonClustersRefRemoval"), src = cms.InputTag("hltMeasurementTrackerEvent") ) diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/hltSiPixelRecHits_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/hltSiPixelRecHits_cfi.py index 98e1ba1899408..f0248206f35a6 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/modules/hltSiPixelRecHits_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/modules/hltSiPixelRecHits_cfi.py @@ -2,7 +2,6 @@ hltSiPixelRecHits = cms.EDProducer("SiPixelRecHitConverter", CPE = cms.string('PixelCPEGeneric'), - VerboseLevel = cms.untracked.int32(0), src = cms.InputTag("hltSiPixelClusters") ) diff --git a/HLTrigger/Configuration/python/customizeHLTforCMSSW.py b/HLTrigger/Configuration/python/customizeHLTforCMSSW.py index 3d37a07194f46..044f25fb963ef 100644 --- a/HLTrigger/Configuration/python/customizeHLTforCMSSW.py +++ b/HLTrigger/Configuration/python/customizeHLTforCMSSW.py @@ -65,6 +65,25 @@ def customizeHLTfor46935(process): delattr(prod, 'recHitsLabelCPUEE') return process + +def customizeHLTfor47017(process): + """Remove unneeded parameters from the HLT menu""" + for prod in producers_by_type(process, 'MaskedMeasurementTrackerEventProducer'): + if hasattr(prod, 'OnDemand'): + delattr(prod, 'OnDemand') + + for prod in producers_by_type(process, 'HcalHaloDataProducer'): + if hasattr(prod, 'HcalMaxMatchingRadiusParam'): + delattr(prod, 'HcalMaxMatchingRadiusParam') + if hasattr(prod, 'HcalMinMatchingRadiusParam'): + delattr(prod, 'HcalMinMatchingRadiusParam') + + for prod in producers_by_type(process, 'SiPixelRecHitConverter'): + if hasattr(prod, 'VerboseLevel'): + delattr(prod, 'VerboseLevel') + + return process + # CMSSW version specific customizations def customizeHLTforCMSSW(process, menuType="GRun"): @@ -74,5 +93,7 @@ def customizeHLTforCMSSW(process, menuType="GRun"): # process = customiseFor12718(process) process = customizeHLTfor46935(process) + process = customizeHLTfor47017(process) return process + diff --git a/RecoLocalMuon/CSCSegment/src/CSCSegmentBuilder.cc b/RecoLocalMuon/CSCSegment/src/CSCSegmentBuilder.cc index 1aa82c2383975..1cd47660fd489 100644 --- a/RecoLocalMuon/CSCSegment/src/CSCSegmentBuilder.cc +++ b/RecoLocalMuon/CSCSegment/src/CSCSegmentBuilder.cc @@ -23,7 +23,7 @@ CSCSegmentBuilder::CSCSegmentBuilder(const edm::ParameterSet& ps) : geom_(nullpt int chosenAlgo = ps.getParameter("algo_type") - 1; // Find appropriate ParameterSets for each algo type - std::vector algoPSets = ps.getParameter >("algo_psets"); + std::vector algoPSets = ps.getParameter>("algo_psets"); // Now load the right parameter set // Algo name @@ -33,14 +33,14 @@ CSCSegmentBuilder::CSCSegmentBuilder(const edm::ParameterSet& ps) : geom_(nullpt // SegAlgo parameter set std::vector segAlgoPSet = - algoPSets[chosenAlgo].getParameter >("algo_psets"); + algoPSets[chosenAlgo].getParameter>("algo_psets"); // Chamber types to handle - std::vector chType = algoPSets[chosenAlgo].getParameter >("chamber_types"); + std::vector chType = algoPSets[chosenAlgo].getParameter>("chamber_types"); LogDebug("CSCSegment|CSC") << "No. of chamber types to handle: " << chType.size(); // Algo to chamber type - std::vector algoToType = algoPSets[chosenAlgo].getParameter >("parameters_per_chamber_type"); + std::vector algoToType = algoPSets[chosenAlgo].getParameter>("parameters_per_chamber_type"); // Trap if we don't have enough parameter sets or haven't assigned an algo to every type if (algoToType.size() != chType.size()) { @@ -101,3 +101,30 @@ void CSCSegmentBuilder::build(const CSCRecHit2DCollection* recHits, CSCSegmentCo } void CSCSegmentBuilder::setGeometry(const CSCGeometry* geom) { geom_ = geom; } + +void CSCSegmentBuilder::fillPSetDescription(edm::ParameterSetDescription& desc) { + /// Top-level parameters + desc.add("algo_type", 1); + + // Define the nested PSet for individual configurations + edm::ParameterSetDescription algoPSet; + algoPSet.add>("parameters_per_chamber_type", {1, 2, 3, 4, 5, 6, 5, 6, 5, 6}); + + // Define the VPSet inside algo_psets + edm::ParameterSetDescription innerPSet; + // Allow any parameter in the innerPSet + innerPSet.setAllowAnything(); + + // Fill the VPSet for algo_psets + edm::ParameterSetDescription innerAlgoPSet; + innerAlgoPSet.addVPSet("algo_psets", innerPSet); + + // Additional top-level keys + algoPSet.addVPSet("algo_psets", innerPSet); + algoPSet.add("algo_name", "CSCSegAlgoRU"); + algoPSet.add>( + "chamber_types", {"ME1/a", "ME1/b", "ME1/2", "ME1/3", "ME2/1", "ME2/2", "ME3/1", "ME3/2", "ME4/1", "ME4/2"}); + + // Add to the top-level VPSet + desc.addVPSet("algo_psets", algoPSet); +} diff --git a/RecoLocalMuon/CSCSegment/src/CSCSegmentBuilder.h b/RecoLocalMuon/CSCSegment/src/CSCSegmentBuilder.h index 938554ca37393..478b364524f14 100644 --- a/RecoLocalMuon/CSCSegment/src/CSCSegmentBuilder.h +++ b/RecoLocalMuon/CSCSegment/src/CSCSegmentBuilder.h @@ -14,10 +14,10 @@ * */ -#include -#include - -#include +#include "DataFormats/CSCRecHit/interface/CSCRecHit2DCollection.h" +#include "DataFormats/CSCRecHit/interface/CSCSegmentCollection.h" +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/ParameterSet/interface/ParameterSetDescription.h" class CSCGeometry; class CSCSegmentAlgorithm; @@ -32,6 +32,8 @@ class CSCSegmentBuilder { /// Destructor ~CSCSegmentBuilder(); + static void fillPSetDescription(edm::ParameterSetDescription& desc); + /** Find rechits in each CSCChamber, build CSCSegment's in each chamber, * and fill into output collection. */ diff --git a/RecoLocalMuon/CSCSegment/src/CSCSegmentProducer.cc b/RecoLocalMuon/CSCSegment/src/CSCSegmentProducer.cc index 310ced6db7122..7ed58519b7733 100644 --- a/RecoLocalMuon/CSCSegment/src/CSCSegmentProducer.cc +++ b/RecoLocalMuon/CSCSegment/src/CSCSegmentProducer.cc @@ -2,16 +2,16 @@ * */ -#include -#include +#include "RecoLocalMuon/CSCSegment/src/CSCSegmentProducer.h" +#include "RecoLocalMuon/CSCSegment/src/CSCSegmentBuilder.h" -#include -#include -#include -#include +#include "DataFormats/Common/interface/Handle.h" +#include "FWCore/Framework/interface/ESHandle.h" +#include "FWCore/Utilities/interface/InputTag.h" +#include "FWCore/MessageLogger/interface/MessageLogger.h" -#include -#include +#include "DataFormats/CSCRecHit/interface/CSCSegmentCollection.h" +#include "DataFormats/CSCRecHit/interface/CSCSegment.h" CSCSegmentProducer::CSCSegmentProducer(const edm::ParameterSet& pas) : iev(0) { m_token = consumes(pas.getParameter("inputObjects")); @@ -22,6 +22,13 @@ CSCSegmentProducer::CSCSegmentProducer(const edm::ParameterSet& pas) : iev(0) { produces(); } +void CSCSegmentProducer::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { + edm::ParameterSetDescription desc; + desc.add("inputObjects", edm::InputTag("csc2DRecHits")); + CSCSegmentBuilder::fillPSetDescription(desc); + descriptions.addWithDefaultLabel(desc); +} + CSCSegmentProducer::~CSCSegmentProducer() { LogDebug("CSCSegment|CSC") << "deleting CSCSegmentBuilder after " << iev << " events w/csc data."; delete segmentBuilder_; diff --git a/RecoLocalMuon/CSCSegment/src/CSCSegmentProducer.h b/RecoLocalMuon/CSCSegment/src/CSCSegmentProducer.h index e98c668f58546..b1ad175c46c8b 100644 --- a/RecoLocalMuon/CSCSegment/src/CSCSegmentProducer.h +++ b/RecoLocalMuon/CSCSegment/src/CSCSegmentProducer.h @@ -16,6 +16,9 @@ #include "DataFormats/CSCRecHit/interface/CSCRecHit2DCollection.h" #include "Geometry/Records/interface/MuonGeometryRecord.h" #include "Geometry/CSCGeometry/interface/CSCGeometry.h" +#include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h" +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/ParameterSet/interface/ParameterSetDescription.h" class CSCSegmentBuilder; @@ -28,6 +31,8 @@ class CSCSegmentProducer : public edm::stream::EDProducer<> { /// Produce the CSCSegment collection void produce(edm::Event&, const edm::EventSetup&) override; + static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); + private: int iev; // events through CSCSegmentBuilder* segmentBuilder_; diff --git a/RecoLocalTracker/SiPixelRecHits/plugins/SiPixelRecHitConverter.cc b/RecoLocalTracker/SiPixelRecHits/plugins/SiPixelRecHitConverter.cc index 2c9c773598b62..1880d144ad566 100644 --- a/RecoLocalTracker/SiPixelRecHits/plugins/SiPixelRecHitConverter.cc +++ b/RecoLocalTracker/SiPixelRecHits/plugins/SiPixelRecHitConverter.cc @@ -56,7 +56,9 @@ #include "FWCore/Framework/interface/MakerMacros.h" #include "DataFormats/Common/interface/Handle.h" #include "FWCore/Framework/interface/ESHandle.h" +#include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/ParameterSet/interface/ParameterSetDescription.h" #include "FWCore/Utilities/interface/InputTag.h" #include "FWCore/Utilities/interface/EDPutToken.h" #include "FWCore/Utilities/interface/ESGetToken.h" @@ -95,6 +97,8 @@ namespace cms { explicit SiPixelRecHitConverter(const edm::ParameterSet& conf); ~SiPixelRecHitConverter() override; + static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); + //--- Factory method to make CPE's depending on the ParameterSet //--- Not sure if we need to make more than one CPE to run concurrently //--- on different parts of the detector (e.g., one for the barrel and the @@ -254,6 +258,13 @@ namespace cms { << " SiPixelClusters into SiPixelRecHits, in " << numberOfDetUnits << " DetUnits."; } + + void SiPixelRecHitConverter::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { + edm::ParameterSetDescription desc; + desc.add("src", edm::InputTag("siPixelClusters")); + desc.add("CPE", "PixelCPEGeneric"); + descriptions.addWithDefaultLabel(desc); + } } // end of namespace cms using cms::SiPixelRecHitConverter; diff --git a/RecoLocalTracker/SiPixelRecHits/python/SiPixelRecHits_cfi.py b/RecoLocalTracker/SiPixelRecHits/python/SiPixelRecHits_cfi.py index cb539a2b1c6e4..012d8918c0ad6 100644 --- a/RecoLocalTracker/SiPixelRecHits/python/SiPixelRecHits_cfi.py +++ b/RecoLocalTracker/SiPixelRecHits/python/SiPixelRecHits_cfi.py @@ -7,8 +7,7 @@ # legacy pixel rechit producer siPixelRecHits = cms.EDProducer("SiPixelRecHitConverter", src = cms.InputTag("siPixelClusters"), - CPE = cms.string('PixelCPEGeneric'), - VerboseLevel = cms.untracked.int32(0) + CPE = cms.string('PixelCPEGeneric') ) # SwitchProducer wrapping the legacy pixel rechit producer diff --git a/RecoLocalTracker/SiStripClusterizer/plugins/SiStripClusterizer.cc b/RecoLocalTracker/SiStripClusterizer/plugins/SiStripClusterizer.cc index 200085bbfafba..cd05ca4b43a62 100644 --- a/RecoLocalTracker/SiStripClusterizer/plugins/SiStripClusterizer.cc +++ b/RecoLocalTracker/SiStripClusterizer/plugins/SiStripClusterizer.cc @@ -36,6 +36,23 @@ void SiStripClusterizer::produce(edm::Event& event, const edm::EventSetup& es) { event.put(std::move(output)); } +void SiStripClusterizer::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { + edm::ParameterSetDescription desc; + desc.add>("DigiProducersList", + {edm::InputTag("siStripDigis", "ZeroSuppressed"), + edm::InputTag("siStripZeroSuppression", "VirginRaw"), + edm::InputTag("siStripZeroSuppression", "ProcessedRaw"), + edm::InputTag("siStripZeroSuppression", "ScopeMode")}); + + { + edm::ParameterSetDescription ClusterizerPSet; + StripClusterizerAlgorithmFactory::fillDescriptions(ClusterizerPSet); + desc.add("Clusterizer", ClusterizerPSet); + } + + descriptions.addWithDefaultLabel(desc); +} + template inline bool SiStripClusterizer::findInput(const edm::EDGetTokenT& tag, edm::Handle& handle, const edm::Event& e) { e.getByToken(tag, handle); diff --git a/RecoLocalTracker/SiStripClusterizer/plugins/SiStripClusterizer.h b/RecoLocalTracker/SiStripClusterizer/plugins/SiStripClusterizer.h index e1a52fb78c2b1..87c198209fe83 100644 --- a/RecoLocalTracker/SiStripClusterizer/plugins/SiStripClusterizer.h +++ b/RecoLocalTracker/SiStripClusterizer/plugins/SiStripClusterizer.h @@ -4,7 +4,9 @@ #include "FWCore/Framework/interface/Frameworkfwd.h" #include "FWCore/Framework/interface/stream/EDProducer.h" #include "RecoLocalTracker/SiStripClusterizer/interface/StripClusterizerAlgorithm.h" +#include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/ParameterSet/interface/ParameterSetDescription.h" #include "FWCore/Utilities/interface/InputTag.h" #include @@ -14,6 +16,7 @@ class SiStripClusterizer : public edm::stream::EDProducer<> { public: explicit SiStripClusterizer(const edm::ParameterSet& conf); void produce(edm::Event&, const edm::EventSetup&) override; + static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); private: template diff --git a/RecoLocalTracker/SubCollectionProducers/src/JetCoreClusterSplitter.cc b/RecoLocalTracker/SubCollectionProducers/src/JetCoreClusterSplitter.cc index 6730c8946c49e..03329eb0258b0 100644 --- a/RecoLocalTracker/SubCollectionProducers/src/JetCoreClusterSplitter.cc +++ b/RecoLocalTracker/SubCollectionProducers/src/JetCoreClusterSplitter.cc @@ -1,14 +1,14 @@ #include "FWCore/Framework/interface/stream/EDProducer.h" +#include "DataFormats/Common/interface/DetSetVectorNew.h" +#include "DataFormats/Common/interface/Handle.h" +#include "DataFormats/SiPixelCluster/interface/SiPixelCluster.h" +#include "FWCore/Framework/interface/ESHandle.h" #include "FWCore/Framework/interface/Event.h" #include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "FWCore/ParameterSet/interface/ParameterSetDescription.h" #include "FWCore/Utilities/interface/InputTag.h" -#include "DataFormats/Common/interface/Handle.h" -#include "FWCore/Framework/interface/ESHandle.h" -#include "DataFormats/SiPixelCluster/interface/SiPixelCluster.h" -#include "DataFormats/Common/interface/DetSetVectorNew.h" #include "RecoLocalTracker/ClusterParameterEstimator/interface/PixelClusterParameterEstimator.h" #include "RecoLocalTracker/Records/interface/TkPixelCPERecord.h" @@ -30,11 +30,12 @@ class JetCoreClusterSplitter : public edm::stream::EDProducer<> { public: - static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); JetCoreClusterSplitter(const edm::ParameterSet& iConfig); - ~JetCoreClusterSplitter() override; + ~JetCoreClusterSplitter() override = default; void produce(edm::Event& iEvent, const edm::EventSetup& iSetup) override; + static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); + private: bool split(const SiPixelCluster& aCluster, edmNew::DetSetVector::FastFiller& filler, @@ -129,8 +130,6 @@ JetCoreClusterSplitter::JetCoreClusterSplitter(const edm::ParameterSet& iConfig) produces>(); } -JetCoreClusterSplitter::~JetCoreClusterSplitter() {} - bool SortPixels(const SiPixelCluster::Pixel& i, const SiPixelCluster::Pixel& j) { return (i.adc > j.adc); } void JetCoreClusterSplitter::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) { diff --git a/RecoMET/METProducers/interface/CSCHaloDataProducer.h b/RecoMET/METProducers/interface/CSCHaloDataProducer.h index 50385a4d2b1b5..e054e40b65468 100644 --- a/RecoMET/METProducers/interface/CSCHaloDataProducer.h +++ b/RecoMET/METProducers/interface/CSCHaloDataProducer.h @@ -96,6 +96,8 @@ #include "FWCore/MessageLogger/interface/MessageLogger.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/ParameterSet/interface/ParameterSetDescription.h" +#include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h" #include "FWCore/PluginManager/interface/ModuleDef.h" #include "Geometry/CommonDetUnit/interface/GeomDet.h" @@ -130,7 +132,9 @@ namespace reco { class CSCHaloDataProducer : public edm::stream::EDProducer<> { public: explicit CSCHaloDataProducer(const edm::ParameterSet &); - ~CSCHaloDataProducer() override; + ~CSCHaloDataProducer() override = default; + + static void fillDescriptions(edm::ConfigurationDescriptions &descriptions); private: void produce(edm::Event &, const edm::EventSetup &) override; diff --git a/RecoMET/METProducers/interface/EcalHaloDataProducer.h b/RecoMET/METProducers/interface/EcalHaloDataProducer.h index a81cea5230a98..c884163aff402 100644 --- a/RecoMET/METProducers/interface/EcalHaloDataProducer.h +++ b/RecoMET/METProducers/interface/EcalHaloDataProducer.h @@ -76,6 +76,8 @@ #include "FWCore/MessageLogger/interface/MessageLogger.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/ParameterSet/interface/ParameterSetDescription.h" +#include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h" #include "FWCore/PluginManager/interface/ModuleDef.h" #include "Geometry/CaloGeometry/interface/CaloSubdetectorGeometry.h" @@ -94,7 +96,9 @@ namespace reco { class EcalHaloDataProducer : public edm::stream::EDProducer<> { public: explicit EcalHaloDataProducer(const edm::ParameterSet&); - ~EcalHaloDataProducer() override; + ~EcalHaloDataProducer() override = default; + + static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); private: void produce(edm::Event&, const edm::EventSetup&) override; diff --git a/RecoMET/METProducers/interface/GlobalHaloDataProducer.h b/RecoMET/METProducers/interface/GlobalHaloDataProducer.h index d2622f09b815f..9ad745c1485b5 100644 --- a/RecoMET/METProducers/interface/GlobalHaloDataProducer.h +++ b/RecoMET/METProducers/interface/GlobalHaloDataProducer.h @@ -129,7 +129,9 @@ #include "FWCore/Framework/interface/stream/EDProducer.h" #include "FWCore/MessageLogger/interface/MessageLogger.h" +#include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/ParameterSet/interface/ParameterSetDescription.h" #include "FWCore/PluginManager/interface/ModuleDef.h" #include "Geometry/CaloGeometry/interface/CaloSubdetectorGeometry.h" @@ -182,6 +184,8 @@ namespace reco { explicit GlobalHaloDataProducer(const edm::ParameterSet&); ~GlobalHaloDataProducer() override; + static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); + private: void produce(edm::Event&, const edm::EventSetup&) override; diff --git a/RecoMET/METProducers/interface/HcalHaloDataProducer.h b/RecoMET/METProducers/interface/HcalHaloDataProducer.h index f719cd54a9425..ee3c2274fd020 100644 --- a/RecoMET/METProducers/interface/HcalHaloDataProducer.h +++ b/RecoMET/METProducers/interface/HcalHaloDataProducer.h @@ -68,6 +68,8 @@ #include "FWCore/MessageLogger/interface/MessageLogger.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/ParameterSet/interface/ParameterSetDescription.h" +#include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h" #include "FWCore/PluginManager/interface/ModuleDef.h" #include "Geometry/CaloGeometry/interface/CaloSubdetectorGeometry.h" @@ -86,7 +88,9 @@ namespace reco { class HcalHaloDataProducer : public edm::stream::EDProducer<> { public: explicit HcalHaloDataProducer(const edm::ParameterSet&); - ~HcalHaloDataProducer() override; + ~HcalHaloDataProducer() override = default; + + static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); private: void produce(edm::Event&, const edm::EventSetup&) override; diff --git a/RecoMET/METProducers/python/EcalHaloData_cfi.py b/RecoMET/METProducers/python/EcalHaloData_cfi.py index aed45dee32e9e..c108eb34441a8 100644 --- a/RecoMET/METProducers/python/EcalHaloData_cfi.py +++ b/RecoMET/METProducers/python/EcalHaloData_cfi.py @@ -12,19 +12,16 @@ HBHERecHitLabel = cms.InputTag("hbhereco"), # Higher Level Reco SuperClusterLabel = cms.InputTag("correctedHybridSuperClusters"), -# SuperClusterLabel = cms.InputTag("cosmicSuperClusters","CosmicBarrelSuperClusters"), + #SuperClusterLabel = cms.InputTag("cosmicSuperClusters","CosmicBarrelSuperClusters"), PhotonLabel = cms.InputTag(""), - EBRecHitEnergyThresholdParam = cms.double(0.3), EERecHitEnergyThresholdParam = cms.double(0.3), ESRecHitEnergyThresholdParam = cms.double(0.3), SumEcalEnergyThresholdParam = cms.double(10.), NHitsEcalThresholdParam = cms.int32(4), - # Shower Shape cut parameters (defaults need to be optimized) RoundnessCutParam = cms.double(0.41), AngleCutParam = cms.double(0.51), - ) diff --git a/RecoMET/METProducers/python/HcalHaloData_cfi.py b/RecoMET/METProducers/python/HcalHaloData_cfi.py index 03873bc90330e..4e54fa2d6bde1 100644 --- a/RecoMET/METProducers/python/HcalHaloData_cfi.py +++ b/RecoMET/METProducers/python/HcalHaloData_cfi.py @@ -11,16 +11,11 @@ HBHERecHitLabel = cms.InputTag("hbhereco"), HORecHitLabel = cms.InputTag("horeco"), HFRecHitLabel = cms.InputTag("hfreco"), - caloTowerCollName = cms.InputTag('towerMaker'), - - HcalMinMatchingRadiusParam = cms.double(110.), - HcalMaxMatchingRadiusParam = cms.double(490.), HBRecHitEnergyThresholdParam = cms.double(0.5), HERecHitEnergyThresholdParam = cms.double(0.5), SumHcalEnergyThresholdParam = cms.double(18), - NHitsHcalThresholdParam = cms.int32(4), - + NHitsHcalThresholdParam = cms.int32(4) ) diff --git a/RecoMET/METProducers/src/CSCHaloDataProducer.cc b/RecoMET/METProducers/src/CSCHaloDataProducer.cc index d89ab6efcf155..4ccaf76676fbc 100644 --- a/RecoMET/METProducers/src/CSCHaloDataProducer.cc +++ b/RecoMET/METProducers/src/CSCHaloDataProducer.cc @@ -82,6 +82,54 @@ CSCHaloDataProducer::CSCHaloDataProducer(const edm::ParameterSet& iConfig) : CSC produces(); } +void CSCHaloDataProducer::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { + edm::ParameterSetDescription desc; + desc.add("L1MuGMTReadoutLabel", edm::InputTag("gtDigis")); + desc.add("HLTResultLabel", edm::InputTag("TriggerResults::HLT")); + desc.add >("HLTBitLabel", + {edm::InputTag("HLT_CSCBeamHalo"), + edm::InputTag("HLT_CSCBeamHaloOverlapRing1"), + edm::InputTag("HLT_CSCBeamHaloOverlapRing2"), + edm::InputTag("HLT_CSCBeamHaloRing2or3")}); + desc.add("CSCRecHitLabel", edm::InputTag("csc2DRecHits")); + desc.add("HBHErhLabel", edm::InputTag("hbhereco")); + desc.add("ECALBrhLabel", edm::InputTag("ecalRecHit", "EcalRecHitsEB")); + desc.add("ECALErhLabel", edm::InputTag("ecalRecHit", "EcalRecHitsEE")); + desc.add("CSCSegmentLabel", edm::InputTag("cscSegments")); + desc.add("CosmicMuonLabel", edm::InputTag("muonsFromCosmics")); + desc.add("MuonLabel", edm::InputTag("muons")); + desc.add("SALabel", edm::InputTag("standAloneMuons")); + desc.add("ALCTDigiLabel", edm::InputTag("muonCSCDigis", "MuonCSCALCTDigi")); + + { + edm::ParameterSetDescription matchParametersPSet; + MuonSegmentMatcher::fillPSetDescription(matchParametersPSet); + desc.add("MatchParameters", matchParametersPSet); + } + + desc.add("DetaParam", 0.1); + desc.add("DphiParam", 1.00); + desc.add("InnerRMinParam", 0.); + desc.add("InnerRMaxParam", 99999.); + desc.add("OuterRMinParam", 0.); + desc.add("OuterRMaxParam", 99999.); + desc.add("NormChi2Param", 8.); + desc.add("MaxSegmentRDiff", 10.0); + desc.add("MaxSegmentPhiDiff", 0.1); + desc.add("MaxSegmentTheta", 0.7); + desc.add("MaxDtMuonSegment", -10.0); + desc.add("MaxFreeInverseBeta", 0.0); + desc.add("ExpectedBX", 6); + desc.add("RecHitTime0", 0.); + desc.add("RecHitTimeWindow", 25.); + desc.add("MinOuterMomentumTheta", .10); + desc.add("MaxOuterMomentumTheta", 3.0); + desc.add("MatchingDPhiThreshold", 0.18); + desc.add("MatchingDEtaThreshold", 0.4); + desc.add("MatchingDWireThreshold", 5); + descriptions.addWithDefaultLabel(desc); +} + void CSCHaloDataProducer::produce(Event& iEvent, const EventSetup& iSetup) { //Get CSC Geometry edm::ESHandle TheCSCGeometry = iSetup.getHandle(cscGeometry_token); @@ -158,5 +206,3 @@ void CSCHaloDataProducer::produce(Event& iEvent, const EventSetup& iSetup) { iSetup))); return; } - -CSCHaloDataProducer::~CSCHaloDataProducer() {} diff --git a/RecoMET/METProducers/src/EcalHaloDataProducer.cc b/RecoMET/METProducers/src/EcalHaloDataProducer.cc index 29e8f5d63371c..70f76802333ae 100644 --- a/RecoMET/METProducers/src/EcalHaloDataProducer.cc +++ b/RecoMET/METProducers/src/EcalHaloDataProducer.cc @@ -34,9 +34,6 @@ EcalHaloDataProducer::EcalHaloDataProducer(const edm::ParameterSet& iConfig) : E SumEcalEnergyThreshold = (float)iConfig.getParameter("SumEcalEnergyThresholdParam"); NHitsEcalThreshold = iConfig.getParameter("NHitsEcalThresholdParam"); - RoundnessCut = iConfig.getParameter("RoundnessCutParam"); - AngleCut = iConfig.getParameter("AngleCutParam"); - ebrechit_token_ = consumes(IT_EBRecHit); eerechit_token_ = consumes(IT_EERecHit); esrechit_token_ = consumes(IT_ESRecHit); @@ -93,4 +90,20 @@ void EcalHaloDataProducer::produce(Event& iEvent, const EventSetup& iSetup) { return; } -EcalHaloDataProducer::~EcalHaloDataProducer() {} +void EcalHaloDataProducer::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { + edm::ParameterSetDescription desc; + desc.add("EBRecHitLabel", edm::InputTag("ecalRecHit", "EcalRecHitsEB")); + desc.add("EERecHitLabel", edm::InputTag("ecalRecHit", "EcalRecHitsEE")); + desc.add("ESRecHitLabel", edm::InputTag("ecalPreshowerRecHit", "EcalRecHitsES")); + desc.add("HBHERecHitLabel", edm::InputTag("hbhereco")); + desc.add("SuperClusterLabel", edm::InputTag("correctedHybridSuperClusters")); + desc.add("PhotonLabel", edm::InputTag("")); + desc.add("RoundnessCutParam", 0.41); + desc.add("AngleCutParam", 0.51); + desc.add("EBRecHitEnergyThresholdParam", 0.3); + desc.add("EERecHitEnergyThresholdParam", 0.3); + desc.add("ESRecHitEnergyThresholdParam", 0.3); + desc.add("SumEcalEnergyThresholdParam", 10); + desc.add("NHitsEcalThresholdParam", 4); + descriptions.addWithDefaultLabel(desc); +} diff --git a/RecoMET/METProducers/src/GlobalHaloDataProducer.cc b/RecoMET/METProducers/src/GlobalHaloDataProducer.cc index 389ca0613834d..46deae6df674d 100644 --- a/RecoMET/METProducers/src/GlobalHaloDataProducer.cc +++ b/RecoMET/METProducers/src/GlobalHaloDataProducer.cc @@ -12,6 +12,46 @@ using namespace edm; using namespace std; using namespace reco; +void GlobalHaloDataProducer::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { + edm::ParameterSetDescription desc; + desc.add("IsHLT"); + desc.add("metLabel", edm::InputTag("caloMet")); + desc.add("calotowerLabel", edm::InputTag("towerMaker")); + desc.add("CSCSegmentLabel", edm::InputTag("cscSegments")); + desc.add("CSCRecHitLabel", edm::InputTag("csc2DRecHits")); + desc.add("MuonLabel", edm::InputTag("muons")); + desc.add("CSCHaloDataLabel", edm::InputTag("CSCHaloData")); + desc.add("EcalHaloDataLabel", edm::InputTag("EcalHaloData")); + desc.add("HcalHaloDataLabel", edm::InputTag("HcalHaloData")); + desc.add("EcalMinMatchingRadiusParam", 110.); + desc.add("EcalMaxMatchingRadiusParam", 330.); + desc.add("HcalMinMatchingRadiusParam", 110.); + desc.add("HcalMaxMatchingRadiusParam", 490.); + desc.add("CaloTowerEtThresholdParam", 0.3); + desc.add("MaxSegmentTheta", 0.7); + desc.add("rh_et_threshforcscmatching_eb", 10.); + desc.add("rcalominrsegm_lowthresh_eb", -30.); + desc.add("rcalominrsegm_highthresh_eb", 15.); + desc.add("dtcalosegm_thresh_eb", 15.); + desc.add("dphicalosegm_thresh_eb", 0.04); + desc.add("rh_et_threshforcscmatching_ee", 10.); + desc.add("rcalominrsegm_lowthresh_ee", -30.); + desc.add("rcalominrsegm_highthresh_ee", 30.); + desc.add("dtcalosegm_thresh_ee", 15.); + desc.add("dphicalosegm_thresh_ee", 0.04); + desc.add("rh_et_threshforcscmatching_hb", 20.); + desc.add("rcalominrsegm_lowthresh_hb", -100.); + desc.add("rcalominrsegm_highthresh_hb", 20.); + desc.add("dtcalosegm_thresh_hb", 15.); + desc.add("dphicalosegm_thresh_hb", 0.15); + desc.add("rh_et_threshforcscmatching_he", 20.); + desc.add("rcalominrsegm_lowthresh_he", -30.); + desc.add("rcalominrsegm_highthresh_he", 30.); + desc.add("dtcalosegm_thresh_he", 15.); + desc.add("dphicalosegm_thresh_he", 0.1); + descriptions.addWithDefaultLabel(desc); +} + GlobalHaloDataProducer::GlobalHaloDataProducer(const edm::ParameterSet& iConfig) { ishlt = iConfig.getParameter("IsHLT"); diff --git a/RecoMET/METProducers/src/HcalHaloDataProducer.cc b/RecoMET/METProducers/src/HcalHaloDataProducer.cc index 4b25f906038f6..658e67146bac6 100644 --- a/RecoMET/METProducers/src/HcalHaloDataProducer.cc +++ b/RecoMET/METProducers/src/HcalHaloDataProducer.cc @@ -71,4 +71,17 @@ void HcalHaloDataProducer::produce(Event& iEvent, const EventSetup& iSetup) { return; } -HcalHaloDataProducer::~HcalHaloDataProducer() {} +void HcalHaloDataProducer::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { + edm::ParameterSetDescription desc; + desc.add("EBRecHitLabel", edm::InputTag("ecalRecHit", "EcalRecHitsEB")); + desc.add("EERecHitLabel", edm::InputTag("ecalRecHit", "EcalRecHitsEE")); + desc.add("HBHERecHitLabel", edm::InputTag("hbhereco")); + desc.add("HFRecHitLabel", edm::InputTag("horeco")); + desc.add("HORecHitLabel", edm::InputTag("hfreco")); + desc.add("caloTowerCollName", edm::InputTag("towerMaker")); + desc.add("HBRecHitEnergyThresholdParam", 0.5); + desc.add("HERecHitEnergyThresholdParam", 0.5); + desc.add("SumHcalEnergyThresholdParam", 18); + desc.add("NHitsHcalThresholdParam", 4); + descriptions.addWithDefaultLabel(desc); +} diff --git a/RecoMuon/MuonSeedGenerator/plugins/CosmicMuonSeedGenerator.cc b/RecoMuon/MuonSeedGenerator/plugins/CosmicMuonSeedGenerator.cc index 73b54d3ff0b49..101ad60791508 100644 --- a/RecoMuon/MuonSeedGenerator/plugins/CosmicMuonSeedGenerator.cc +++ b/RecoMuon/MuonSeedGenerator/plugins/CosmicMuonSeedGenerator.cc @@ -540,3 +540,16 @@ TrajectorySeed CosmicMuonSeedGenerator::tsosToSeed(const TrajectoryStateOnSurfac TrajectorySeed seed(seedTSOS, container, alongMomentum); return seed; } + +void CosmicMuonSeedGenerator::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { + edm::ParameterSetDescription desc; + desc.add("EnableDTMeasurement", true); + desc.add("EnableCSCMeasurement", true); + desc.add("DTRecSegmentLabel", edm::InputTag("dt4DSegments")); + desc.add("CSCRecSegmentLabel", edm::InputTag("cscSegments")); + desc.add("MaxSeeds", 1000); + desc.add("MaxDTChi2", 300.0); + desc.add("MaxCSCChi2", 300.0); + desc.add("ForcePointDown", true); + descriptions.addWithDefaultLabel(desc); +} diff --git a/RecoMuon/MuonSeedGenerator/plugins/CosmicMuonSeedGenerator.h b/RecoMuon/MuonSeedGenerator/plugins/CosmicMuonSeedGenerator.h index f7f4d307f9f9d..d08779c6a9fbc 100644 --- a/RecoMuon/MuonSeedGenerator/plugins/CosmicMuonSeedGenerator.h +++ b/RecoMuon/MuonSeedGenerator/plugins/CosmicMuonSeedGenerator.h @@ -11,6 +11,8 @@ #include "FWCore/Framework/interface/ESHandle.h" #include "FWCore/Utilities/interface/InputTag.h" #include "FWCore/Utilities/interface/ESGetToken.h" +#include "FWCore/ParameterSet/interface/ParameterSetDescription.h" +#include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h" #include "DataFormats/TrajectorySeed/interface/TrajectorySeedCollection.h" #include "RecoMuon/TransientTrackingRecHit/interface/MuonTransientTrackingRecHit.h" @@ -40,6 +42,9 @@ class CosmicMuonSeedGenerator : public edm::stream::EDProducer<> { /// Destructor ~CosmicMuonSeedGenerator() override; + /// fillDescriptions + static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); + // Operations /// reconstruct muon's seeds diff --git a/RecoMuon/TrackingTools/interface/MuonSegmentMatcher.h b/RecoMuon/TrackingTools/interface/MuonSegmentMatcher.h index 6c29e3db45d0d..a918ab2b9b25e 100644 --- a/RecoMuon/TrackingTools/interface/MuonSegmentMatcher.h +++ b/RecoMuon/TrackingTools/interface/MuonSegmentMatcher.h @@ -7,6 +7,7 @@ #include "FWCore/Utilities/interface/InputTag.h" #include "DataFormats/TrackReco/interface/TrackFwd.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/ParameterSet/interface/ParameterSetDescription.h" #include "DataFormats/DTRecHit/interface/DTRecSegment2D.h" #include "DataFormats/DTRecHit/interface/DTRecSegment4D.h" @@ -41,6 +42,8 @@ class MuonSegmentMatcher { std::vector matchRPC(const reco::Track& muon, const edm::Event& event); + static void fillPSetDescription(edm::ParameterSetDescription& desc); + protected: private: const MuonServiceProxy* theService; diff --git a/RecoMuon/TrackingTools/src/MuonSegmentMatcher.cc b/RecoMuon/TrackingTools/src/MuonSegmentMatcher.cc index 7b4a143642812..072af8d7f02ff 100644 --- a/RecoMuon/TrackingTools/src/MuonSegmentMatcher.cc +++ b/RecoMuon/TrackingTools/src/MuonSegmentMatcher.cc @@ -54,6 +54,15 @@ MuonSegmentMatcher::MuonSegmentMatcher(const edm::ParameterSet& matchParameters, rpcRecHitsToken = iC.consumes(RPCHitTags_); } +void MuonSegmentMatcher::fillPSetDescription(edm::ParameterSetDescription& desc) { + desc.add("DTsegments", edm::InputTag("dt4DSegments")); + desc.add("CSCsegments", edm::InputTag("cscSegments")); + desc.add("DTradius", 0.01); + desc.add("TightMatchDT", false); + desc.add("TightMatchCSC", false); + desc.add("RPChits", edm::InputTag("rpcRecHits")); +} + MuonSegmentMatcher::~MuonSegmentMatcher() {} // member functions diff --git a/RecoParticleFlow/PFTracking/plugins/LightPFTrackProducer.cc b/RecoParticleFlow/PFTracking/plugins/LightPFTrackProducer.cc index a3f7c905184c5..1e128b2a7a280 100644 --- a/RecoParticleFlow/PFTracking/plugins/LightPFTrackProducer.cc +++ b/RecoParticleFlow/PFTracking/plugins/LightPFTrackProducer.cc @@ -3,7 +3,9 @@ #include "FWCore/Framework/interface/ESHandle.h" #include "FWCore/Framework/interface/Event.h" #include "FWCore/Framework/interface/stream/EDProducer.h" +#include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/ParameterSet/interface/ParameterSetDescription.h" #include "MagneticField/Engine/interface/MagneticField.h" #include "MagneticField/Records/interface/IdealMagneticFieldRecord.h" #include "RecoParticleFlow/PFTracking/interface/PFTrackTransformer.h" diff --git a/RecoTracker/FinalTrackSelectors/plugins/TrackListMerger.cc b/RecoTracker/FinalTrackSelectors/plugins/TrackListMerger.cc index b0cafe7ac08e8..61cf87ecf7370 100644 --- a/RecoTracker/FinalTrackSelectors/plugins/TrackListMerger.cc +++ b/RecoTracker/FinalTrackSelectors/plugins/TrackListMerger.cc @@ -20,10 +20,12 @@ #include "FWCore/Framework/interface/Event.h" #include "FWCore/Framework/interface/EventSetup.h" #include "FWCore/Framework/interface/stream/EDProducer.h" +#include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/ParameterSet/interface/ParameterSetDescription.h" +#include "FWCore/Utilities/interface/ESGetToken.h" #include "FWCore/Utilities/interface/InputTag.h" #include "FWCore/Utilities/interface/thread_safety_macros.h" -#include "FWCore/Utilities/interface/ESGetToken.h" #include "RecoTracker/FinalTrackSelectors/interface/TrackAlgoPriorityOrder.h" #include "RecoTracker/Record/interface/CkfComponentsRecord.h" #include "TrackingTools/PatternTools/interface/TrajTrackAssociation.h" @@ -37,6 +39,8 @@ class dso_hidden TrackListMerger : public edm::stream::EDProducer<> { void produce(edm::Event& e, const edm::EventSetup& c) override; + static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); + private: void returnEmptyCollections(edm::Event& e); @@ -224,7 +228,7 @@ TrackListMerger::TrackListMerger(edm::ParameterSet const& conf) { priorityToken = esConsumes(edm::ESInputTag("", priorityName_)); if (!qualityStr.empty()) { - qualityToSet_ = reco::TrackBase::qualityByName(conf.getParameter("newQuality")); + qualityToSet_ = reco::TrackBase::qualityByName(qualityStr); } else qualityToSet_ = reco::TrackBase::undefQuality; @@ -306,6 +310,37 @@ TrackListMerger::TrackListMerger(edm::ParameterSet const& conf) { } } +void TrackListMerger::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { + edm::ParameterSetDescription desc; + desc.addUntracked("copyExtras", true); + desc.add("trackAlgoPriorityOrder"); + desc.add>("TrackProducers", {edm::InputTag(""), edm::InputTag("")}); + desc.add("MaxNormalizedChisq", 1000.0); + desc.add("MinPT", 0.05)->setComment("in GeV/c"); + desc.add("MinFound", 3); + desc.add("Epsilon", -0.001); + desc.add("ShareFrac", 0.19); + desc.add("allowFirstHitShare", true); + desc.add("FoundHitBonus", 5.0); + desc.add("LostHitPenalty", 5.0); + desc.add>("indivShareFrac"); + desc.add("newQuality", "confirmed"); + + // Correctly define the structure of the VPSet + edm::ParameterSetDescription descSetToMerge; + descSetToMerge.add>("tLists", {}); + descSetToMerge.add("pQual", false); + desc.addVPSet("setsToMerge", descSetToMerge, {}); + + desc.add>("hasSelector", {0, 0}); + desc.add("copyMVA", true); + desc.add>("selectedTrackQuals", {edm::InputTag(""), edm::InputTag("")}); + desc.addOptional>("mvaValueTags"); + desc.add("writeOnlyTrkQuals", false); + desc.addUntracked("makeReKeyedSeeds", false); + descriptions.addWithDefaultLabel(desc); +} + // Functions that gets called by framework every event void TrackListMerger::produce(edm::Event& e, const edm::EventSetup& es) { // extract tracker geometry diff --git a/RecoTracker/MeasurementDet/plugins/MaskedMeasurementTrackerEventProducer.cc b/RecoTracker/MeasurementDet/plugins/MaskedMeasurementTrackerEventProducer.cc index f66eabd4424c0..2017b8508f877 100644 --- a/RecoTracker/MeasurementDet/plugins/MaskedMeasurementTrackerEventProducer.cc +++ b/RecoTracker/MeasurementDet/plugins/MaskedMeasurementTrackerEventProducer.cc @@ -2,12 +2,15 @@ #include "FWCore/Framework/interface/stream/EDProducer.h" #include "FWCore/Framework/interface/Event.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/ParameterSet/interface/ParameterSetDescription.h" +#include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h" #include "RecoTracker/MeasurementDet/interface/MeasurementTrackerEvent.h" class dso_hidden MaskedMeasurementTrackerEventProducer final : public edm::stream::EDProducer<> { public: explicit MaskedMeasurementTrackerEventProducer(const edm::ParameterSet &iConfig); - ~MaskedMeasurementTrackerEventProducer() override {} + ~MaskedMeasurementTrackerEventProducer() override = default; + static void fillDescriptions(edm::ConfigurationDescriptions &descriptions); private: void produce(edm::Event &, const edm::EventSetup &) override; @@ -16,33 +19,40 @@ class dso_hidden MaskedMeasurementTrackerEventProducer final : public edm::strea typedef edm::ContainerMask > PixelMask; typedef edm::ContainerMask > Phase2OTMask; - edm::EDGetTokenT src_; + const edm::EDGetTokenT src_; - bool skipClusters_; - bool phase2skipClusters_; + const bool skipClusters_; + const bool phase2skipClusters_; edm::EDGetTokenT maskStrips_; edm::EDGetTokenT maskPixels_; edm::EDGetTokenT maskPhase2OTs_; }; +void MaskedMeasurementTrackerEventProducer::fillDescriptions(edm::ConfigurationDescriptions &descriptions) { + edm::ParameterSetDescription desc; + desc.add("src", edm::InputTag("MeasurementTrackerEvent")); + desc.add("clustersToSkip", edm::InputTag(""))->setComment("keep empty string for Phase2"); + desc.add("phase2clustersToSkip", edm::InputTag(""))->setComment("keep empty string for Phase1"); + descriptions.addWithDefaultLabel(desc); +} + MaskedMeasurementTrackerEventProducer::MaskedMeasurementTrackerEventProducer(const edm::ParameterSet &iConfig) : src_(consumes(iConfig.getParameter("src"))), - skipClusters_(false), - phase2skipClusters_(false) { - //FIXME:temporary solution in order to use this class for both phase0/1 and phase2 - if (iConfig.existsAs("clustersToSkip")) { - skipClusters_ = true; + skipClusters_(!iConfig.getParameter("clustersToSkip").label().empty()), + phase2skipClusters_(!iConfig.getParameter("phase2clustersToSkip").label().empty()) { + if (skipClusters_) { edm::InputTag clustersToSkip = iConfig.getParameter("clustersToSkip"); maskPixels_ = consumes(clustersToSkip); maskStrips_ = consumes(clustersToSkip); } - if (iConfig.existsAs("phase2clustersToSkip")) { - phase2skipClusters_ = true; + + if (phase2skipClusters_) { edm::InputTag phase2clustersToSkip = iConfig.getParameter("phase2clustersToSkip"); maskPixels_ = consumes(phase2clustersToSkip); maskPhase2OTs_ = consumes(phase2clustersToSkip); } + produces(); } diff --git a/RecoTracker/TkSeedGenerator/plugins/SeedCombiner.h b/RecoTracker/TkSeedGenerator/plugins/SeedCombiner.h index 7410b1128628b..f7f9c7890e935 100644 --- a/RecoTracker/TkSeedGenerator/plugins/SeedCombiner.h +++ b/RecoTracker/TkSeedGenerator/plugins/SeedCombiner.h @@ -9,6 +9,9 @@ #include "FWCore/ParameterSet/interface/ParameterSetDescription.h" #include "FWCore/Utilities/interface/InputTag.h" #include "FWCore/Utilities/interface/Visibility.h" +#include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h" +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/ParameterSet/interface/ParameterSetDescription.h" namespace edm { class Event; @@ -21,9 +24,8 @@ class dso_hidden SeedCombiner : public edm::stream::EDProducer<> { SeedCombiner(const edm::ParameterSet& cfg); ~SeedCombiner() override = default; - static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); - void produce(edm::Event& ev, const edm::EventSetup& es) override; + static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); private: std::vector> inputCollections_; diff --git a/RecoVertex/PixelVertexFinding/plugins/PixelVertexProducer.cc b/RecoVertex/PixelVertexFinding/plugins/PixelVertexProducer.cc index 6735519b118ea..de16d7d036cf2 100644 --- a/RecoVertex/PixelVertexFinding/plugins/PixelVertexProducer.cc +++ b/RecoVertex/PixelVertexFinding/plugins/PixelVertexProducer.cc @@ -20,20 +20,24 @@ // Created: Thu May 25 10:17:32 CDT 2006 // -#include "FWCore/Framework/interface/Frameworkfwd.h" -#include "FWCore/Framework/interface/stream/EDProducer.h" +#include "DataFormats/BeamSpot/interface/BeamSpot.h" +#include "DataFormats/GeometryCommonDetAlgo/interface/GlobalError.h" +#include "DataFormats/GeometryCommonDetAlgo/interface/GlobalError.h" +#include "DataFormats/TrackReco/interface/TrackFwd.h" +#include "DataFormats/VertexReco/interface/Vertex.h" +#include "DataFormats/VertexReco/interface/VertexFwd.h" #include "FWCore/Framework/interface/Event.h" #include "FWCore/Framework/interface/EventSetup.h" +#include "FWCore/Framework/interface/Frameworkfwd.h" #include "FWCore/Framework/interface/MakerMacros.h" +#include "FWCore/Framework/interface/stream/EDProducer.h" +#include "FWCore/MessageLogger/interface/MessageLogger.h" +#include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/ParameterSet/interface/ParameterSetDescription.h" #include "FWCore/Utilities/interface/InputTag.h" -#include "FWCore/MessageLogger/interface/MessageLogger.h" -#include "DataFormats/BeamSpot/interface/BeamSpot.h" -#include "DataFormats/TrackReco/interface/TrackFwd.h" -#include "DataFormats/VertexReco/interface/Vertex.h" -#include "DataFormats/VertexReco/interface/VertexFwd.h" -#include "DataFormats/GeometryCommonDetAlgo/interface/GlobalError.h" #include "RecoVertex/PixelVertexFinding/interface/DivisiveVertexFinder.h" + #include #include #include @@ -42,6 +46,7 @@ class PixelVertexProducer : public edm::stream::EDProducer<> { public: explicit PixelVertexProducer(const edm::ParameterSet&); ~PixelVertexProducer() override; + static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); void produce(edm::Event&, const edm::EventSetup&) override; @@ -59,6 +64,32 @@ class PixelVertexProducer : public edm::stream::EDProducer<> { DivisiveVertexFinder* dvf_; }; +void PixelVertexProducer::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { + edm::ParameterSetDescription desc; + desc.add("Verbosity", 0); + desc.add("PtMin", 1.0); + desc.add("Method2", true); + desc.add("TrackCollection", edm::InputTag("pixelTracks")); + desc.add("beamSpot", edm::InputTag("offlineBeamSpot")); + desc.add("Finder", "DivisiveVertexFinder"); + desc.add("UseError", true); + desc.add("WtAverage", true); + desc.add("ZOffset", 5.0); + desc.add("ZSeparation", 0.05); + desc.add("NTrkMin"); + + { + edm::ParameterSetDescription PVComparerPSet; + PVComparerPSet.add("track_pt_min", 1.0); + PVComparerPSet.add("track_pt_max", 10.0); + PVComparerPSet.add("track_chi2_max", 999999.); + PVComparerPSet.add("track_prob_min", -1.); + desc.addOptional("PVcomparer", PVComparerPSet); + } + + descriptions.addWithDefaultLabel(desc); +} + PixelVertexProducer::PixelVertexProducer(const edm::ParameterSet& conf) // 0 silent, 1 chatty, 2 loud : verbose_(conf.getParameter("Verbosity")),