#include <SeedGeneratorFromRegionHits.h>
Public Member Functions | |
void | run (TrajectorySeedCollection &seedCollection, const TrackingRegion ®ion, const edm::Event &ev, const edm::EventSetup &es) |
SeedGeneratorFromRegionHits (OrderedHitsGenerator *aGenerator, SeedComparitor *aComparitor=0, SeedCreator *aSeedCreator=0) | |
~SeedGeneratorFromRegionHits () | |
Private Attributes | |
SeedComparitor * | theComparitor |
OrderedHitsGenerator * | theHitsGenerator |
SeedCreator * | theSeedCreator |
Definition at line 14 of file SeedGeneratorFromRegionHits.h.
SeedGeneratorFromRegionHits::SeedGeneratorFromRegionHits | ( | OrderedHitsGenerator * | aGenerator, |
SeedComparitor * | aComparitor = 0 , |
||
SeedCreator * | aSeedCreator = 0 |
||
) |
Definition at line 24 of file SeedGeneratorFromRegionHits.cc.
: theHitsGenerator(ohg), theComparitor(asc), theSeedCreator(asp) { }
SeedGeneratorFromRegionHits::~SeedGeneratorFromRegionHits | ( | ) |
Definition at line 30 of file SeedGeneratorFromRegionHits.cc.
References theComparitor, theHitsGenerator, and theSeedCreator.
{ delete theHitsGenerator; delete theComparitor; delete theSeedCreator; }
void SeedGeneratorFromRegionHits::run | ( | TrajectorySeedCollection & | seedCollection, |
const TrackingRegion & | region, | ||
const edm::Event & | ev, | ||
const edm::EventSetup & | es | ||
) |
Definition at line 37 of file SeedGeneratorFromRegionHits.cc.
References OrderedHitsGenerator::clear(), SeedComparitor::compatible(), SeedComparitor::init(), OrderedHitsGenerator::run(), OrderedSeedingHits::size(), theComparitor, theHitsGenerator, theSeedCreator, and SeedCreator::trajectorySeed().
Referenced by EgammaHLTRegionalPixelSeedGeneratorProducers::produce(), SeedGeneratorFromRegionHitsEDProducer::produce(), TSGFromOrderedHits::run(), and TSGSmart::run().
{ if (theComparitor) theComparitor->init(es); const OrderedSeedingHits & hitss = theHitsGenerator->run(region, ev, es); unsigned int nHitss = hitss.size(); if (seedCollection.empty()) seedCollection.reserve(nHitss); // don't do multiple reserves in the case of multiple regions: it would make things even worse // as it will cause N re-allocations instead of the normal log(N)/log(2) for (unsigned int iHits = 0; iHits < nHitss; ++iHits) { const SeedingHitSet & hits = hitss[iHits]; if (!theComparitor || theComparitor->compatible(hits, region) ) { theSeedCreator->trajectorySeed(seedCollection, hits, region, es, theComparitor); } } theHitsGenerator->clear(); }
Definition at line 33 of file SeedGeneratorFromRegionHits.h.
Referenced by run(), and ~SeedGeneratorFromRegionHits().
Definition at line 32 of file SeedGeneratorFromRegionHits.h.
Referenced by run(), and ~SeedGeneratorFromRegionHits().
Definition at line 34 of file SeedGeneratorFromRegionHits.h.
Referenced by run(), and ~SeedGeneratorFromRegionHits().