1 #ifndef RecoParticleFlow_PFClusterProducer_PFEcalRecHitCreator_h
2 #define RecoParticleFlow_PFClusterProducer_PFEcalRecHitCreator_h
26 template <
typename Geometry,PFLayer::Layer Layer,
int Detector>
49 const Geometry *ecalGeo =
dynamic_cast< const Geometry*
> (gTmp);
52 for(
const auto& erh : *recHitHandle ) {
53 const DetId& detid = erh.detid();
54 auto energy = erh.energy();
55 auto time = erh.time();
62 <<
"warning detid "<<detid.
rawId()
63 <<
" not found in geometry"<<std::endl;
67 out->emplace_back(thisCell, detid.
rawId(),
Layer,
70 auto & rh = out->back();
72 bool rcleaned =
false;
77 if (!qtest->test(rh,erh,rcleaned)) {
88 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_
void importRecHits(std::auto_ptr< reco::PFRecHitCollection > &out, std::auto_ptr< reco::PFRecHitCollection > &cleaned, const edm::Event &iEvent, const edm::EventSetup &iSetup)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
SeedingLayerSetsHits::SeedingLayer Layer
uint32_t rawId() const
get the raw id
PFEcalRecHitCreator< EcalEndcapGeometry, PFLayer::ECAL_ENDCAP, EcalEndcap > PFEERecHitCreator
edm::EDGetTokenT< EcalRecHitCollection > recHitToken_
void beginEvent(const edm::Event &event, const edm::EventSetup &setup)
PFEcalRecHitCreator< EcalBarrelGeometry, PFLayer::ECAL_BARREL, EcalBarrel > PFEBRecHitCreator
PFEcalRecHitCreator(const edm::ParameterSet &iConfig, edm::ConsumesCollector &iC)