54 const auto& regionTriplets = *htriplets;
58 throw cms::Exception(
"LogicError") <<
"PixelQuadrupletEDProducer expects SeedingLayerSetsHits::numberOfLayersInSet() to be >= 4, got " << seedingLayerHits.
numberOfLayersInSet() <<
". This is likely caused by a configuration error of this module, HitPairEDProducer, or SeedingLayersEDProducer.";
62 if(regionTriplets.empty()) {
71 LogDebug(
"PixelQuadrupletEDProducer") <<
"Creating quadruplets for " << regionTriplets.regionSize() <<
" regions, and " << quadlayers.size() <<
" triplet+4th layers from " << regionTriplets.tripletsSize() <<
" triplets";
76 for(
const auto& regionLayerTriplets: regionTriplets) {
81 hitCache.
extend(regionLayerTriplets.layerHitMapCache());
83 LogTrace(
"PixelQuadrupletEDProducer") <<
" starting region, number of layer triplets " << regionLayerTriplets.layerTripletsSize();
85 for(
const auto& layerTriplet: regionLayerTriplets) {
86 LogTrace(
"PixelQuadrupletEDProducer") <<
" starting layer triplet " << layerTriplet.innerLayerIndex() <<
"," << layerTriplet.middleLayerIndex() <<
"," << layerTriplet.outerLayerIndex();
88 return a.first[0].index() == layerTriplet.innerLayerIndex() &&
89 a.first[1].index() == layerTriplet.middleLayerIndex() &&
90 a.first[2].index() == layerTriplet.outerLayerIndex();
92 if(
found == quadlayers.end()) {
93 auto exp =
cms::Exception(
"LogicError") <<
"Did not find the layer triplet from vector<triplet+fourth layers>. This is a sign of some internal inconsistency\n";
94 exp <<
"I was looking for layer triplet " << layerTriplet.innerLayerIndex() <<
"," << layerTriplet.middleLayerIndex() <<
"," << layerTriplet.outerLayerIndex()
95 <<
". Quadruplets have the following triplets:\n";
96 for(
const auto&
a: quadlayers) {
97 exp <<
" " <<
a.first[0].index() <<
"," <<
a.first[1].index() <<
"," <<
a.first[2].index() <<
": 4th layers";
98 for(
const auto&
b:
a.second) {
99 exp <<
" " <<
b.index();
105 const auto& fourthLayers =
found->second;
107 generator_.
hitQuadruplets(region, quadruplets, iEvent, iSetup, layerTriplet.begin(), layerTriplet.end(), fourthLayers, hitCache);
110 LogTrace(
"PixelQuadrupletEDProducer") <<
" created " << quadruplets.
size() <<
" quadruplets for layer triplet " << layerTriplet.innerLayerIndex() <<
"," << layerTriplet.middleLayerIndex() <<
"," << layerTriplet.outerLayerIndex() <<
" and 4th layers";
111 for(
const auto&
l: fourthLayers) {
112 LogTrace(
"PixelQuadrupletEDProducer") <<
" " <<
l.index();
116 for(
const auto& quad: quadruplets) {
117 seedingHitSetsFiller.emplace_back(quad[0], quad[1], quad[2], quad[3]);
unsigned short numberOfLayersInSet() const
Get number of layers in each SeedingLayerSets.
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
std::pair< LayerSet, std::vector< Layer > > LayerSetAndLayers
bool getByToken(EDGetToken token, Handle< PROD > &result) const
virtual unsigned int size() const
virtual void hitQuadruplets(const TrackingRegion ®ion, OrderedHitSeeds &result, const edm::Event &ev, const edm::EventSetup &es, const SeedingLayerSetsHits::SeedingLayerSet &tripletLayers, const std::vector< SeedingLayerSetsHits::SeedingLayer > &fourthLayers) override
edm::EDGetTokenT< IntermediateHitTriplets > tripletToken_
void extend(const LayerHitMapCache &other)
PixelQuadrupletGenerator generator_
edm::RunningAverage localRA_
std::vector< LayerSetAndLayers > layers(const SeedingLayerSetsHits &sets)
void update(unsigned int q)