1 #ifndef RecoParticleFlow_PFClusterProducer_PFHGCalRecHitCreator_h 2 #define RecoParticleFlow_PFClusterProducer_PFHGCalRecHitCreator_h 25 template <
typename DET,PFLayer::Layer Layer,
unsigned subdet>
53 unsigned skipped_rechits = 0;
54 for (
const auto & hgrh : rechits) {
55 const DET detid(hgrh.detid());
57 if( subdet != detid.subdetId() ) {
59 <<
"subdet expected: " << subdet
60 <<
" subdet gotten: " << detid.subdetId() << std::endl;
63 double energy = hgrh.energy();
64 double time = hgrh.time();
71 <<
"warning detid "<<detid.rawId()
72 <<
" not found in geometry"<<std::endl;
80 bool rcleaned =
false;
95 cleaned->push_back(rh);
98 <<
"Skipped " << skipped_rechits
99 <<
" out of " << rechits.size() <<
" rechits!" << std::endl;
101 <<
"Created " << out->size() <<
" PFRecHits!" << std::endl;
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
PFHGCalRecHitCreator< HGCalDetId, PFLayer::HGCAL, HGCHEF > PFHGCHEFRecHitCreator
std::vector< std::unique_ptr< PFRecHitQTestBase > > qualityTests_
PFHGCalRecHitCreator< HcalDetId,PFLayer::HGCAL, HcalEndcap > PFHGCHEBRecHitCreator
bool getByToken(EDGetToken token, Handle< PROD > &result) const
void importRecHits(std::unique_ptr< reco::PFRecHitCollection > &out, std::unique_ptr< reco::PFRecHitCollection > &cleaned, const edm::Event &iEvent, const edm::EventSetup &iSetup) override
PFHGCalRecHitCreator< HGCalDetId, PFLayer::HGCAL, HGCEE > PFHGCEERecHitCreator
PFHGCalRecHitCreator(const edm::ParameterSet &iConfig, edm::ConsumesCollector &iC)
CaloGeometry const * getGeometry()
SeedingLayerSetsHits::SeedingLayer Layer
hgcal::RecHitTools recHitTools_
Particle flow rechit (rechit + geometry and topology information). See clustering algorithm in PFClus...
edm::EDGetTokenT< HGCRecHitCollection > recHitToken_
std::string geometryInstance_
T const * product() const