CMS 3D CMS Logo

MuonSeedSimpleCleaner.cc

Go to the documentation of this file.
00001 #include "RecoMuon/MuonSeedGenerator/src/MuonSeedSimpleCleaner.h"
00002 
00003 void MuonSeedSimpleCleaner::clean(TrajectorySeedCollection & seeds)
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 }
00019 

Generated on Tue Jun 9 17:44:29 2009 for CMSSW by  doxygen 1.5.4