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
SeedingLayerSetsHits
Definition: SeedingLayerSetsHits.h:18
MultiHitGeneratorFromPairAndLayersFactory.h
edm::Handle
Definition: AssociativeIterator.h:50
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
MultiHitGeneratorFromPairAndLayers.h
HLT_2018_cff.InputTag
InputTag
Definition: HLT_2018_cff.py:79016
edm::ParameterSet
Definition: ParameterSet.h:36
Event.h
edm::EventSetup
Definition: EventSetup.h:57
get
#define get
looper.cfg
cfg
Definition: looper.py:297
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
CombinedMultiHitGenerator::theSeedingLayerToken
edm::EDGetTokenT< SeedingLayerSetsHits > theSeedingLayerToken
Definition: CombinedMultiHitGenerator.h:50
HitPairGeneratorFromLayerPair.h
ev
bool ev
Definition: Hydjet2Hadronizer.cc:95
LayerTriplets.h
HLT_2018_cff.region
region
Definition: HLT_2018_cff.py:81479
LayerHitMapCache::clear
void clear()
Definition: LayerHitMapCache.h:69
TrackingRegion
Definition: TrackingRegion.h:38
CombinedMultiHitGenerator::theLayerCache
LayerCacheType theLayerCache
Definition: CombinedMultiHitGenerator.h:52
mps_fire.result
result
Definition: mps_fire.py:303
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:39
hgcalTopologyTester_cfi.layers
layers
Definition: hgcalTopologyTester_cfi.py:8
CombinedMultiHitGenerator::theGenerator
std::unique_ptr< MultiHitGeneratorFromPairAndLayers > theGenerator
Definition: CombinedMultiHitGenerator.h:54