1 #ifndef RecoParticleFlow_PFClusterProducer_PFPSRecHitCreator_h 2 #define RecoParticleFlow_PFClusterProducer_PFPSRecHitCreator_h 48 for(
const auto& erh : *recHitHandle ) {
50 auto energy = erh.energy();
54 switch( detid.plane() ) {
63 <<
"incorrect preshower plane !! plane number " 64 <<detid.plane()<<std::endl;
74 <<
"warning detid "<<detid.rawId()
75 <<
" not found in geometry"<<std::endl;
79 out->emplace_back(thisCell, detid.rawId(),layer,energy);
80 auto & rh = out->back();
81 rh.setDepth(detid.plane());
82 rh.setTime(erh.time());
84 bool rcleaned =
false;
90 if (!qtest->test(rh,erh,rcleaned,hi)) {
96 cleaned->push_back(
std::move(out->back()));
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
void importRecHits(std::unique_ptr< reco::PFRecHitCollection > &out, std::unique_ptr< reco::PFRecHitCollection > &cleaned, const edm::Event &iEvent, const edm::EventSetup &iSetup) override
std::vector< std::unique_ptr< PFRecHitQTestBase > > qualityTests_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
void beginEvent(const edm::Event &event, const edm::EventSetup &setup)
virtual std::shared_ptr< const CaloCellGeometry > getGeometry(const DetId &id) const
Get the cell geometry of a given detector id. Should return false if not found.
edm::EDGetTokenT< EcalRecHitCollection > recHitToken_
PFPSRecHitCreator(const edm::ParameterSet &iConfig, edm::ConsumesCollector &iC)