1 #include <unordered_map> 41 std::unordered_map<PFLayer::Layer, const CaloSubdetectorGeometry*>
caloGeo_;
58 if (alpakaPfRecHits.metadata().size() != 0) {
59 out.reserve(alpakaPfRecHits.size());
60 for (
size_t i = 0;
i < alpakaPfRecHits.size();
i++) {
62 out.emplace_back(
caloGeo_.at(alpakaPfRecHits[
i].layer())->getGeometry(alpakaPfRecHits[
i].
detId()),
63 alpakaPfRecHits[
i].
detId(),
64 alpakaPfRecHits[
i].layer(),
65 alpakaPfRecHits[
i].energy());
70 const short eta[8] = {0, 0, 1, -1, 1, -1, 1, -1};
71 const short phi[8] = {1, -1, 0, 0, 1, -1, -1, 1};
72 for (
size_t k = 0;
k < 8;
k++)
73 if (alpakaPfRecHits[
i].neighbours()(
k) != -1)
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > geomToken_
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
void addNeighbour(short x, short y, short z, unsigned int)
std::vector< PFRecHit > PFRecHitCollection
collection of PFRecHit objects
ConstView const & const_view() const
Particle flow rechit (rechit + geometry and topology information). See clustering algorithm in PFClus...
const edm::EDPutTokenT< reco::PFRecHitCollection > legacyPfRecHitsToken_
#define DEFINE_FWK_MODULE(type)
void setTime(double time)
std::unordered_map< PFLayer::Layer, const CaloSubdetectorGeometry * > caloGeo_
typename Layout::ConstView ConstView
const edm::EDGetTokenT< reco::PFRecHitHostCollection > alpakaPfRecHitsToken_
void produce(edm::Event &, const edm::EventSetup &) override
void beginRun(edm::Run const &, edm::EventSetup const &) override
LegacyPFRecHitProducer(edm::ParameterSet const &config)
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)