#include <RecoMuon/MuonSeedGenerator/src/MuonSeedSimpleCleaner.h>
Public Member Functions | |
virtual void | clean (TrajectorySeedCollection &seeds) |
Definition at line 6 of file MuonSeedSimpleCleaner.h.
void MuonSeedSimpleCleaner::clean | ( | TrajectorySeedCollection & | seeds | ) | [virtual] |
Implements MuonSeedVCleaner.
Definition at line 3 of file MuonSeedSimpleCleaner.cc.
References counter(), and output().
00004 { 00005 TrajectorySeedCollection output; 00006 for(std::vector<TrajectorySeed>::iterator seed = seeds.begin(); 00007 seed != seeds.end(); ++seed){ 00008 int counter =0; 00009 for(std::vector<TrajectorySeed>::iterator seed2 = seed; 00010 seed2 != seeds.end(); ++seed2) 00011 if( seed->startingState().parameters().vector() == 00012 seed2->startingState().parameters().vector() ) 00013 ++counter; 00014 00015 if( counter > 1 ) seeds.erase(seed--); 00016 else output.push_back(*seed); 00017 } 00018 }