85 auto seedingHitSetsProducer = T_SeedingHitSets();
86 auto intermediateHitTripletsProducer = T_IntermediateHitTriplets(&seedingLayerHits);
88 if(regionDoublets.
empty()) {
89 seedingHitSetsProducer.putEmpty(iEvent);
90 intermediateHitTripletsProducer.putEmpty(iEvent);
102 size_t triplets_total = 0;
104 LogDebug(
"HitTripletEDProducer") <<
"Creating triplets for " << regionDoublets.
regionSize() <<
" regions, and " << trilayers.size() <<
" pair+3rd layers from " << regionDoublets.
layerPairsSize() <<
" layer pairs";
106 for(
const auto& regionLayerPairs: regionDoublets) {
109 auto hitCachePtr_filler_shs = seedingHitSetsProducer.beginRegion(®ion,
nullptr);
110 auto hitCachePtr_filler_iht = intermediateHitTripletsProducer.beginRegion(®ion, std::get<0>(hitCachePtr_filler_shs));
111 auto hitCachePtr = std::get<0>(hitCachePtr_filler_iht);
114 hitCache.
extend(regionLayerPairs.layerHitMapCache());
116 LogTrace(
"HitTripletEDProducer") <<
" starting region";
118 for(
const auto& layerPair: regionLayerPairs) {
119 LogTrace(
"HitTripletEDProducer") <<
" starting layer pair " << layerPair.innerLayerIndex() <<
"," << layerPair.outerLayerIndex();
122 return a.first[0].index() == layerPair.innerLayerIndex() &&
a.first[1].index() == layerPair.outerLayerIndex();
124 if(
found == trilayers.end()) {
125 auto exp =
cms::Exception(
"LogicError") <<
"Did not find the layer pair from vector<pair+third layers>. This is a sign of some internal inconsistency\n";
126 exp <<
"I was looking for layer pair " << layerPair.innerLayerIndex() <<
"," << layerPair.outerLayerIndex() <<
". Triplets have the following pairs:\n";
127 for(
const auto&
a: trilayers) {
128 exp <<
" " <<
a.first[0].index() <<
"," <<
a.first[1].index() <<
": 3rd layers";
129 for(
const auto&
b:
a.second) {
130 exp <<
" " <<
b.index();
136 const auto& thirdLayers =
found->second;
138 this->
generator_.hitTriplets(region, triplets, iEvent, iSetup, layerPair.doublets(), thirdLayers,
139 intermediateHitTripletsProducer.tripletLastLayerIndexVector(), hitCache);
142 LogTrace(
"HitTripletEDProducer") <<
" created " << triplets.
size() <<
" triplets for layer pair " << layerPair.innerLayerIndex() <<
"," << layerPair.outerLayerIndex() <<
" and 3rd layers";
143 for(
const auto&
l: thirdLayers) {
144 LogTrace(
"HitTripletEDProducer") <<
" " <<
l.index();
148 triplets_total += triplets.
size();
149 seedingHitSetsProducer.fill(std::get<1>(hitCachePtr_filler_shs), triplets);
150 intermediateHitTripletsProducer.fill(std::get<1>(hitCachePtr_filler_iht), layerPair.layerPair(), thirdLayers,
triplets);
157 seedingHitSetsProducer.put(iEvent);
158 intermediateHitTripletsProducer.put(iEvent);
std::vector< LayerSetAndLayers > layers(const SeedingLayerSetsHits &sets)
T_HitTripletGenerator generator_
unsigned int size() const override
edm::RunningAverage localRA_
std::pair< LayerSet, std::vector< Layer > > LayerSetAndLayers
void extend(const LayerHitMapCache &other)
void update(unsigned int q)