51 std::vector<bool> usable(input->size(),
true);
53 std::vector<std::pair<unsigned,double> > ordered_hits;
54 ordered_hits.reserve(input->size());
55 for(
unsigned i = 0;
i < input->size(); ++
i ) {
56 std::pair<unsigned,double> val = std::make_pair(
i,input->at(
i).energy());
57 auto pos = std::upper_bound(ordered_hits.begin(),ordered_hits.end(),
58 val, greaterByEnergy);
59 ordered_hits.insert(pos,val);
62 for(
const auto& idx_e : ordered_hits ) {
63 const unsigned idx = idx_e.first;
64 if( !mask[idx] )
continue;
66 int seedlayer = (int)maybeseed.
layer();
73 if( maybeseed.
energy() < thresholds.first ||
74 maybeseed.
pt2() < thresholds.second ) usable[idx] =
false;
75 if( !usable[idx] )
continue;
93 <<
"LocalMaximumSeedFinder only accepts nNeighbors = {-1,0,4,8}";
97 if( !mask[neighbour.key()] )
continue;
98 if( neighbour->energy() > maybeseed.
energy() ) {
99 seedable[
idx] =
false;
103 if( seedable[idx] ) {
105 usable[neighbour.key()] =
false;
double pt2() const
rechit momentum transverse to the beam, squared.
const PFRecHitRefVector & neighbours4() const
PFLayer::Layer layer() const
rechit layer
Particle flow rechit (rechit + geometry and topology information). See clustering algorithm in PFClus...
std::unordered_map< int, std::pair< double, double > > _thresholds
Abs< T >::type abs(const T &t)
const PFRecHitRefVector & neighbours8() const
tuple idx
DEBUGGING if hasattr(process,"trackMonIterativeTracking2012"): print "trackMonIterativeTracking2012 D...
double energy() const
rechit energy
const REPPoint & positionREP() const
static const reco::PFRecHitRefVector _noNeighbours
const PFRecHitRefVector & neighbours() const