30 auto const& hits = *
input;
31 std::vector<unsigned> ordered_hits(hits.size());
32 for (
unsigned i = 0;
i < hits.size(); ++
i)
35 std::sort(ordered_hits.begin(), ordered_hits.end(), [&](
unsigned i,
unsigned j) {
36 return hits[
i].energy() > hits[
j].energy();
39 for (
const auto& idx : ordered_hits) {
unsigned detId() const
rechit detId
void update(const edm::EventSetup &) override
static std::string const input
edm::ESGetToken< EcalPFSeedingThresholds, EcalPFSeedingThresholdsRcd > thsToken_
Particle flow rechit (rechit + geometry and topology information). See clustering algorithm in PFClus...
void clean(const edm::Handle< reco::PFRecHitCollection > &input, std::vector< bool > &mask) override
edm::ESHandle< EcalPFSeedingThresholds > ths_
float energy() const
rechit energy
#define DEFINE_EDM_PLUGIN(factory, type, name)
ECALPFSeedCleaner & operator=(const ECALPFSeedCleaner &)=delete
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
ECALPFSeedCleaner(const edm::ParameterSet &conf, edm::ConsumesCollector &cc)