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 }
TrajectorySeedCollection
std::vector< TrajectorySeed > TrajectorySeedCollection
Definition: TrajectorySeedCollection.h:6
hfClusterShapes_cfi.hits
hits
Definition: hfClusterShapes_cfi.py:5
SeedingHitSet
Definition: SeedingHitSet.h:6
SeedGeneratorFromRegionHits.h
ElectronSeedTrackRefFix_cfi.seedCollection
seedCollection
Definition: ElectronSeedTrackRefFix_cfi.py:9
OrderedSeedingHits
Definition: OrderedSeedingHits.h:7
SeedGeneratorFromRegionHits::run
void run(TrajectorySeedCollection &seedCollection, const TrackingRegion &region, const edm::Event &ev, const edm::EventSetup &es)
Definition: SeedGeneratorFromRegionHits.cc:12
SeedGeneratorFromRegionHits::theHitsGenerator
std::unique_ptr< OrderedHitsGenerator > theHitsGenerator
Definition: SeedGeneratorFromRegionHits.h:32
SeedGeneratorFromRegionHits::SeedGeneratorFromRegionHits
SeedGeneratorFromRegionHits(std::unique_ptr< OrderedHitsGenerator > aGenerator, std::unique_ptr< SeedComparitor > aComparitor=nullptr, std::unique_ptr< SeedCreator > aSeedCreator=nullptr)
Definition: SeedGeneratorFromRegionHits.cc:7
OrderedSeedingHits::size
virtual unsigned int size() const =0
HLT_FULL_cff.region
region
Definition: HLT_FULL_cff.py:88286
edm::EventSetup
Definition: EventSetup.h:58
SeedGeneratorFromRegionHits::theComparitor
std::unique_ptr< SeedComparitor > theComparitor
Definition: SeedGeneratorFromRegionHits.h:33
SeedComparitor.h
eostools.move
def move(src, dest)
Definition: eostools.py:511
SeedGeneratorFromRegionHits::theSeedCreator
std::unique_ptr< SeedCreator > theSeedCreator
Definition: SeedGeneratorFromRegionHits.h:34
SeedCreator.h
ev
bool ev
Definition: Hydjet2Hadronizer.cc:97
TrackingRegion
Definition: TrackingRegion.h:41
edm::Event
Definition: Event.h:73
OrderedHitsGenerator.h