87 auto seedingHitSetsProducer = T_SeedingHitSets();
88 auto intermediateHitTripletsProducer = T_IntermediateHitTriplets(&seedingLayerHits);
90 if (regionDoublets.
empty()) {
91 seedingHitSetsProducer.putEmpty(iEvent);
92 intermediateHitTripletsProducer.putEmpty(iEvent);
104 size_t triplets_total = 0;
106 LogDebug(
"HitTripletEDProducer") <<
"Creating triplets for " << regionDoublets.
regionSize() <<
" regions, and " 107 << trilayers.size() <<
" pair+3rd layers from " 110 for (
const auto& regionLayerPairs : regionDoublets) {
113 auto hitCachePtr_filler_shs = seedingHitSetsProducer.beginRegion(®ion,
nullptr);
114 auto hitCachePtr_filler_iht =
115 intermediateHitTripletsProducer.beginRegion(®ion, std::get<0>(hitCachePtr_filler_shs));
116 auto hitCachePtr = std::get<0>(hitCachePtr_filler_iht);
119 hitCache.
extend(regionLayerPairs.layerHitMapCache());
121 LogTrace(
"HitTripletEDProducer") <<
" starting region";
123 for (
const auto& layerPair : regionLayerPairs) {
125 <<
" starting layer pair " << layerPair.innerLayerIndex() <<
"," << layerPair.outerLayerIndex();
128 return a.first[0].index() == layerPair.innerLayerIndex() &&
129 a.first[1].index() == layerPair.outerLayerIndex();
131 if (
found == trilayers.end()) {
132 auto exp =
cms::Exception(
"LogicError") <<
"Did not find the layer pair from vector<pair+third layers>. " 133 "This is a sign of some internal inconsistency\n";
134 exp <<
"I was looking for layer pair " << layerPair.innerLayerIndex() <<
"," << layerPair.outerLayerIndex()
135 <<
". Triplets have the following pairs:\n";
136 for (
const auto&
a : trilayers) {
137 exp <<
" " <<
a.first[0].index() <<
"," <<
a.first[1].index() <<
": 3rd layers";
138 for (
const auto&
b :
a.second) {
139 exp <<
" " <<
b.index();
145 const auto& thirdLayers =
found->second;
151 layerPair.doublets(),
153 intermediateHitTripletsProducer.tripletLastLayerIndexVector(),
158 <<
" created " << triplets.
size() <<
" triplets for layer pair " << layerPair.innerLayerIndex() <<
"," 159 << layerPair.outerLayerIndex() <<
" and 3rd layers";
160 for (
const auto&
l : thirdLayers) {
161 LogTrace(
"HitTripletEDProducer") <<
" " <<
l.index();
165 triplets_total += triplets.
size();
166 seedingHitSetsProducer.fill(std::get<1>(hitCachePtr_filler_shs), triplets);
167 intermediateHitTripletsProducer.fill(
168 std::get<1>(hitCachePtr_filler_iht), layerPair.layerPair(), thirdLayers, triplets);
175 seedingHitSetsProducer.put(iEvent);
176 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)