From 33f3becd3d0f33dcfc6cc0a2167f4ab81dad71fc Mon Sep 17 00:00:00 2001 From: Sunanda Date: Thu, 9 Sep 2021 18:12:36 +0200 Subject: [PATCH] Rearrange all plugins to the plugins directory in Calibration/HcalAlCaRecoProducers --- .../HcalAlCaRecoProducers/BuildFile.xml | 30 ------ .../interface/AlCaEcalHcalReadoutsProducer.h | 51 ---------- .../interface/AlCaHcalNoiseProducer.h | 72 --------------- .../{src => plugins}/AlCaDiJetsProducer.cc | 0 .../plugins/AlCaEcalHcalReadoutsProducer.cc | 92 +++++++++++++++++++ .../{src => plugins}/AlCaGammaJetProducer.cc | 0 .../{src => plugins}/AlCaHBHEMuonProducer.cc | 0 .../{src => plugins}/AlCaHOCalibProducer.cc | 0 .../{src => plugins}/AlCaHcalNoiseProducer.cc | 85 +++++++++++++++-- .../{src => plugins}/AlCaIsoTracksProducer.cc | 0 .../plugins/BuildFile.xml | 27 +++++- .../{src => plugins}/ProducerAnalyzer.cc | 91 +++++++++++++++--- .../src/AlCaEcalHcalReadoutsProducer.cc | 44 --------- .../src/ProducerAnalyzer.h | 82 ----------------- .../HcalAlCaRecoProducers/src/SealModule.cc | 9 -- 15 files changed, 275 insertions(+), 308 deletions(-) delete mode 100644 Calibration/HcalAlCaRecoProducers/BuildFile.xml delete mode 100644 Calibration/HcalAlCaRecoProducers/interface/AlCaEcalHcalReadoutsProducer.h delete mode 100644 Calibration/HcalAlCaRecoProducers/interface/AlCaHcalNoiseProducer.h rename Calibration/HcalAlCaRecoProducers/{src => plugins}/AlCaDiJetsProducer.cc (100%) create mode 100644 Calibration/HcalAlCaRecoProducers/plugins/AlCaEcalHcalReadoutsProducer.cc rename Calibration/HcalAlCaRecoProducers/{src => plugins}/AlCaGammaJetProducer.cc (100%) rename Calibration/HcalAlCaRecoProducers/{src => plugins}/AlCaHBHEMuonProducer.cc (100%) rename Calibration/HcalAlCaRecoProducers/{src => plugins}/AlCaHOCalibProducer.cc (100%) rename Calibration/HcalAlCaRecoProducers/{src => plugins}/AlCaHcalNoiseProducer.cc (77%) rename Calibration/HcalAlCaRecoProducers/{src => plugins}/AlCaIsoTracksProducer.cc (100%) rename Calibration/HcalAlCaRecoProducers/{src => plugins}/ProducerAnalyzer.cc (77%) delete mode 100644 Calibration/HcalAlCaRecoProducers/src/AlCaEcalHcalReadoutsProducer.cc delete mode 100644 Calibration/HcalAlCaRecoProducers/src/ProducerAnalyzer.h delete mode 100644 Calibration/HcalAlCaRecoProducers/src/SealModule.cc diff --git a/Calibration/HcalAlCaRecoProducers/BuildFile.xml b/Calibration/HcalAlCaRecoProducers/BuildFile.xml deleted file mode 100644 index 70a45f24766ba..0000000000000 --- a/Calibration/HcalAlCaRecoProducers/BuildFile.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Calibration/HcalAlCaRecoProducers/interface/AlCaEcalHcalReadoutsProducer.h b/Calibration/HcalAlCaRecoProducers/interface/AlCaEcalHcalReadoutsProducer.h deleted file mode 100644 index 71980b641a95c..0000000000000 --- a/Calibration/HcalAlCaRecoProducers/interface/AlCaEcalHcalReadoutsProducer.h +++ /dev/null @@ -1,51 +0,0 @@ -// -*- C++ -*- - -// system include files -#include -#include -// user include files -#include "FWCore/Framework/interface/Frameworkfwd.h" -#include "FWCore/Framework/interface/global/EDProducer.h" - -#include "FWCore/Framework/interface/Event.h" -#include "FWCore/Framework/interface/MakerMacros.h" - -#include "FWCore/ParameterSet/interface/ParameterSet.h" -#include "FWCore/Framework/interface/Frameworkfwd.h" -#include "FWCore/Framework/interface/Event.h" -#include "FWCore/Framework/interface/MakerMacros.h" -#include "FWCore/Framework/interface/EventSetup.h" -#include "FWCore/ParameterSet/interface/ParameterSet.h" - -#include "DataFormats/Common/interface/Ref.h" -#include "DataFormats/CaloTowers/interface/CaloTowerCollection.h" -#include "DataFormats/DetId/interface/DetId.h" - -#include "Geometry/Records/interface/IdealGeometryRecord.h" -#include "Geometry/CaloGeometry/interface/CaloGeometry.h" -#include "DataFormats/GeometryVector/interface/GlobalPoint.h" -#include "DataFormats/CaloTowers/interface/CaloTowerDetId.h" -#include "DataFormats/HcalRecHit/interface/HcalRecHitCollections.h" -#include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h" - -// -// class decleration -// - -class AlCaEcalHcalReadoutsProducer : public edm::global::EDProducer<> { -public: - explicit AlCaEcalHcalReadoutsProducer(const edm::ParameterSet &); - - void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override; - -private: - // ----------member data --------------------------- - - edm::EDGetTokenT tok_hbhe_; - edm::EDGetTokenT tok_ho_; - edm::EDGetTokenT tok_hf_; - - edm::EDPutTokenT put_hbhe_; - edm::EDPutTokenT put_ho_; - edm::EDPutTokenT put_hf_; -}; diff --git a/Calibration/HcalAlCaRecoProducers/interface/AlCaHcalNoiseProducer.h b/Calibration/HcalAlCaRecoProducers/interface/AlCaHcalNoiseProducer.h deleted file mode 100644 index f1c5d19926916..0000000000000 --- a/Calibration/HcalAlCaRecoProducers/interface/AlCaHcalNoiseProducer.h +++ /dev/null @@ -1,72 +0,0 @@ -// -*- C++ -*- - -// system include files -#include -#include -// user include files -#include "FWCore/Framework/interface/Frameworkfwd.h" -#include "FWCore/Framework/interface/EDProducer.h" - -#include "FWCore/Framework/interface/Event.h" -#include "FWCore/Framework/interface/MakerMacros.h" - -#include "FWCore/ParameterSet/interface/ParameterSet.h" -#include "FWCore/Framework/interface/Frameworkfwd.h" -#include "FWCore/Framework/interface/Event.h" -#include "FWCore/Framework/interface/MakerMacros.h" -#include "FWCore/Framework/interface/EventSetup.h" -#include "FWCore/ParameterSet/interface/ParameterSet.h" - -#include "DataFormats/Common/interface/Ref.h" -#include "DataFormats/CaloTowers/interface/CaloTowerCollection.h" -#include "DataFormats/DetId/interface/DetId.h" - -#include "Geometry/Records/interface/IdealGeometryRecord.h" -#include "Geometry/CaloGeometry/interface/CaloGeometry.h" -#include "DataFormats/GeometryVector/interface/GlobalPoint.h" -#include "DataFormats/CaloTowers/interface/CaloTowerDetId.h" -#include "DataFormats/HcalRecHit/interface/HcalRecHitCollections.h" -#include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h" - -#include "DataFormats/FEDRawData/interface/FEDRawDataCollection.h" -#include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h" -#include "DataFormats/METReco/interface/CaloMETCollection.h" -#include "DataFormats/JetReco/interface/CaloJetCollection.h" -#include "DataFormats/CaloTowers/interface/CaloTowerCollection.h" - -// -// class decleration -// - -class AlCaHcalNoiseProducer : public edm::EDProducer { -public: - explicit AlCaHcalNoiseProducer(const edm::ParameterSet &); - ~AlCaHcalNoiseProducer() override; - - void produce(edm::Event &, const edm::EventSetup &) override; - -private: - // ----------member data --------------------------- - - bool useMet_; - bool useJet_; - double MetCut_; - double JetMinE_; - double JetHCALminEnergyFraction_; - int nAnomalousEvents; - int nEvents; - - std::vector ecalLabels_; - - edm::EDGetTokenT tok_jets_; - edm::EDGetTokenT tok_met_; - edm::EDGetTokenT tok_tower_; - - edm::EDGetTokenT tok_hbhe_; - edm::EDGetTokenT tok_ho_; - edm::EDGetTokenT tok_hf_; - - edm::EDGetTokenT tok_ps_; - edm::EDGetTokenT tok_raw_; - std::vector > toks_ecal_; -}; diff --git a/Calibration/HcalAlCaRecoProducers/src/AlCaDiJetsProducer.cc b/Calibration/HcalAlCaRecoProducers/plugins/AlCaDiJetsProducer.cc similarity index 100% rename from Calibration/HcalAlCaRecoProducers/src/AlCaDiJetsProducer.cc rename to Calibration/HcalAlCaRecoProducers/plugins/AlCaDiJetsProducer.cc diff --git a/Calibration/HcalAlCaRecoProducers/plugins/AlCaEcalHcalReadoutsProducer.cc b/Calibration/HcalAlCaRecoProducers/plugins/AlCaEcalHcalReadoutsProducer.cc new file mode 100644 index 0000000000000..0be0729babb30 --- /dev/null +++ b/Calibration/HcalAlCaRecoProducers/plugins/AlCaEcalHcalReadoutsProducer.cc @@ -0,0 +1,92 @@ +// -*- C++ -*- + +// system include files +#include +#include +// user include files +#include "FWCore/Framework/interface/Frameworkfwd.h" +#include "FWCore/Framework/interface/global/EDProducer.h" +#include "FWCore/Framework/interface/Event.h" +#include "FWCore/Framework/interface/EventSetup.h" +#include "FWCore/MessageLogger/interface/MessageLogger.h" +#include "FWCore/ParameterSet/interface/ParameterSet.h" + +#include "DataFormats/Common/interface/Ref.h" +#include "DataFormats/CaloTowers/interface/CaloTowerCollection.h" +#include "DataFormats/DetId/interface/DetId.h" + +#include "Geometry/Records/interface/IdealGeometryRecord.h" +#include "Geometry/CaloGeometry/interface/CaloGeometry.h" +#include "DataFormats/GeometryVector/interface/GlobalPoint.h" +#include "DataFormats/CaloTowers/interface/CaloTowerDetId.h" +#include "DataFormats/HcalRecHit/interface/HcalRecHitCollections.h" +#include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h" + +// +// class decleration +// + +class AlCaEcalHcalReadoutsProducer : public edm::global::EDProducer<> { +public: + explicit AlCaEcalHcalReadoutsProducer(const edm::ParameterSet &); + + void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override; + +private: + // ----------member data --------------------------- + + edm::EDGetTokenT tok_hbhe_; + edm::EDGetTokenT tok_ho_; + edm::EDGetTokenT tok_hf_; + + edm::EDPutTokenT put_hbhe_; + edm::EDPutTokenT put_ho_; + edm::EDPutTokenT put_hf_; +}; + +AlCaEcalHcalReadoutsProducer::AlCaEcalHcalReadoutsProducer(const edm::ParameterSet& iConfig) { + tok_ho_ = consumes(iConfig.getParameter("hoInput")); + tok_hf_ = consumes(iConfig.getParameter("hfInput")); + tok_hbhe_ = consumes(iConfig.getParameter("hbheInput")); + + //register your products + put_hbhe_ = produces("HBHERecHitCollection"); + put_ho_ = produces("HORecHitCollection"); + put_hf_ = produces("HFRecHitCollection"); +} + +// ------------ method called to produce the data ------------ +void AlCaEcalHcalReadoutsProducer::produce(edm::StreamID, edm::Event& iEvent, const edm::EventSetup& iSetup) const { + using namespace edm; + using namespace std; + + edm::Handle hbhe; + edm::Handle ho; + edm::Handle hf; + + iEvent.getByToken(tok_hbhe_, hbhe); + if (!hbhe.isValid()) { + LogDebug("") << "AlCaEcalHcalReadoutProducer: Error! can't get hbhe product!" << std::endl; + return; + } + + iEvent.getByToken(tok_ho_, ho); + if (!ho.isValid()) { + LogDebug("") << "AlCaEcalHcalReadoutProducer: Error! can't get ho product!" << std::endl; + } + + iEvent.getByToken(tok_hf_, hf); + if (!hf.isValid()) { + LogDebug("") << "AlCaEcalHcalReadoutProducer: Error! can't get hf product!" << std::endl; + } + + //Put selected information in the event + iEvent.emplace(put_hbhe_, *hbhe); + iEvent.emplace(put_ho_, *ho); + iEvent.emplace(put_hf_, *hf); +} + +#include "FWCore/PluginManager/interface/ModuleDef.h" +#include "FWCore/Framework/interface/MakerMacros.h" + +DEFINE_FWK_MODULE(AlCaEcalHcalReadoutsProducer); diff --git a/Calibration/HcalAlCaRecoProducers/src/AlCaGammaJetProducer.cc b/Calibration/HcalAlCaRecoProducers/plugins/AlCaGammaJetProducer.cc similarity index 100% rename from Calibration/HcalAlCaRecoProducers/src/AlCaGammaJetProducer.cc rename to Calibration/HcalAlCaRecoProducers/plugins/AlCaGammaJetProducer.cc diff --git a/Calibration/HcalAlCaRecoProducers/src/AlCaHBHEMuonProducer.cc b/Calibration/HcalAlCaRecoProducers/plugins/AlCaHBHEMuonProducer.cc similarity index 100% rename from Calibration/HcalAlCaRecoProducers/src/AlCaHBHEMuonProducer.cc rename to Calibration/HcalAlCaRecoProducers/plugins/AlCaHBHEMuonProducer.cc diff --git a/Calibration/HcalAlCaRecoProducers/src/AlCaHOCalibProducer.cc b/Calibration/HcalAlCaRecoProducers/plugins/AlCaHOCalibProducer.cc similarity index 100% rename from Calibration/HcalAlCaRecoProducers/src/AlCaHOCalibProducer.cc rename to Calibration/HcalAlCaRecoProducers/plugins/AlCaHOCalibProducer.cc diff --git a/Calibration/HcalAlCaRecoProducers/src/AlCaHcalNoiseProducer.cc b/Calibration/HcalAlCaRecoProducers/plugins/AlCaHcalNoiseProducer.cc similarity index 77% rename from Calibration/HcalAlCaRecoProducers/src/AlCaHcalNoiseProducer.cc rename to Calibration/HcalAlCaRecoProducers/plugins/AlCaHcalNoiseProducer.cc index 294aa251650f3..e5d8511ef49c6 100644 --- a/Calibration/HcalAlCaRecoProducers/src/AlCaHcalNoiseProducer.cc +++ b/Calibration/HcalAlCaRecoProducers/plugins/AlCaHcalNoiseProducer.cc @@ -8,19 +8,88 @@ Calibration/HcalIsolatedTrackReco/src/SubdetFEDSelector.cc */ -#include "Calibration/HcalAlCaRecoProducers/interface/AlCaHcalNoiseProducer.h" +// -*- C++ -*- + +// system include files +#include +#include +// user include files + +#include "FWCore/Framework/interface/Frameworkfwd.h" +#include "FWCore/Framework/interface/one/EDProducer.h" +#include "FWCore/Framework/interface/Event.h" +#include "FWCore/Framework/interface/MakerMacros.h" + +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/Framework/interface/Frameworkfwd.h" +#include "FWCore/Framework/interface/Event.h" +#include "FWCore/Framework/interface/MakerMacros.h" +#include "FWCore/Framework/interface/EventSetup.h" +#include "FWCore/MessageLogger/interface/MessageLogger.h" +#include "FWCore/ParameterSet/interface/ParameterSet.h" -#include "DataFormats/FEDRawData/interface/FEDRawData.h" -#include "DataFormats/FEDRawData/interface/FEDNumbering.h" +#include "DataFormats/Common/interface/Ref.h" +#include "DataFormats/CaloTowers/interface/CaloTowerCollection.h" +#include "DataFormats/DetId/interface/DetId.h" -#include "EventFilter/RawDataCollector/interface/RawDataFEDSelector.h" +#include "Geometry/Records/interface/IdealGeometryRecord.h" +#include "Geometry/CaloGeometry/interface/CaloGeometry.h" +#include "DataFormats/GeometryVector/interface/GlobalPoint.h" +#include "DataFormats/CaloTowers/interface/CaloTowerDetId.h" +#include "DataFormats/HcalRecHit/interface/HcalRecHitCollections.h" +#include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h" #include "DataFormats/CaloTowers/interface/CaloTower.h" +#include "DataFormats/CaloTowers/interface/CaloTowerCollection.h" +#include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h" #include "DataFormats/JetReco/interface/CaloJet.h" -#include "DataFormats/METReco/interface/CaloMET.h" +#include "DataFormats/JetReco/interface/CaloJetCollection.h" #include "DataFormats/Math/interface/deltaR.h" +#include "DataFormats/METReco/interface/CaloMET.h" +#include "DataFormats/METReco/interface/CaloMETCollection.h" -#include "FWCore/MessageLogger/interface/MessageLogger.h" +#include "DataFormats/FEDRawData/interface/FEDRawData.h" +#include "DataFormats/FEDRawData/interface/FEDNumbering.h" +#include "DataFormats/FEDRawData/interface/FEDRawDataCollection.h" + +#include "EventFilter/RawDataCollector/interface/RawDataFEDSelector.h" + +// +// class decleration +// + +class AlCaHcalNoiseProducer : public edm::one::EDProducer<> { +public: + explicit AlCaHcalNoiseProducer(const edm::ParameterSet &); + ~AlCaHcalNoiseProducer() override; + + void produce(edm::Event &, const edm::EventSetup &) override; + +private: + // ----------member data --------------------------- + + bool useMet_; + bool useJet_; + double MetCut_; + double JetMinE_; + double JetHCALminEnergyFraction_; + int nAnomalousEvents; + int nEvents; + + std::vector ecalLabels_; + + edm::EDGetTokenT tok_jets_; + edm::EDGetTokenT tok_met_; + edm::EDGetTokenT tok_tower_; + + edm::EDGetTokenT tok_hbhe_; + edm::EDGetTokenT tok_ho_; + edm::EDGetTokenT tok_hf_; + + edm::EDGetTokenT tok_ps_; + edm::EDGetTokenT tok_raw_; + std::vector > toks_ecal_; +}; AlCaHcalNoiseProducer::AlCaHcalNoiseProducer(const edm::ParameterSet& iConfig) { tok_jets_ = consumes(iConfig.getParameter("JetSource")); @@ -240,3 +309,7 @@ void AlCaHcalNoiseProducer::produce(edm::Event& iEvent, const edm::EventSetup& i iEvent.put(std::move(outputESColl), "PSEcalRecHitCollectionFHN"); iEvent.put(std::move(outputFEDs), "HcalFEDsFHN"); } + +#include "FWCore/Framework/interface/MakerMacros.h" + +DEFINE_FWK_MODULE(AlCaHcalNoiseProducer); diff --git a/Calibration/HcalAlCaRecoProducers/src/AlCaIsoTracksProducer.cc b/Calibration/HcalAlCaRecoProducers/plugins/AlCaIsoTracksProducer.cc similarity index 100% rename from Calibration/HcalAlCaRecoProducers/src/AlCaIsoTracksProducer.cc rename to Calibration/HcalAlCaRecoProducers/plugins/AlCaIsoTracksProducer.cc diff --git a/Calibration/HcalAlCaRecoProducers/plugins/BuildFile.xml b/Calibration/HcalAlCaRecoProducers/plugins/BuildFile.xml index 32d601e1f18a7..fff6c2671b4ce 100644 --- a/Calibration/HcalAlCaRecoProducers/plugins/BuildFile.xml +++ b/Calibration/HcalAlCaRecoProducers/plugins/BuildFile.xml @@ -1,10 +1,33 @@ + + + + + + + + + + + + + + + + + + - - + + + + + + + diff --git a/Calibration/HcalAlCaRecoProducers/src/ProducerAnalyzer.cc b/Calibration/HcalAlCaRecoProducers/plugins/ProducerAnalyzer.cc similarity index 77% rename from Calibration/HcalAlCaRecoProducers/src/ProducerAnalyzer.cc rename to Calibration/HcalAlCaRecoProducers/plugins/ProducerAnalyzer.cc index fadac8bf6beb7..51b0b49c165b4 100644 --- a/Calibration/HcalAlCaRecoProducers/src/ProducerAnalyzer.cc +++ b/Calibration/HcalAlCaRecoProducers/plugins/ProducerAnalyzer.cc @@ -1,20 +1,87 @@ // system include files +#include +#include +#include // user include files -#include "Calibration/HcalAlCaRecoProducers/src/ProducerAnalyzer.h" #include "DataFormats/Provenance/interface/StableProvenance.h" #include "DataFormats/MuonReco/interface/Muon.h" -#include "TrackingTools/TransientTrack/interface/TransientTrack.h" -#include "FWCore/MessageLogger/interface/MessageLogger.h" -#include "Geometry/Records/interface/CaloGeometryRecord.h" -#include "Geometry/CaloGeometry/interface/CaloGeometry.h" -#include "Geometry/HcalTowerAlgo/interface/HcalGeometry.h" #include "DataFormats/GeometryVector/interface/GlobalPoint.h" #include "DataFormats/HcalCalibObjects/interface/HOCalibVariables.h" #include "DataFormats/TrackReco/interface/TrackExtra.h" #include "DataFormats/TrackReco/interface/TrackExtraFwd.h" +// collections +#include "DataFormats/HcalRecHit/interface/HcalRecHitCollections.h" +#include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h" +#include "DataFormats/JetReco/interface/CaloJetCollection.h" +#include "DataFormats/HcalCalibObjects/interface/HOCalibVariableCollection.h" +#include "DataFormats/EgammaReco/interface/SuperCluster.h" +#include "DataFormats/EgammaReco/interface/SuperClusterFwd.h" +#include "DataFormats/TrackReco/interface/Track.h" +#include "DataFormats/TrackReco/interface/TrackFwd.h" +#include "DataFormats/MuonReco/interface/MuonFwd.h" + +#include "FWCore/Framework/interface/Frameworkfwd.h" +#include "FWCore/Framework/interface/one/EDAnalyzer.h" +#include "FWCore/Framework/interface/Event.h" +#include "FWCore/Framework/interface/MakerMacros.h" +#include "FWCore/Framework/interface/EventSetup.h" +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/MessageLogger/interface/MessageLogger.h" + +#include "Geometry/Records/interface/CaloGeometryRecord.h" +#include "Geometry/CaloGeometry/interface/CaloGeometry.h" +#include "Geometry/HcalTowerAlgo/interface/HcalGeometry.h" + #include "RecoTracker/TrackProducer/interface/TrackProducerBase.h" +#include "TrackingTools/TransientTrack/interface/TransientTrack.h" + +namespace cms { + + // + // class declaration + // + + class ProducerAnalyzer : public edm::one::EDAnalyzer<> { + public: + explicit ProducerAnalyzer(const edm::ParameterSet&); + ~ProducerAnalyzer() override; + + void analyze(const edm::Event&, const edm::EventSetup&) override; + void beginJob() override {} + void endJob() override {} + + private: + // ----------member data --------------------------- + std::string nameProd_; + std::string jetCalo_; + std::string gammaClus_; + std::string ecalInput_; + std::string hbheInput_; + std::string hoInput_; + std::string hfInput_; + std::string Tracks_; + + edm::EDGetTokenT tok_hovar_; + edm::EDGetTokenT tok_horeco_; + edm::EDGetTokenT tok_ho_; + edm::EDGetTokenT tok_hoProd_; + + edm::EDGetTokenT tok_hf_; + + edm::EDGetTokenT tok_jets_; + edm::EDGetTokenT tok_gamma_; + edm::EDGetTokenT tok_muons_; + edm::EDGetTokenT tok_ecal_; + edm::EDGetTokenT tok_tracks_; + + edm::EDGetTokenT tok_hbhe_; + edm::EDGetTokenT tok_hbheProd_; + + edm::ESGetToken tok_geom_; + }; +} // end namespace cms using namespace reco; @@ -59,10 +126,6 @@ namespace cms { // (e.g. close files, deallocate resources etc.) } - void ProducerAnalyzer::beginJob() {} - - void ProducerAnalyzer::endJob() {} - // // member functions // @@ -193,6 +256,10 @@ namespace cms { } } } - //define this as a plug-in - //DEFINE_FWK_MODULE(ProducerAnalyzer) } // namespace cms + +#include "FWCore/PluginManager/interface/ModuleDef.h" +#include "FWCore/Framework/interface/MakerMacros.h" + +using cms::ProducerAnalyzer; +DEFINE_FWK_MODULE(ProducerAnalyzer); diff --git a/Calibration/HcalAlCaRecoProducers/src/AlCaEcalHcalReadoutsProducer.cc b/Calibration/HcalAlCaRecoProducers/src/AlCaEcalHcalReadoutsProducer.cc deleted file mode 100644 index f2792c3ee36d9..0000000000000 --- a/Calibration/HcalAlCaRecoProducers/src/AlCaEcalHcalReadoutsProducer.cc +++ /dev/null @@ -1,44 +0,0 @@ -#include "Calibration/HcalAlCaRecoProducers/interface/AlCaEcalHcalReadoutsProducer.h" -#include "FWCore/MessageLogger/interface/MessageLogger.h" - -AlCaEcalHcalReadoutsProducer::AlCaEcalHcalReadoutsProducer(const edm::ParameterSet& iConfig) { - tok_ho_ = consumes(iConfig.getParameter("hoInput")); - tok_hf_ = consumes(iConfig.getParameter("hfInput")); - tok_hbhe_ = consumes(iConfig.getParameter("hbheInput")); - - //register your products - put_hbhe_ = produces("HBHERecHitCollection"); - put_ho_ = produces("HORecHitCollection"); - put_hf_ = produces("HFRecHitCollection"); -} - -// ------------ method called to produce the data ------------ -void AlCaEcalHcalReadoutsProducer::produce(edm::StreamID, edm::Event& iEvent, const edm::EventSetup& iSetup) const { - using namespace edm; - using namespace std; - - edm::Handle hbhe; - edm::Handle ho; - edm::Handle hf; - - iEvent.getByToken(tok_hbhe_, hbhe); - if (!hbhe.isValid()) { - LogDebug("") << "AlCaEcalHcalReadoutProducer: Error! can't get hbhe product!" << std::endl; - return; - } - - iEvent.getByToken(tok_ho_, ho); - if (!ho.isValid()) { - LogDebug("") << "AlCaEcalHcalReadoutProducer: Error! can't get ho product!" << std::endl; - } - - iEvent.getByToken(tok_hf_, hf); - if (!hf.isValid()) { - LogDebug("") << "AlCaEcalHcalReadoutProducer: Error! can't get hf product!" << std::endl; - } - - //Put selected information in the event - iEvent.emplace(put_hbhe_, *hbhe); - iEvent.emplace(put_ho_, *ho); - iEvent.emplace(put_hf_, *hf); -} diff --git a/Calibration/HcalAlCaRecoProducers/src/ProducerAnalyzer.h b/Calibration/HcalAlCaRecoProducers/src/ProducerAnalyzer.h deleted file mode 100644 index 05cb0dfc7966a..0000000000000 --- a/Calibration/HcalAlCaRecoProducers/src/ProducerAnalyzer.h +++ /dev/null @@ -1,82 +0,0 @@ -#ifndef CalibrationHcalAlCaRecoProducersProducerAnalyzer_h -#define CalibrationHcalAlCaRecoProducersProducerAnalyzer_h - -// system include files -#include -#include -#include - -// user include files -#include "FWCore/Framework/interface/Frameworkfwd.h" -#include "FWCore/Framework/interface/EDAnalyzer.h" -#include "FWCore/Framework/interface/Event.h" -#include "FWCore/Framework/interface/MakerMacros.h" -#include "FWCore/Framework/interface/EventSetup.h" -#include "FWCore/ParameterSet/interface/ParameterSet.h" - -// collections -#include "DataFormats/HcalRecHit/interface/HcalRecHitCollections.h" -#include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h" -#include "DataFormats/JetReco/interface/CaloJetCollection.h" -#include "DataFormats/HcalCalibObjects/interface/HOCalibVariableCollection.h" -#include "DataFormats/EgammaReco/interface/SuperCluster.h" -#include "DataFormats/EgammaReco/interface/SuperClusterFwd.h" -#include "DataFormats/TrackReco/interface/Track.h" -#include "DataFormats/TrackReco/interface/TrackFwd.h" -#include "DataFormats/MuonReco/interface/MuonFwd.h" - -#include "Geometry/CaloGeometry/interface/CaloGeometry.h" -#include "Geometry/Records/interface/CaloGeometryRecord.h" - -namespace edm { - class ParameterSet; - class Event; - class EventSetup; -} // namespace edm - -namespace cms { - - // - // class declaration - // - - class ProducerAnalyzer : public edm::EDAnalyzer { - public: - explicit ProducerAnalyzer(const edm::ParameterSet&); - ~ProducerAnalyzer() override; - - void analyze(const edm::Event&, const edm::EventSetup&) override; - void beginJob() override; - void endJob() override; - - private: - // ----------member data --------------------------- - std::string nameProd_; - std::string jetCalo_; - std::string gammaClus_; - std::string ecalInput_; - std::string hbheInput_; - std::string hoInput_; - std::string hfInput_; - std::string Tracks_; - - edm::EDGetTokenT tok_hovar_; - edm::EDGetTokenT tok_horeco_; - edm::EDGetTokenT tok_ho_; - edm::EDGetTokenT tok_hoProd_; - - edm::EDGetTokenT tok_hf_; - - edm::EDGetTokenT tok_jets_; - edm::EDGetTokenT tok_gamma_; - edm::EDGetTokenT tok_muons_; - edm::EDGetTokenT tok_ecal_; - edm::EDGetTokenT tok_tracks_; - - edm::EDGetTokenT tok_hbhe_; - edm::EDGetTokenT tok_hbheProd_; - - edm::ESGetToken tok_geom_; - }; -} // end namespace cms -#endif diff --git a/Calibration/HcalAlCaRecoProducers/src/SealModule.cc b/Calibration/HcalAlCaRecoProducers/src/SealModule.cc deleted file mode 100644 index ced88749c125e..0000000000000 --- a/Calibration/HcalAlCaRecoProducers/src/SealModule.cc +++ /dev/null @@ -1,9 +0,0 @@ -#include "FWCore/PluginManager/interface/ModuleDef.h" -#include "FWCore/Framework/interface/MakerMacros.h" -#include "Calibration/HcalAlCaRecoProducers/interface/AlCaEcalHcalReadoutsProducer.h" -#include "Calibration/HcalAlCaRecoProducers/src/ProducerAnalyzer.h" - -using cms::ProducerAnalyzer; - -DEFINE_FWK_MODULE(AlCaEcalHcalReadoutsProducer); -DEFINE_FWK_MODULE(ProducerAnalyzer);