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)
 
 SeedGeneratorFromRegionHits (std::unique_ptr< OrderedHitsGenerator > aGenerator, std::unique_ptr< SeedComparitor > aComparitor=nullptr, std::unique_ptr< SeedCreator > aSeedCreator=nullptr)
 

Private Attributes

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

Detailed Description

Definition at line 19 of file SeedGeneratorFromRegionHits.h.

Constructor & Destructor Documentation

◆ SeedGeneratorFromRegionHits()

SeedGeneratorFromRegionHits::SeedGeneratorFromRegionHits ( std::unique_ptr< OrderedHitsGenerator aGenerator,
std::unique_ptr< SeedComparitor aComparitor = nullptr,
std::unique_ptr< SeedCreator aSeedCreator = nullptr 
)

Definition at line 7 of file SeedGeneratorFromRegionHits.cc.

References eostools::move().

Member Function Documentation

◆ run()

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

Definition at line 12 of file SeedGeneratorFromRegionHits.cc.

15  {
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 }

References ev, hfClusterShapes_cfi::hits, HLT_2018_cff::region, ElectronSeedTrackRefFix_cfi::seedCollection, OrderedSeedingHits::size(), theComparitor, theHitsGenerator, and theSeedCreator.

Member Data Documentation

◆ theComparitor

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

Definition at line 33 of file SeedGeneratorFromRegionHits.h.

Referenced by run().

◆ theHitsGenerator

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

Definition at line 32 of file SeedGeneratorFromRegionHits.h.

Referenced by run().

◆ theSeedCreator

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

Definition at line 34 of file SeedGeneratorFromRegionHits.h.

Referenced by run().

hfClusterShapes_cfi.hits
hits
Definition: hfClusterShapes_cfi.py:5
SeedingHitSet
Definition: SeedingHitSet.h:6
ElectronSeedTrackRefFix_cfi.seedCollection
seedCollection
Definition: ElectronSeedTrackRefFix_cfi.py:9
OrderedSeedingHits
Definition: OrderedSeedingHits.h:7
SeedGeneratorFromRegionHits::theHitsGenerator
std::unique_ptr< OrderedHitsGenerator > theHitsGenerator
Definition: SeedGeneratorFromRegionHits.h:32
OrderedSeedingHits::size
virtual unsigned int size() const =0
SeedGeneratorFromRegionHits::theComparitor
std::unique_ptr< SeedComparitor > theComparitor
Definition: SeedGeneratorFromRegionHits.h:33
eostools.move
def move(src, dest)
Definition: eostools.py:511
SeedGeneratorFromRegionHits::theSeedCreator
std::unique_ptr< SeedCreator > theSeedCreator
Definition: SeedGeneratorFromRegionHits.h:34
ev
bool ev
Definition: Hydjet2Hadronizer.cc:95
HLT_2018_cff.region
region
Definition: HLT_2018_cff.py:81479