File indexing completed on 2024-04-06 12:27:58
0001 #ifndef CachingSeedCleanerBySharedInput_H
0002 #define CachingSeedCleanerBySharedInput_H
0003 #include "RecoTracker/CkfPattern/interface/RedundantSeedCleaner.h"
0004 #include <map>
0005 #include <unordered_map>
0006
0007
0008 class CachingSeedCleanerBySharedInput final : public RedundantSeedCleaner {
0009 public:
0010
0011 void add(const Trajectory *traj) override;
0012
0013
0014 void init(const std::vector<Trajectory> *vect) override;
0015
0016 void done() override;
0017
0018
0019 bool good(const TrajectorySeed *seed) override;
0020
0021 CachingSeedCleanerBySharedInput(unsigned int numHitsForSeedCleaner = 4, bool onlyPixelHits = false)
0022 : theNumHitsForSeedCleaner(numHitsForSeedCleaner), theOnlyPixelHits(onlyPixelHits) {}
0023
0024 private:
0025 std::vector<Trajectory::RecHitContainer> theVault;
0026 std::unordered_multimap<unsigned int, unsigned int> theCache;
0027
0028 int theNumHitsForSeedCleaner;
0029 bool theOnlyPixelHits;
0030
0031
0032 };
0033
0034 #endif