CMS 3D CMS Logo

CachingSeedCleanerBySharedInput.h
Go to the documentation of this file.
1 #ifndef CachingSeedCleanerBySharedInput_H
2 #define CachingSeedCleanerBySharedInput_H
4 #include <map>
5 #include <unordered_map>
6 
9 public:
10  // in this implementation it populate the cache
11  void add(const Trajectory *traj) override;
12 
14  void init(const std::vector<Trajectory> *vect) override;
15 
16  void done() override;
17 
19  bool good(const TrajectorySeed *seed) override;
20 
21  CachingSeedCleanerBySharedInput(unsigned int numHitsForSeedCleaner = 4, bool onlyPixelHits = false)
23 
24 private:
25  std::vector<Trajectory::RecHitContainer> theVault;
26  std::unordered_multimap<unsigned int, unsigned int> theCache;
27 
30 
31  //uint64_t comps_, tracks_, calls_;
32 };
33 
34 #endif
void done() override
Tells the cleaner that the seeds are finished, and so it can clear any cache it has.
bool good(const TrajectorySeed *seed) override
Returns true if the seed is not overlapping with another trajectory.
void add(const Trajectory *traj) override
Informs the cleaner that a new trajectory has been made, in case the cleaner keeps a local collection...
CachingSeedCleanerBySharedInput(unsigned int numHitsForSeedCleaner=4, bool onlyPixelHits=false)
std::unordered_multimap< unsigned int, unsigned int > theCache
std::vector< Trajectory::RecHitContainer > theVault
void init(const std::vector< Trajectory > *vect) override
Provides the cleaner a pointer to the vector where trajectories are stored, in case it does not want ...