CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Private Attributes
CombinedMultiHitGenerator Class Referencefinal

#include <CombinedMultiHitGenerator.h>

Inheritance diagram for CombinedMultiHitGenerator:
MultiHitGenerator OrderedHitsGenerator

Public Types

typedef LayerHitMapCache LayerCacheType
 

Public Member Functions

void clear () override
 
 CombinedMultiHitGenerator (const edm::ParameterSet &cfg, edm::ConsumesCollector &iC)
 
void hitSets (const TrackingRegion &reg, OrderedMultiHits &result, const edm::Event &ev, const edm::EventSetup &es) override
 from base class More...
 
 ~CombinedMultiHitGenerator () override
 
- Public Member Functions inherited from MultiHitGenerator
virtual void hitSets (const TrackingRegion &reg, OrderedMultiHits &prs, const edm::EventSetup &es)
 
 MultiHitGenerator (unsigned int size=400)
 
 MultiHitGenerator (MultiHitGenerator const &other)
 
const OrderedMultiHitsrun (const TrackingRegion &region, const edm::Event &ev, const edm::EventSetup &es) final
 
 ~MultiHitGenerator () override
 
- Public Member Functions inherited from OrderedHitsGenerator
 OrderedHitsGenerator ()
 
virtual ~OrderedHitsGenerator ()
 

Private Attributes

std::unique_ptr
< MultiHitGeneratorFromPairAndLayers
theGenerator
 
LayerCacheType theLayerCache
 
edm::EDGetTokenT
< SeedingLayerSetsHits
theSeedingLayerToken
 

Additional Inherited Members

- Public Attributes inherited from OrderedHitsGenerator
unsigned int theMaxElement
 
- Protected Attributes inherited from MultiHitGenerator
edm::RunningAverage localRA
 

Detailed Description

Definition at line 29 of file CombinedMultiHitGenerator.h.

Member Typedef Documentation

Definition at line 31 of file CombinedMultiHitGenerator.h.

Constructor & Destructor Documentation

CombinedMultiHitGenerator::CombinedMultiHitGenerator ( const edm::ParameterSet cfg,
edm::ConsumesCollector iC 
)

Definition at line 11 of file CombinedMultiHitGenerator.cc.

References get, edm::ParameterSet::getParameter(), AlCaHLTBitMon_QueryRunRegistry::string, theGenerator, and theLayerCache.

13  edm::ParameterSet generatorPSet = cfg.getParameter<edm::ParameterSet>("GeneratorPSet");
14  std::string generatorName = generatorPSet.getParameter<std::string>("ComponentName");
15  theGenerator = MultiHitGeneratorFromPairAndLayersFactory::get()->create(generatorName, generatorPSet, iC);
16  theGenerator->init(std::make_unique<HitPairGeneratorFromLayerPair>(iC, 0, 1, &theLayerCache), &theLayerCache);
17 }
edm::EDGetTokenT< SeedingLayerSetsHits > theSeedingLayerToken
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
std::unique_ptr< MultiHitGeneratorFromPairAndLayers > theGenerator
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
#define get
CombinedMultiHitGenerator::~CombinedMultiHitGenerator ( )
override

Definition at line 19 of file CombinedMultiHitGenerator.cc.

19 {}

Member Function Documentation

void CombinedMultiHitGenerator::clear ( void  )
inlineoverridevirtual

Reimplemented from MultiHitGenerator.

Definition at line 44 of file CombinedMultiHitGenerator.h.

References MultiHitGenerator::clear().

44  {
46  theGenerator->clear();
47  }
void clear() override
std::unique_ptr< MultiHitGeneratorFromPairAndLayers > theGenerator
void CombinedMultiHitGenerator::hitSets ( const TrackingRegion reg,
OrderedMultiHits result,
const edm::Event ev,
const edm::EventSetup es 
)
overridevirtual

from base class

Implements MultiHitGenerator.

Definition at line 21 of file CombinedMultiHitGenerator.cc.

References LayerHitMapCache::clear(), edm::Event::getByToken(), LayerTriplets::layers(), SeedingLayerSetsHits::numberOfLayersInSet(), theGenerator, theLayerCache, and theSeedingLayerToken.

24  {
26  ev.getByToken(theSeedingLayerToken, hlayers);
27  const SeedingLayerSetsHits& layers = *hlayers;
28  if (layers.numberOfLayersInSet() != 3)
29  throw cms::Exception("Configuration")
30  << "CombinedMultiHitGenerator expects SeedingLayerSetsHits::numberOfLayersInSet() to be 3, got "
31  << layers.numberOfLayersInSet();
32 
33  theGenerator->initES(es);
34 
35  std::vector<LayerTriplets::LayerSetAndLayers> trilayers = LayerTriplets::layers(layers);
36  for (const auto& setAndLayers : trilayers) {
37  theGenerator->hitSets(region, result, ev, es, setAndLayers.first, setAndLayers.second);
38  }
40 }
edm::EDGetTokenT< SeedingLayerSetsHits > theSeedingLayerToken
unsigned short numberOfLayersInSet() const
Get number of layers in each SeedingLayerSets.
std::vector< LayerSetAndLayers > layers(const SeedingLayerSetsHits &sets)
Definition: LayerTriplets.cc:4
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:539
std::unique_ptr< MultiHitGeneratorFromPairAndLayers > theGenerator

Member Data Documentation

std::unique_ptr<MultiHitGeneratorFromPairAndLayers> CombinedMultiHitGenerator::theGenerator
private

Definition at line 54 of file CombinedMultiHitGenerator.h.

Referenced by CombinedMultiHitGenerator(), and hitSets().

LayerCacheType CombinedMultiHitGenerator::theLayerCache
private

Definition at line 52 of file CombinedMultiHitGenerator.h.

Referenced by CombinedMultiHitGenerator(), and hitSets().

edm::EDGetTokenT<SeedingLayerSetsHits> CombinedMultiHitGenerator::theSeedingLayerToken
private

Definition at line 50 of file CombinedMultiHitGenerator.h.

Referenced by hitSets().