83 auto seedingHitSetsProducer = T_SeedingHitSets();
84 auto intermediateHitTripletsProducer = T_IntermediateHitTriplets(&seedingLayerHits);
86 if(regionDoublets.
empty()) {
87 seedingHitSetsProducer.putEmpty(iEvent);
88 intermediateHitTripletsProducer.putEmpty(iEvent);
100 size_t triplets_total = 0;
102 LogDebug(
"HitTripletEDProducer") <<
"Creating triplets for " << regionDoublets.
regionSize() <<
" regions, and " << trilayers.size() <<
" pair+3rd layers from " << regionDoublets.
layerPairsSize() <<
" layer pairs";
104 for(
const auto& regionLayerPairs: regionDoublets) {
107 auto hitCachePtr_filler_shs = seedingHitSetsProducer.beginRegion(®ion,
nullptr);
108 auto hitCachePtr_filler_iht = intermediateHitTripletsProducer.beginRegion(®ion, std::get<0>(hitCachePtr_filler_shs));
109 auto hitCachePtr = std::get<0>(hitCachePtr_filler_iht);
112 hitCache.
extend(regionLayerPairs.layerHitMapCache());
114 LogTrace(
"HitTripletEDProducer") <<
" starting region";
116 for(
const auto& layerPair: regionLayerPairs) {
117 LogTrace(
"HitTripletEDProducer") <<
" starting layer pair " << layerPair.innerLayerIndex() <<
"," << layerPair.outerLayerIndex();
120 return a.first[0].index() == layerPair.innerLayerIndex() &&
a.first[1].index() == layerPair.outerLayerIndex();
122 if(
found == trilayers.end()) {
123 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";
124 exp <<
"I was looking for layer pair " << layerPair.innerLayerIndex() <<
"," << layerPair.outerLayerIndex() <<
". Triplets have the following pairs:\n";
125 for(
const auto&
a: trilayers) {
126 exp <<
" " <<
a.first[0].index() <<
"," <<
a.first[1].index() <<
": 3rd layers";
127 for(
const auto&
b:
a.second) {
128 exp <<
" " <<
b.index();
134 const auto& thirdLayers =
found->second;
136 this->
generator_.hitTriplets(region, triplets, iEvent, iSetup, layerPair.doublets(), thirdLayers,
137 intermediateHitTripletsProducer.tripletLastLayerIndexVector(), hitCache);
140 LogTrace(
"HitTripletEDProducer") <<
" created " << triplets.
size() <<
" triplets for layer pair " << layerPair.innerLayerIndex() <<
"," << layerPair.outerLayerIndex() <<
" and 3rd layers";
141 for(
const auto&
l: thirdLayers) {
142 LogTrace(
"HitTripletEDProducer") <<
" " <<
l.index();
146 triplets_total += triplets.
size();
147 seedingHitSetsProducer.fill(std::get<1>(hitCachePtr_filler_shs), triplets);
148 intermediateHitTripletsProducer.fill(std::get<1>(hitCachePtr_filler_iht), layerPair.layerPair(), thirdLayers,
triplets);
155 seedingHitSetsProducer.put(iEvent);
156 intermediateHitTripletsProducer.put(iEvent);
std::vector< LayerSetAndLayers > layers(const SeedingLayerSetsHits &sets)
T_HitTripletGenerator generator_
edm::RunningAverage localRA_
std::pair< LayerSet, std::vector< Layer > > LayerSetAndLayers
void extend(const LayerHitMapCache &other)
virtual unsigned int size() const
void update(unsigned int q)