53 auto nhits = input->size();
58 auto cmp = [&](
int i,
int j) {
return energies[
i] < energies[
j]; };
59 std::priority_queue<int, DynArray<int>, decltype(cmp)> ordered_hits(cmp,
std::move(qst));
61 for(
unsigned i = 0; i <
nhits; ++
i ) {
62 if( !mask[i] )
continue;
63 const auto & maybeseed = (*input)[
i];
64 energies[
i]=maybeseed.energy();
65 int seedlayer = (int)maybeseed.layer();
67 std::abs(maybeseed.positionREP().eta()) > 0.34 ) {
71 if( maybeseed.energy() < thresholds.first ||
72 maybeseed.pt2() < thresholds.second ) usable[i] =
false;
73 if( !usable[i] )
continue;
78 while(!ordered_hits.empty() ) {
79 auto idx = ordered_hits.top();
81 if( !usable[
idx] )
continue;
83 const auto & maybeseed = (*input)[
idx];
87 myNeighbours = maybeseed.neighbours();
90 myNeighbours = _noNeighbours;
93 myNeighbours = maybeseed.neighbours4();
96 myNeighbours = maybeseed.neighbours8();
100 <<
"LocalMaximumSeedFinder only accepts nNeighbors = {-1,0,4,8}";
102 seedable[
idx] =
true;
103 for(
auto neighbour : myNeighbours ) {
104 if( !mask[neighbour] )
continue;
105 if( energies[neighbour] > energies[idx] ) {
107 seedable[
idx] =
false;
111 if( seedable[idx] ) {
112 for(
auto neighbour : myNeighbours ) {
113 usable[neighbour] =
false;
118 LogDebug(
"LocalMaximumSeedFinder") <<
" found " <<
std::count(seedable.begin(),seedable.end(),
true) <<
" seeds";
#define initDynArray(T, n, x, i)
std::array< std::pair< double, double >, 35 > _thresholds
#define unInitDynArray(T, n, x)
Abs< T >::type abs(const T &t)
tuple idx
DEBUGGING if hasattr(process,"trackMonIterativeTracking2012"): print "trackMonIterativeTracking2012 D...
#define declareDynArray(T, n, x)