1 #ifndef RecoParticleFlow_PFClusterProducer_PFPSRecHitCreator_h
2 #define RecoParticleFlow_PFClusterProducer_PFPSRecHitCreator_h
49 for(
const auto& erh : *recHitHandle ) {
51 auto energy = erh.energy();
55 switch( detid.plane() ) {
64 <<
"incorrect preshower plane !! plane number "
65 <<detid.plane()<<std::endl;
75 <<
"warning detid "<<detid.rawId()
76 <<
" not found in geometry"<<std::endl;
80 out->emplace_back(thisCell, detid.rawId(),layer,
energy);
81 auto & rh = out->back();
82 rh.setDepth(detid.plane());
83 rh.setTime(erh.time());
85 bool rcleaned =
false;
90 if (!qtest->test(rh,erh,rcleaned)) {
96 cleaned->push_back(
std::move(out->back()));
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
std::vector< std::unique_ptr< PFRecHitQTestBase > > qualityTests_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
virtual const CaloCellGeometry * getGeometry(const DetId &id) const
Get the cell geometry of a given detector id. Should return false if not found.
void beginEvent(const edm::Event &event, const edm::EventSetup &setup)
void importRecHits(std::auto_ptr< reco::PFRecHitCollection > &out, std::auto_ptr< reco::PFRecHitCollection > &cleaned, const edm::Event &iEvent, const edm::EventSetup &iSetup)
edm::EDGetTokenT< EcalRecHitCollection > recHitToken_
PFPSRecHitCreator(const edm::ParameterSet &iConfig, edm::ConsumesCollector &iC)