CMS 3D CMS Logo

CombinedMultiHitGenerator.cc
Go to the documentation of this file.
2 
10 
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 }
18 
20 
23  const edm::Event& ev,
24  const edm::EventSetup& es) {
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 }
Handle.h
CombinedMultiHitGenerator.h
OrderedMultiHits
Definition: OrderedMultiHits.h:8
CombinedMultiHitGenerator::~CombinedMultiHitGenerator
~CombinedMultiHitGenerator() override
Definition: CombinedMultiHitGenerator.cc:19
CombinedMultiHitGenerator::hitSets
void hitSets(const TrackingRegion &reg, OrderedMultiHits &result, const edm::Event &ev, const edm::EventSetup &es) override
from base class
Definition: CombinedMultiHitGenerator.cc:21
edm
HLT enums.
Definition: AlignableModifier.h:19
CombinedMultiHitGenerator::CombinedMultiHitGenerator
CombinedMultiHitGenerator(const edm::ParameterSet &cfg, edm::ConsumesCollector &iC)
Definition: CombinedMultiHitGenerator.cc:11
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89301
SeedingLayerSetsHits
Definition: SeedingLayerSetsHits.h:18
MultiHitGeneratorFromPairAndLayersFactory.h
edm::Handle
Definition: AssociativeIterator.h:50
MultiHitGeneratorFromPairAndLayers.h
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
HLT_FULL_cff.region
region
Definition: HLT_FULL_cff.py:88286
edm::EventSetup
Definition: EventSetup.h:58
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
HitPairGeneratorFromLayerPair.h
ev
bool ev
Definition: Hydjet2Hadronizer.cc:97
LayerTriplets.h
LayerHitMapCache::clear
void clear()
Definition: LayerHitMapCache.h:69
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
TrackingRegion
Definition: TrackingRegion.h:41
CombinedMultiHitGenerator::theLayerCache
LayerCacheType theLayerCache
Definition: CombinedMultiHitGenerator.h:52
mps_fire.result
result
Definition: mps_fire.py:311
ConsumesCollector.h
cms::Exception
Definition: Exception.h:70
edm::Event
Definition: Event.h:73
LayerTriplets::layers
std::vector< LayerSetAndLayers > layers(const SeedingLayerSetsHits &sets)
Definition: LayerTriplets.cc:4
edm::ConsumesCollector
Definition: ConsumesCollector.h:45
hgcalTopologyTester_cfi.layers
layers
Definition: hgcalTopologyTester_cfi.py:8
CombinedMultiHitGenerator::theGenerator
std::unique_ptr< MultiHitGeneratorFromPairAndLayers > theGenerator
Definition: CombinedMultiHitGenerator.h:54