test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SeedCleanerByHitPosition.cc
Go to the documentation of this file.
3 
5 
7  // edm::LogInfo("SeedCleanerByHitPosition") << " Calls: " << calls_ << ", Tracks: " << tracks_ <<", Comps: " << comps_ << " Vault: " << trajectories->size() << ".";
8  // calls_ = comps_ = tracks_ = 0;
9 
10  trajectories = 0;
11 }
15  typedef Trajectory::RecHitContainer::const_iterator TI;
16  TrajectorySeed::range range = seed->recHits();
17  SI first = range.first, curr = range.first, last = range.second;
18  //calls_++;
19  for (std::vector<Trajectory>::const_iterator trj = trajectories->begin(),
20  trjEnd =trajectories->end();
21  trj != trjEnd; ++trj) {
22  //tracks_++;
23  Trajectory::RecHitContainer hits = trj->recHits();
24  TI ts = hits.begin(), tc = ts, te = hits.end();
25  for (curr = first; curr < last; ++curr) {
26  bool found = false;
27  for (TI it = tc; it != te; ++it) {
28  //comps_++;
29  if (comp.equals(&(*curr), &(**it))) {
30  tc = it; found = true; break;
31  }
32  }
33  if (found == false) {
34  for (TI it = ts; it != tc; ++it) {
35  //comps_++;
36  if (comp.equals(&(*curr), &(**it))) {
37  tc = it; found = true; break;
38  }
39  }
40  if (found == false) break;
41  }
42  }
43  if (curr == last) return false;
44  }
45  return true;
46 }
bool equals(const TrackingRecHit *a, const TrackingRecHit *b) const
recHitContainer::const_iterator const_iterator
std::pair< const_iterator, const_iterator > range
virtual bool good(const TrajectorySeed *seed)
Returns true if the seed is not overlapping with another trajectory.
ConstRecHitContainer RecHitContainer
Definition: Trajectory.h:46
range recHits() const
virtual void done()
Tells the cleaner that the seeds are finished, and so it can clear any cache it has.
const std::vector< Trajectory > * trajectories