75 auto nhits = input->size();
80 auto cmp = [&](
int i,
int j) {
return energies[
i] < energies[j]; };
81 std::priority_queue<int, DynArray<int>, decltype(cmp)> ordered_hits(cmp,
std::move(qst));
83 for(
unsigned i = 0; i <
nhits; ++
i ) {
84 if( !
mask[i] )
continue;
85 auto const & maybeseed = (*input)[
i];
86 energies[
i]=maybeseed.energy();
87 int seedlayer = (
int)maybeseed.layer();
89 std::abs(maybeseed.positionREP().eta()) > 0.34 ) {
96 double thresholdPT2=0.;
98 for (
unsigned int j=0; j<(std::get<2>(
thresholds)).size(); ++j) {
108 if( maybeseed.energy() < thresholdE ||
109 maybeseed.pt2() < thresholdPT2 ) usable[i] =
false;
110 if( !usable[i] )
continue;
111 ordered_hits.push(i);
116 while(!ordered_hits.empty() ) {
117 auto idx = ordered_hits.top();
119 if( !usable[
idx] )
continue;
121 auto const & maybeseed = (*input)[
idx];
125 myNeighbours = maybeseed.neighbours();
128 myNeighbours = _noNeighbours;
131 myNeighbours = maybeseed.neighbours4();
134 myNeighbours = maybeseed.neighbours8();
138 <<
"LocalMaximumSeedFinder only accepts nNeighbors = {-1,0,4,8}";
140 seedable[
idx] =
true;
141 for(
auto neighbour : myNeighbours ) {
142 if( !
mask[neighbour] )
continue;
143 if( energies[neighbour] > energies[idx] ) {
145 seedable[
idx] =
false;
149 if( seedable[idx] ) {
150 for(
auto neighbour : myNeighbours ) {
151 usable[neighbour] =
false;
156 LogDebug(
"LocalMaximumSeedFinder") <<
" found " <<
std::count(seedable.begin(),seedable.end(),
true) <<
" seeds";
#define initDynArray(T, n, x, i)
std::array< I3tuple, 35 > _thresholds
#define unInitDynArray(T, n, x)
Abs< T >::type abs(const T &t)
#define declareDynArray(T, n, x)