Skip to content

Commit

Permalink
Rearrange all plugins to the plugins directory in Calibration/HcalAlC…
Browse files Browse the repository at this point in the history
…aRecoProducers
  • Loading branch information
Sunanda authored and bsunanda committed Sep 10, 2021
1 parent 70b4862 commit 33f3bec
Show file tree
Hide file tree
Showing 15 changed files with 275 additions and 308 deletions.
30 changes: 0 additions & 30 deletions Calibration/HcalAlCaRecoProducers/BuildFile.xml

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
// -*- C++ -*-

// system include files
#include <memory>
#include <string>
// 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<HBHERecHitCollection> tok_hbhe_;
edm::EDGetTokenT<HORecHitCollection> tok_ho_;
edm::EDGetTokenT<HFRecHitCollection> tok_hf_;

edm::EDPutTokenT<HBHERecHitCollection> put_hbhe_;
edm::EDPutTokenT<HORecHitCollection> put_ho_;
edm::EDPutTokenT<HFRecHitCollection> put_hf_;
};

AlCaEcalHcalReadoutsProducer::AlCaEcalHcalReadoutsProducer(const edm::ParameterSet& iConfig) {
tok_ho_ = consumes<HORecHitCollection>(iConfig.getParameter<edm::InputTag>("hoInput"));
tok_hf_ = consumes<HFRecHitCollection>(iConfig.getParameter<edm::InputTag>("hfInput"));
tok_hbhe_ = consumes<HBHERecHitCollection>(iConfig.getParameter<edm::InputTag>("hbheInput"));

//register your products
put_hbhe_ = produces<HBHERecHitCollection>("HBHERecHitCollection");
put_ho_ = produces<HORecHitCollection>("HORecHitCollection");
put_hf_ = produces<HFRecHitCollection>("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<HBHERecHitCollection> hbhe;
edm::Handle<HORecHitCollection> ho;
edm::Handle<HFRecHitCollection> 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);
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,88 @@ Calibration/HcalIsolatedTrackReco/src/SubdetFEDSelector.cc
*/

#include "Calibration/HcalAlCaRecoProducers/interface/AlCaHcalNoiseProducer.h"
// -*- C++ -*-

// system include files
#include <memory>
#include <string>
// 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<edm::InputTag> ecalLabels_;

edm::EDGetTokenT<reco::CaloJetCollection> tok_jets_;
edm::EDGetTokenT<reco::CaloMETCollection> tok_met_;
edm::EDGetTokenT<CaloTowerCollection> tok_tower_;

edm::EDGetTokenT<HBHERecHitCollection> tok_hbhe_;
edm::EDGetTokenT<HORecHitCollection> tok_ho_;
edm::EDGetTokenT<HFRecHitCollection> tok_hf_;

edm::EDGetTokenT<EcalRecHitCollection> tok_ps_;
edm::EDGetTokenT<FEDRawDataCollection> tok_raw_;
std::vector<edm::EDGetTokenT<EcalRecHitCollection> > toks_ecal_;
};

AlCaHcalNoiseProducer::AlCaHcalNoiseProducer(const edm::ParameterSet& iConfig) {
tok_jets_ = consumes<reco::CaloJetCollection>(iConfig.getParameter<edm::InputTag>("JetSource"));
Expand Down Expand Up @@ -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);
27 changes: 25 additions & 2 deletions Calibration/HcalAlCaRecoProducers/plugins/BuildFile.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,33 @@
<use name="Calibration/IsolatedParticles"/>
<use name="CommonTools/UtilAlgos"/>
<use name="CondFormats/DataRecord"/>
<use name="CondFormats/HcalObjects"/>
<use name="DataFormats/CaloTowers"/>
<use name="DataFormats/DetId"/>
<use name="DataFormats/EcalDetId"/>
<use name="DataFormats/EcalRecHit"/>
<use name="DataFormats/EgammaReco"/>
<use name="DataFormats/FEDRawData"/>
<use name="DataFormats/HcalCalibObjects"/>
<use name="DataFormats/HcalIsolatedTrack"/>
<use name="DataFormats/HcalRecHit"/>
<use name="DataFormats/JetReco"/>
<use name="DataFormats/Luminosity"/>
<use name="DataFormats/METReco"/>
<use name="DataFormats/RecoCandidate"/>
<use name="DataFormats/Scalers"/>
<use name="FWCore/Framework"/>
<use name="FWCore/MessageLogger"/>
<use name="FWCore/ParameterSet"/>
<use name="HLTrigger/HLTcore"/>
<use name="Calibration/IsolatedParticles"/>
<use name="DataFormats/JetReco"/>
<use name="RecoLocalCalo/EcalRecAlgos"/>
<use name="RecoLocalCalo/HcalRecAlgos"/>
<use name="TrackPropagation/SteppingHelixPropagator"/>
<use name="rootphysics"/>
<use name="boost"/>
<use name="hls"/>
<use name="clhep"/>
<use name="root"/>
<library file="*.cc" name="CalibrationHcalAlCaRecoProducersPlugins">
<flags EDM_PLUGIN="1"/>
</library>
Loading

0 comments on commit 33f3bec

Please sign in to comment.