Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-05-29 23:13:08

0001 #ifndef SimCalorimetry_HGCalAssociatorProducers_LCToCPAssociatorByEnergyScoreProducer_H
0002 #define SimCalorimetry_HGCalAssociatorProducers_LCToCPAssociatorByEnergyScoreProducer_H
0003 
0004 // Original author: Marco Rovere
0005 
0006 // user include files
0007 #include "FWCore/Framework/interface/Frameworkfwd.h"
0008 #include "FWCore/Framework/interface/global/EDProducer.h"
0009 
0010 #include "FWCore/Framework/interface/Event.h"
0011 #include "FWCore/Framework/interface/MakerMacros.h"
0012 
0013 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0014 #include "HLTrigger/HLTcore/interface/defaultModuleLabel.h"
0015 #include "FWCore/Utilities/interface/EDGetToken.h"
0016 #include "FWCore/Utilities/interface/ESGetToken.h"
0017 
0018 #include "SimDataFormats/Associations/interface/LayerClusterToCaloParticleAssociator.h"
0019 #include "LCToCPAssociatorByEnergyScoreImpl.h"
0020 
0021 #include "DataFormats/HGCRecHit/interface/HGCRecHitCollections.h"
0022 
0023 template <typename HIT>
0024 class LCToCPAssociatorByEnergyScoreProducer : public edm::global::EDProducer<> {
0025 public:
0026   explicit LCToCPAssociatorByEnergyScoreProducer(const edm::ParameterSet &);
0027   ~LCToCPAssociatorByEnergyScoreProducer() override;
0028 
0029   static void fillDescriptions(edm::ConfigurationDescriptions &descriptions);
0030 
0031 private:
0032   void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override;
0033   edm::EDGetTokenT<std::unordered_map<DetId, const unsigned int>> hitMap_;
0034   edm::ESGetToken<CaloGeometry, CaloGeometryRecord> caloGeometry_;
0035   const bool hardScatterOnly_;
0036   std::shared_ptr<hgcal::RecHitTools> rhtools_;
0037   std::vector<edm::InputTag> hits_label_;
0038   std::vector<edm::EDGetTokenT<HGCRecHitCollection>> hgcal_hits_token_;
0039   std::vector<edm::EDGetTokenT<std::vector<HIT>>> hits_token_;
0040 };
0041 
0042 template class LCToCPAssociatorByEnergyScoreProducer<HGCRecHit>;
0043 template class LCToCPAssociatorByEnergyScoreProducer<reco::PFRecHit>;
0044 
0045 using HGCalLCToCPAssociatorByEnergyScoreProducer = LCToCPAssociatorByEnergyScoreProducer<HGCRecHit>;
0046 DEFINE_FWK_MODULE(HGCalLCToCPAssociatorByEnergyScoreProducer);
0047 using BarrelLCToCPAssociatorByEnergyScoreProducer = LCToCPAssociatorByEnergyScoreProducer<reco::PFRecHit>;
0048 DEFINE_FWK_MODULE(BarrelLCToCPAssociatorByEnergyScoreProducer);
0049 
0050 #endif