Implements SeedFinderBase.
Definition at line 65 of file LocalMaximumSeedFinder.cc.
73 auto cmp = [&](
int i,
int j) {
return energies[
i] < energies[
j]; };
74 std::priority_queue<int, DynArray<int>, decltype(
cmp)> ordered_hits(
cmp,
std::move(qst));
76 for (
unsigned i = 0;
i <
nhits; ++
i) {
79 auto const& maybeseed = (*input)[
i];
80 energies[
i] = maybeseed.energy();
81 int seedlayer = (
int)maybeseed.layer();
87 double thresholdE = 0.;
88 double thresholdPT2 = 0.;
100 if (maybeseed.energy() < thresholdE || maybeseed.pt2() < thresholdPT2)
104 ordered_hits.push(
i);
107 while (!ordered_hits.empty()) {
108 auto idx = ordered_hits.top();
113 auto const& maybeseed = (*input)[
idx];
117 myNeighbours = maybeseed.neighbours();
120 myNeighbours = _noNeighbours;
123 myNeighbours = maybeseed.neighbours4();
126 myNeighbours = maybeseed.neighbours8();
129 throw cms::Exception(
"InvalidConfiguration") <<
"LocalMaximumSeedFinder only accepts nNeighbors = {-1,0,4,8}";
131 seedable[
idx] =
true;
132 for (
auto neighbour : myNeighbours) {
133 if (!mask[neighbour])
135 if (energies[neighbour] > energies[
idx]) {
137 seedable[
idx] =
false;
142 for (
auto neighbour : myNeighbours) {
143 usable[neighbour] =
false;
148 LogDebug(
"LocalMaximumSeedFinder") <<
" found " <<
std::count(seedable.begin(), seedable.end(),
true) <<
" seeds";
References _nNeighbours, _thresholds, funct::abs(), fileCollector::cmp, submitPVResolutionJobs::count, declareDynArray, LEDCalibrationChannels::depth, Exception, PFLayer::HCAL_BARREL1, PFLayer::HCAL_BARREL2, PFLayer::HCAL_ENDCAP, mps_fire::i, heavyIonCSV_trainingSettings::idx, initDynArray, input, createfilelist::int, dqmiolumiharvest::j, layerOffset, LogDebug, eostools::move(), nhits, findQualityFiles::size, particleFlowZeroSuppressionECAL_cff::thresholds, and unInitDynArray.