Implements SeedFinderBase.
Definition at line 66 of file LocalMaximumSeedFinder.cc.
74 auto cmp = [&](
int i,
int j) {
return energies[
i] < energies[
j]; };
75 std::priority_queue<int, DynArray<int>, decltype(
cmp)> ordered_hits(
cmp,
std::move(qst));
77 for (
unsigned i = 0;
i <
nhits; ++
i) {
80 auto const& maybeseed = (*input)[
i];
81 energies[
i] = maybeseed.energy();
82 int seedlayer = (
int)maybeseed.layer();
88 double thresholdE = 0.;
89 double thresholdPT2 = 0.;
101 if (maybeseed.energy() < thresholdE || maybeseed.pt2() < thresholdPT2)
105 ordered_hits.push(
i);
108 while (!ordered_hits.empty()) {
109 auto idx = ordered_hits.top();
114 auto const& maybeseed = (*input)[
idx];
118 myNeighbours = maybeseed.neighbours();
121 myNeighbours = _noNeighbours;
124 myNeighbours = maybeseed.neighbours4();
127 myNeighbours = maybeseed.neighbours8();
130 throw cms::Exception(
"InvalidConfiguration") <<
"LocalMaximumSeedFinder only accepts nNeighbors = {-1,0,4,8}";
132 seedable[
idx] =
true;
133 for (
auto neighbour : myNeighbours) {
134 if (!mask[neighbour])
136 if (energies[neighbour] > energies[
idx]) {
138 seedable[
idx] =
false;
143 for (
auto neighbour : myNeighbours) {
148 int seedlayer = (
int)maybeseed.layer();
156 auto const& nei = (*input)[neighbour];
157 if (maybeseed.depth() != nei.depth())
160 std::abs(maybeseed.positionREP().eta() - nei.positionREP().eta()) >
detacut)
165 usable[neighbour] =
false;
171 LogDebug(
"LocalMaximumSeedFinder") <<
" found " <<
std::count(seedable.begin(), seedable.end(),
true) <<
" seeds";
References _nNeighbours, _thresholds, funct::abs(), fileCollector::cmp, submitPVResolutionJobs::count, declareDynArray, SiPixelRawToDigiRegional_cfi::deltaPhi, LEDCalibrationChannels::depth, detacut, dphicut, Exception, PFLayer::HCAL_BARREL1, PFLayer::HCAL_BARREL2, PFLayer::HCAL_ENDCAP, PFLayer::HF_EM, PFLayer::HF_HAD, mps_fire::i, heavyIonCSV_trainingSettings::idx, initDynArray, input, createfilelist::int, dqmiolumiharvest::j, layerOffset, LogDebug, eostools::move(), nhits, findQualityFiles::size, particleFlowZeroSuppressionECAL_cff::thresholds, and unInitDynArray.