1 #include <unordered_map> 41 std::unordered_map<PFLayer::Layer, const CaloSubdetectorGeometry*>
caloGeo_;
57 out.reserve(alpakaPfRecHits.size());
59 for (
size_t i = 0;
i < alpakaPfRecHits.size();
i++) {
61 out.emplace_back(
caloGeo_.at(alpakaPfRecHits[
i].layer())->getGeometry(alpakaPfRecHits[
i].
detId()),
62 alpakaPfRecHits[
i].
detId(),
63 alpakaPfRecHits[
i].layer(),
64 alpakaPfRecHits[
i].energy());
69 const short eta[8] = {0, 0, 1, -1, 1, -1, 1, -1};
70 const short phi[8] = {1, -1, 0, 0, 1, -1, -1, 1};
71 for (
size_t k = 0;
k < 8;
k++)
72 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)