CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
SeedGeneratorFromRegionHits Class Reference

#include <SeedGeneratorFromRegionHits.h>

Public Member Functions

void run (TrajectorySeedCollection &seedCollection, const TrackingRegion &region, const edm::Event &ev, const edm::EventSetup &es)
 
 SeedGeneratorFromRegionHits (OrderedHitsGenerator *aGenerator, SeedComparitor *aComparitor=0, SeedCreator *aSeedCreator=0)
 
 ~SeedGeneratorFromRegionHits ()
 

Private Attributes

SeedComparitortheComparitor
 
OrderedHitsGeneratortheHitsGenerator
 
SeedCreatortheSeedCreator
 

Detailed Description

Definition at line 14 of file SeedGeneratorFromRegionHits.h.

Constructor & Destructor Documentation

SeedGeneratorFromRegionHits::SeedGeneratorFromRegionHits ( OrderedHitsGenerator aGenerator,
SeedComparitor aComparitor = 0,
SeedCreator aSeedCreator = 0 
)

Definition at line 24 of file SeedGeneratorFromRegionHits.cc.

SeedGeneratorFromRegionHits::~SeedGeneratorFromRegionHits ( )

Definition at line 30 of file SeedGeneratorFromRegionHits.cc.

References theComparitor, theHitsGenerator, and theSeedCreator.

31 {
32  delete theHitsGenerator;
33  delete theComparitor;
34  delete theSeedCreator;
35 }

Member Function Documentation

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 SeedGeneratorFromRegionHitsEDProducer::produce(), EgammaHLTRegionalPixelSeedGeneratorProducers::produce(), TSGSmart::run(), and TSGFromOrderedHits::run().

39 {
41  const OrderedSeedingHits & hitss = theHitsGenerator->run(region, ev, es);
42 
43  unsigned int nHitss = hitss.size();
44  if (seedCollection.empty()) seedCollection.reserve(nHitss); // don't do multiple reserves in the case of multiple regions: it would make things even worse
45  // as it will cause N re-allocations instead of the normal log(N)/log(2)
46  for (unsigned int iHits = 0; iHits < nHitss; ++iHits) {
47  const SeedingHitSet & hits = hitss[iHits];
48  if (!theComparitor || theComparitor->compatible(hits, region) ) {
49  theSeedCreator->trajectorySeed(seedCollection, hits, region, es, theComparitor);
50  }
51  }
53 }
virtual unsigned int size() const =0
virtual bool compatible(const SeedingHitSet &hits, const TrackingRegion &region) const =0
virtual void init(const edm::EventSetup &es)=0
virtual const TrajectorySeed * trajectorySeed(TrajectorySeedCollection &seedCollection, const SeedingHitSet &hits, const TrackingRegion &region, const edm::EventSetup &es, const SeedComparitor *filter)=0
virtual const OrderedSeedingHits & run(const TrackingRegion &reg, const edm::Event &ev, const edm::EventSetup &es)=0

Member Data Documentation

SeedComparitor* SeedGeneratorFromRegionHits::theComparitor
private

Definition at line 33 of file SeedGeneratorFromRegionHits.h.

Referenced by run(), and ~SeedGeneratorFromRegionHits().

OrderedHitsGenerator* SeedGeneratorFromRegionHits::theHitsGenerator
private

Definition at line 32 of file SeedGeneratorFromRegionHits.h.

Referenced by run(), and ~SeedGeneratorFromRegionHits().

SeedCreator* SeedGeneratorFromRegionHits::theSeedCreator
private

Definition at line 34 of file SeedGeneratorFromRegionHits.h.

Referenced by run(), and ~SeedGeneratorFromRegionHits().