CMS 3D CMS Logo

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