#include <SeedCleanerByHitPosition.h>
Public Member Functions | |
virtual void | add (const Trajectory *traj) |
virtual void | done () |
Tells the cleaner that the seeds are finished, and so it can clear any cache it has. | |
virtual bool | good (const TrajectorySeed *seed) |
Returns true if the seed is not overlapping with another trajectory. | |
virtual void | init (const std::vector< Trajectory > *vect) |
Provides the cleaner a pointer to the vector where trajectories are stored, in case it does not want to keep a local collection of trajectories. | |
SeedCleanerByHitPosition () | |
Private Attributes | |
const std::vector< Trajectory > * | trajectories |
Definition at line 5 of file SeedCleanerByHitPosition.h.
SeedCleanerByHitPosition::SeedCleanerByHitPosition | ( | ) | [inline] |
Definition at line 19 of file SeedCleanerByHitPosition.h.
: RedundantSeedCleaner(), trajectories(0) /*,comps_(0), tracks_(0), calls_(0)*/ {}
virtual void SeedCleanerByHitPosition::add | ( | const Trajectory * | traj | ) | [inline, virtual] |
In this implementation, it does nothing
Implements RedundantSeedCleaner.
Definition at line 8 of file SeedCleanerByHitPosition.h.
{ }
void SeedCleanerByHitPosition::done | ( | ) | [virtual] |
Tells the cleaner that the seeds are finished, and so it can clear any cache it has.
Implements RedundantSeedCleaner.
Definition at line 6 of file SeedCleanerByHitPosition.cc.
References trajectories.
{ // edm::LogInfo("SeedCleanerByHitPosition") << " Calls: " << calls_ << ", Tracks: " << tracks_ <<", Comps: " << comps_ << " Vault: " << trajectories->size() << "."; // calls_ = comps_ = tracks_ = 0; trajectories = 0; }
bool SeedCleanerByHitPosition::good | ( | const TrajectorySeed * | seed | ) | [virtual] |
Returns true if the seed is not overlapping with another trajectory.
Implements RedundantSeedCleaner.
Definition at line 12 of file SeedCleanerByHitPosition.cc.
References AlCaHLTBitMon_QueryRunRegistry::comp, RecHitComparatorByPosition::equals(), first, newFWLiteAna::found, prof2calltree::last, TrajectorySeed::recHits(), and trajectories.
{ static RecHitComparatorByPosition comp; typedef TrajectorySeed::const_iterator SI; typedef Trajectory::RecHitContainer::const_iterator TI; TrajectorySeed::range range = seed->recHits(); SI first = range.first, curr = range.first, last = range.second; //calls_++; for (std::vector<Trajectory>::const_iterator trj = trajectories->begin(), trjEnd =trajectories->end(); trj != trjEnd; ++trj) { //tracks_++; Trajectory::RecHitContainer hits = trj->recHits(); TI ts = hits.begin(), tc = ts, te = hits.end(); for (curr = first; curr < last; ++curr) { bool found = false; for (TI it = tc; it != te; ++it) { //comps_++; if (comp.equals(&(*curr), &(**it))) { tc = it; found = true; break; } } if (found == false) { for (TI it = ts; it != tc; ++it) { //comps_++; if (comp.equals(&(*curr), &(**it))) { tc = it; found = true; break; } } if (found == false) break; } } if (curr == last) return false; } return true; }
virtual void SeedCleanerByHitPosition::init | ( | const std::vector< Trajectory > * | vect | ) | [inline, virtual] |
Provides the cleaner a pointer to the vector where trajectories are stored, in case it does not want to keep a local collection of trajectories.
Implements RedundantSeedCleaner.
Definition at line 11 of file SeedCleanerByHitPosition.h.
References trajectories.
{ trajectories = vect; }
const std::vector<Trajectory>* SeedCleanerByHitPosition::trajectories [private] |
Definition at line 21 of file SeedCleanerByHitPosition.h.