Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef SimCalorimetry_HGCalAssociatorProducers_LCToSCAssociatorByEnergyScoreProducer_H
0002 #define SimCalorimetry_HGCalAssociatorProducers_LCToSCAssociatorByEnergyScoreProducer_H
0003 
0004 // Original author: Leonardo Cristella
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 "FWCore/ParameterSet/interface/defaultModuleLabel.h"
0015 #include "FWCore/Utilities/interface/EDGetToken.h"
0016 #include "FWCore/Utilities/interface/ESGetToken.h"
0017 
0018 #include "SimDataFormats/Associations/interface/LayerClusterToSimClusterAssociator.h"
0019 #include "LCToSCAssociatorByEnergyScoreImpl.h"
0020 
0021 #include "DataFormats/HGCRecHit/interface/HGCRecHitCollections.h"
0022 
0023 template <typename HIT>
0024 class LCToSCAssociatorByEnergyScoreProducer : public edm::global::EDProducer<> {
0025 public:
0026   explicit LCToSCAssociatorByEnergyScoreProducer(const edm::ParameterSet &);
0027   ~LCToSCAssociatorByEnergyScoreProducer() 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 LCToSCAssociatorByEnergyScoreProducer<HGCRecHit>;
0043 template class LCToSCAssociatorByEnergyScoreProducer<reco::PFRecHit>;
0044 
0045 using HGCalLCToSCAssociatorByEnergyScoreProducer = LCToSCAssociatorByEnergyScoreProducer<HGCRecHit>;
0046 DEFINE_FWK_MODULE(HGCalLCToSCAssociatorByEnergyScoreProducer);
0047 using BarrelLCToSCAssociatorByEnergyScoreProducer = LCToSCAssociatorByEnergyScoreProducer<reco::PFRecHit>;
0048 DEFINE_FWK_MODULE(BarrelLCToSCAssociatorByEnergyScoreProducer);
0049 
0050 #endif