CMS 3D CMS Logo

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 (MultiHitGenerator const &other)
 
 MultiHitGenerator (unsigned int size=400)
 
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< MultiHitGeneratorFromPairAndLayerstheGenerator
 
LayerCacheType theLayerCache
 
edm::EDGetTokenT< SeedingLayerSetsHitstheSeedingLayerToken
 

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

◆ LayerCacheType

Definition at line 31 of file CombinedMultiHitGenerator.h.

Constructor & Destructor Documentation

◆ CombinedMultiHitGenerator()

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

Definition at line 11 of file CombinedMultiHitGenerator.cc.

12  : theSeedingLayerToken(iC.consumes<SeedingLayerSetsHits>(cfg.getParameter<edm::InputTag>("SeedingLayers"))) {
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);
16  theGenerator->init(std::make_unique<HitPairGeneratorFromLayerPair>(0, 1, &theLayerCache), &theLayerCache);
17 }

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

◆ ~CombinedMultiHitGenerator()

CombinedMultiHitGenerator::~CombinedMultiHitGenerator ( )
override

Definition at line 19 of file CombinedMultiHitGenerator.cc.

19 {}

Member Function Documentation

◆ clear()

void CombinedMultiHitGenerator::clear ( void  )
inlineoverridevirtual

Reimplemented from MultiHitGenerator.

Definition at line 44 of file CombinedMultiHitGenerator.h.

44  {
46  theGenerator->clear();
47  }

References MultiHitGenerator::clear().

◆ hitSets()

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.

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 }

References LayerHitMapCache::clear(), ev, LayerTriplets::layers(), hgcalTopologyTester_cfi::layers, HLT_FULL_cff::region, mps_fire::result, theGenerator, theLayerCache, and theSeedingLayerToken.

Member Data Documentation

◆ theGenerator

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

Definition at line 54 of file CombinedMultiHitGenerator.h.

Referenced by CombinedMultiHitGenerator(), and hitSets().

◆ theLayerCache

LayerCacheType CombinedMultiHitGenerator::theLayerCache
private

Definition at line 52 of file CombinedMultiHitGenerator.h.

Referenced by CombinedMultiHitGenerator(), and hitSets().

◆ theSeedingLayerToken

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

Definition at line 50 of file CombinedMultiHitGenerator.h.

Referenced by hitSets().

MultiHitGenerator::clear
void clear() override
Definition: MultiHitGenerator.cc:16
SeedingLayerSetsHits
Definition: SeedingLayerSetsHits.h:18
edm::Handle
Definition: AssociativeIterator.h:50
edm::ConsumesCollector::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: ConsumesCollector.h:55
edm::ParameterSet
Definition: ParameterSet.h:47
HLT_FULL_cff.region
region
Definition: HLT_FULL_cff.py:88286
get
#define get
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
looper.cfg
cfg
Definition: looper.py:296
CombinedMultiHitGenerator::theSeedingLayerToken
edm::EDGetTokenT< SeedingLayerSetsHits > theSeedingLayerToken
Definition: CombinedMultiHitGenerator.h:50
ev
bool ev
Definition: Hydjet2Hadronizer.cc:97
LayerHitMapCache::clear
void clear()
Definition: LayerHitMapCache.h:69
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
CombinedMultiHitGenerator::theLayerCache
LayerCacheType theLayerCache
Definition: CombinedMultiHitGenerator.h:52
mps_fire.result
result
Definition: mps_fire.py:311
cms::Exception
Definition: Exception.h:70
LayerTriplets::layers
std::vector< LayerSetAndLayers > layers(const SeedingLayerSetsHits &sets)
Definition: LayerTriplets.cc:4
edm::InputTag
Definition: InputTag.h:15
hgcalTopologyTester_cfi.layers
layers
Definition: hgcalTopologyTester_cfi.py:8
CombinedMultiHitGenerator::theGenerator
std::unique_ptr< MultiHitGeneratorFromPairAndLayers > theGenerator
Definition: CombinedMultiHitGenerator.h:54