#include <RedundantSeedCleaner.h>
Public Member Functions | |
virtual void | add (const Trajectory *traj)=0 |
Informs the cleaner that a new trajectory has been made, in case the cleaner keeps a local collection of those tracks (i.e. in a map) | |
void | clean (const std::vector< TrajectorySeed > &, std::vector< TrajectorySeed > &) |
clean | |
void | define (std::vector< TrajectorySeed > &) |
collection definition | |
virtual void | done ()=0 |
Tells the cleaner that the seeds are finished, and so it can clear any cache it has. | |
virtual bool | good (const TrajectorySeed *seed)=0 |
Returns true if the seed is not overlapping with another trajectory. | |
virtual void | init (const std::vector< Trajectory > *vect)=0 |
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. | |
RedundantSeedCleaner () | |
constructor | |
~RedundantSeedCleaner () | |
destructor | |
virtual | ~RedundantSeedCleaner () |
Private Attributes | |
std::vector< TrajectorySeed > | seedTriplets |
std::string | theCategory |
Description: RedundantSeedCleaner (TrackerSeedGenerator) duplicate removal from triplets pairs pixel seeds .
Definition at line 22 of file RedundantSeedCleaner.h.
RedundantSeedCleaner::RedundantSeedCleaner | ( | ) | [inline] |
RedundantSeedCleaner::~RedundantSeedCleaner | ( | ) | [inline] |
virtual RedundantSeedCleaner::~RedundantSeedCleaner | ( | ) | [inline, virtual] |
Definition at line 9 of file RedundantSeedCleaner.h.
{}
virtual void RedundantSeedCleaner::add | ( | const Trajectory * | traj | ) | [pure virtual] |
Informs the cleaner that a new trajectory has been made, in case the cleaner keeps a local collection of those tracks (i.e. in a map)
Implemented in CachingSeedCleanerByHitPosition, CachingSeedCleanerBySharedInput, SeedCleanerByHitPosition, and SeedCleanerBySharedInput.
Referenced by cms::CkfTrackCandidateMakerBase::produceBase(), OutInConversionTrackFinder::tracks(), and InOutConversionTrackFinder::tracks().
void RedundantSeedCleaner::clean | ( | const std::vector< TrajectorySeed > & | seedTr, |
std::vector< TrajectorySeed > & | seed | ||
) |
clean
Definition at line 49 of file RedundantSeedCleaner.cc.
References TrackingRecHit::all, LogDebug, diffTwoXMLs::r1, diffTwoXMLs::r2, query::result, and indexGen::s2.
{ // loop over triplets std::vector<TrajectorySeed> result; std::vector<bool> maskPairs = std::vector<bool>(seed.size(),true); int iPair = 0; for(TrajectorySeedCollection::iterator s1 =seed.begin(); s1 != seed.end(); ++s1){ //rechits from seed TrajectorySeed::range r1 = s1->recHits(); for(TrajectorySeedCollection::const_iterator s2 = seedTr.begin(); s2 != seedTr.end(); ++s2){ //empty if(s2->nHits()==0) continue ; TrajectorySeed::range r2 = s2->recHits(); TrajectorySeed::const_iterator h2 = r2.first; //number of shared hits; int shared = 0; for(;h2 < r2.second;h2++){ for(TrajectorySeed::const_iterator h1 = r1.first; h1 < r1.second;h1++){ if(h2->sharesInput(&(*h1),TrackingRecHit::all)) shared++; if(s1->nHits()!=3) LogDebug(theCategory)<< shared<< " shared hits counter if 2 erease the seed."; } } if(shared ==2 && s1->nHits()!=3) { maskPairs[iPair] = false; } }//end triplets loop ++iPair; }// end pairs loop iPair = 0; //remove pairs in triplets for(TrajectorySeedCollection::iterator s1 = seed.begin(); s1 != seed.end(); ++s1){ if (maskPairs[iPair]) result.push_back(*s1); ++iPair; } // cleaned collection seed.swap(result); }
void RedundantSeedCleaner::define | ( | std::vector< TrajectorySeed > & | coll | ) |
virtual void RedundantSeedCleaner::done | ( | ) | [pure virtual] |
Tells the cleaner that the seeds are finished, and so it can clear any cache it has.
Implemented in CachingSeedCleanerByHitPosition, CachingSeedCleanerBySharedInput, SeedCleanerByHitPosition, and SeedCleanerBySharedInput.
Referenced by cms::CkfTrackCandidateMakerBase::produceBase(), InOutConversionTrackFinder::tracks(), and OutInConversionTrackFinder::tracks().
virtual bool RedundantSeedCleaner::good | ( | const TrajectorySeed * | seed | ) | [pure virtual] |
Returns true if the seed is not overlapping with another trajectory.
Implemented in CachingSeedCleanerByHitPosition, CachingSeedCleanerBySharedInput, SeedCleanerByHitPosition, and SeedCleanerBySharedInput.
Referenced by cms::CkfTrackCandidateMakerBase::produceBase(), OutInConversionTrackFinder::tracks(), and InOutConversionTrackFinder::tracks().
virtual void RedundantSeedCleaner::init | ( | const std::vector< Trajectory > * | vect | ) | [pure 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.
Implemented in CachingSeedCleanerByHitPosition, CachingSeedCleanerBySharedInput, SeedCleanerByHitPosition, and SeedCleanerBySharedInput.
Referenced by cms::CkfTrackCandidateMakerBase::produceBase(), InOutConversionTrackFinder::tracks(), and OutInConversionTrackFinder::tracks().
std::vector<TrajectorySeed> RedundantSeedCleaner::seedTriplets [private] |
Definition at line 38 of file RedundantSeedCleaner.h.
std::string RedundantSeedCleaner::theCategory [private] |
Definition at line 40 of file RedundantSeedCleaner.h.