Implements SeedFinderBase.
Definition at line 94 of file LocalMaximumSeedFinder.cc.
102 auto cmp = [&](
int i,
int j) {
return energies[
i] < energies[
j]; };
103 std::priority_queue<int, DynArray<int>, decltype(
cmp)> ordered_hits(
cmp,
std::move(qst));
105 for (
unsigned i = 0;
i <
nhits; ++
i) {
108 auto const& maybeseed = (*input)[
i];
109 energies[
i] = maybeseed.energy();
110 int seedlayer = (
int)maybeseed.layer();
116 double thresholdE = 0.;
117 double thresholdPT2 = 0.;
129 if (maybeseed.energy() < thresholdE || maybeseed.pt2() < thresholdPT2)
133 ordered_hits.push(
i);
136 while (!ordered_hits.empty()) {
137 auto idx = ordered_hits.top();
142 auto const& maybeseed = (*input)[
idx];
146 myNeighbours = maybeseed.neighbours();
149 myNeighbours = _noNeighbours;
152 myNeighbours = maybeseed.neighbours4();
155 myNeighbours = maybeseed.neighbours8();
158 throw cms::Exception(
"InvalidConfiguration") <<
"LocalMaximumSeedFinder only accepts nNeighbors = {-1,0,4,8}";
160 seedable[
idx] =
true;
161 for (
auto neighbour : myNeighbours) {
162 if (!mask[neighbour])
164 if (energies[neighbour] > energies[
idx]) {
166 seedable[
idx] =
false;
171 for (
auto neighbour : myNeighbours) {
176 int seedlayer = (
int)maybeseed.layer();
184 auto const& nei = (*input)[neighbour];
185 if (maybeseed.depth() != nei.depth())
188 std::abs(maybeseed.positionREP().eta() - nei.positionREP().eta()) >
detacut)
193 usable[neighbour] =
false;
199 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.