CMS 3D CMS Logo

SeedGeneratorFromRegionHits.cc
Go to the documentation of this file.
2 
6 
8  const TrackingRegion & region, const edm::Event& ev, const edm::EventSetup& es)
9 {
10  if (theComparitor) theComparitor->init(ev, es);
11  theSeedCreator->init(region, es, theComparitor.get());
12  const OrderedSeedingHits & hitss = theHitsGenerator->run(region, ev, es);
13 
14  unsigned int nHitss = hitss.size();
15  // Modified 10/Jun/2014 Mark Grimes - At 140 pileup this reserve massively overestimates
16  // the amount of memory required. Removing it doesn't appear to slow down the algorithm
17  // noticeably.
18  //if (seedCollection.empty()) seedCollection.reserve(nHitss); // don't do multiple reserves in the case of multiple regions: it would make things even worse
19  // // as it will cause N re-allocations instead of the normal log(N)/log(2)
20  for (unsigned int iHits = 0; iHits < nHitss; ++iHits) {
21  const SeedingHitSet & hits = hitss[iHits];
22  if (!theComparitor || theComparitor->compatible(hits) ) {
23  theSeedCreator->makeSeed(seedCollection, hits);
24  }
25  }
26  theHitsGenerator->clear();
27 }
bool ev
std::unique_ptr< SeedComparitor > theComparitor
std::vector< TrajectorySeed > TrajectorySeedCollection
virtual unsigned int size() const =0
std::unique_ptr< SeedCreator > theSeedCreator
void run(TrajectorySeedCollection &seedCollection, const TrackingRegion &region, const edm::Event &ev, const edm::EventSetup &es)
std::unique_ptr< OrderedHitsGenerator > theHitsGenerator