CMS 3D CMS Logo

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)
 
template<typename GEN >
 SeedGeneratorFromRegionHits (GEN aGenerator)
 
template<typename GEN , typename COMP >
 SeedGeneratorFromRegionHits (GEN aGenerator, COMP aComparitor)
 
template<typename GEN , typename COMP , typename CREA >
 SeedGeneratorFromRegionHits (GEN aGenerator, COMP aComparitor, CREA aSeedCreator)
 

Private Attributes

std::unique_ptr< SeedComparitortheComparitor
 
std::unique_ptr< OrderedHitsGeneratortheHitsGenerator
 
std::unique_ptr< SeedCreatortheSeedCreator
 

Detailed Description

Definition at line 17 of file SeedGeneratorFromRegionHits.h.

Constructor & Destructor Documentation

template<typename GEN >
SeedGeneratorFromRegionHits::SeedGeneratorFromRegionHits ( GEN  aGenerator)
inline

Definition at line 21 of file SeedGeneratorFromRegionHits.h.

21 : SeedGeneratorFromRegionHits(std::move(aGenerator), nullptr, nullptr) {}
def move(src, dest)
Definition: eostools.py:511
template<typename GEN , typename COMP >
SeedGeneratorFromRegionHits::SeedGeneratorFromRegionHits ( GEN  aGenerator,
COMP  aComparitor 
)
inline

Definition at line 24 of file SeedGeneratorFromRegionHits.h.

24 : SeedGeneratorFromRegionHits(std::move(aGenerator), std::move(aComparitor), nullptr) {}
def move(src, dest)
Definition: eostools.py:511
template<typename GEN , typename COMP , typename CREA >
SeedGeneratorFromRegionHits::SeedGeneratorFromRegionHits ( GEN  aGenerator,
COMP  aComparitor,
CREA  aSeedCreator 
)
inline

Definition at line 27 of file SeedGeneratorFromRegionHits.h.

References ev, eostools::move(), writedatasetfile::run, and lowPtGsfElectronSeeds_cfi::seedCollection.

27  :
28  theHitsGenerator{std::move(aGenerator)}, theComparitor{std::move(aComparitor)}, theSeedCreator{std::move(aSeedCreator)}
29  {}
std::unique_ptr< SeedComparitor > theComparitor
std::unique_ptr< SeedCreator > theSeedCreator
std::unique_ptr< OrderedHitsGenerator > theHitsGenerator
def move(src, dest)
Definition: eostools.py:511

Member Function Documentation

void SeedGeneratorFromRegionHits::run ( TrajectorySeedCollection seedCollection,
const TrackingRegion region,
const edm::Event ev,
const edm::EventSetup es 
)

Definition at line 7 of file SeedGeneratorFromRegionHits.cc.

References hfClusterShapes_cfi::hits, OrderedSeedingHits::size(), theComparitor, theHitsGenerator, and theSeedCreator.

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 }
std::unique_ptr< SeedComparitor > theComparitor
virtual unsigned int size() const =0
std::unique_ptr< SeedCreator > theSeedCreator
std::unique_ptr< OrderedHitsGenerator > theHitsGenerator

Member Data Documentation

std::unique_ptr<SeedComparitor> SeedGeneratorFromRegionHits::theComparitor
private

Definition at line 39 of file SeedGeneratorFromRegionHits.h.

Referenced by run().

std::unique_ptr<OrderedHitsGenerator> SeedGeneratorFromRegionHits::theHitsGenerator
private

Definition at line 38 of file SeedGeneratorFromRegionHits.h.

Referenced by run().

std::unique_ptr<SeedCreator> SeedGeneratorFromRegionHits::theSeedCreator
private

Definition at line 40 of file SeedGeneratorFromRegionHits.h.

Referenced by run().