CMS 3D CMS Logo

CombinedHitTripletGenerator.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 = HitTripletGeneratorFromPairAndLayersFactory::get()->create(generatorName, generatorPSet, iC);
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  << "CombinedHitTripletGenerator expects SeedingLayerSetsHits::numberOfLayersInSet() to be 3, got "
31  << layers.numberOfLayersInSet();
32 
33  std::vector<LayerTriplets::LayerSetAndLayers> trilayers = LayerTriplets::layers(layers);
34  for (const auto& setAndLayers : trilayers) {
35  theGenerator->hitTriplets(region, result, ev, es, setAndLayers.first, setAndLayers.second);
36  }
38 }
Handle.h
CombinedHitTripletGenerator::theGenerator
std::unique_ptr< HitTripletGeneratorFromPairAndLayers > theGenerator
Definition: CombinedHitTripletGenerator.h:50
HitTripletGeneratorFromPairAndLayers.h
HitTripletGeneratorFromPairAndLayersFactory.h
edm
HLT enums.
Definition: AlignableModifier.h:19
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89287
CombinedHitTripletGenerator::~CombinedHitTripletGenerator
~CombinedHitTripletGenerator() override
Definition: CombinedHitTripletGenerator.cc:19
SeedingLayerSetsHits
Definition: SeedingLayerSetsHits.h:18
CombinedHitTripletGenerator::theSeedingLayerToken
edm::EDGetTokenT< SeedingLayerSetsHits > theSeedingLayerToken
Definition: CombinedHitTripletGenerator.h:46
edm::Handle
Definition: AssociativeIterator.h:50
CombinedHitTripletGenerator::CombinedHitTripletGenerator
CombinedHitTripletGenerator(const edm::ParameterSet &cfg, edm::ConsumesCollector &iC)
Definition: CombinedHitTripletGenerator.cc:11
CombinedHitTripletGenerator.h
CombinedHitTripletGenerator::theLayerCache
LayerCacheType theLayerCache
Definition: CombinedHitTripletGenerator.h:48
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
OrderedHitTriplets
Definition: OrderedHitTriplets.h:9
HLT_FULL_cff.region
region
Definition: HLT_FULL_cff.py:88272
edm::EventSetup
Definition: EventSetup.h:57
get
#define get
looper.cfg
cfg
Definition: looper.py:297
HitPairGeneratorFromLayerPair.h
ev
bool ev
Definition: Hydjet2Hadronizer.cc:95
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
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
CombinedHitTripletGenerator::hitTriplets
void hitTriplets(const TrackingRegion &reg, OrderedHitTriplets &triplets, const edm::Event &ev, const edm::EventSetup &es) override
from base class
Definition: CombinedHitTripletGenerator.cc:21