1 #ifndef RecoParticleFlow_PFClusterProducer_PFPSRecHitCreator_h
2 #define RecoParticleFlow_PFClusterProducer_PFPSRecHitCreator_h
34 std::unique_ptr<reco::PFRecHitCollection>& cleaned,
46 for (
const auto& erh : *recHitHandle) {
48 auto energy = erh.energy();
52 switch (detid.plane()) {
61 <<
"incorrect preshower plane !! plane number " << detid.plane() << std::endl;
69 <<
"warning detid " << detid.rawId() <<
" not found in geometry" << std::endl;
73 out->emplace_back(thisCell, detid.rawId(),
layer,
energy);
74 auto& rh = out->back();
75 rh.setDepth(detid.plane());
76 rh.setTime(erh.time());
78 bool rcleaned =
false;
84 if (!qtest->test(rh, erh, rcleaned, hi)) {
90 cleaned->push_back(
std::move(out->back()));
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
Log< level::Error, false > LogError
PFPSRecHitCreator(const edm::ParameterSet &iConfig, edm::ConsumesCollector &cc)
constexpr std::array< uint8_t, layerIndexSize > layer
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > geomToken_
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_
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const