00001 #ifndef CachingSeedCleanerBySharedInput_H 00002 #define CachingSeedCleanerBySharedInput_H 00003 #include "RecoTracker/CkfPattern/interface/RedundantSeedCleaner.h" 00004 #include <map> 00005 #include <boost/unordered_map.hpp> 00006 00008 class CachingSeedCleanerBySharedInput : public RedundantSeedCleaner { 00009 public: 00010 00012 virtual void add(const Trajectory *traj) ; 00013 00015 virtual void init(const std::vector<Trajectory> *vect) ; 00016 00017 virtual void done() ; 00018 00020 virtual bool good(const TrajectorySeed *seed) ; 00021 00022 CachingSeedCleanerBySharedInput(unsigned int numHitsForSeedCleaner=4, 00023 bool onlyPixelHits=false) : 00024 RedundantSeedCleaner(), theVault(), theCache(), 00025 theNumHitsForSeedCleaner(numHitsForSeedCleaner),theOnlyPixelHits(onlyPixelHits){} 00026 00027 virtual ~CachingSeedCleanerBySharedInput() { theVault.clear(); theCache.clear(); } 00028 private: 00029 std::vector<Trajectory::RecHitContainer> theVault; 00030 //std::multimap<uint32_t, unsigned int> theCache; 00031 boost::unordered_multimap<uint32_t, unsigned int> theCache; 00032 00033 int theNumHitsForSeedCleaner; 00034 bool theOnlyPixelHits; 00035 00036 //uint64_t comps_, tracks_, calls_; 00037 }; 00038 00039 #endif