55 const auto& regionDoublets = *hdoublets;
60 <<
"MultiHitFromChi2EDProducer expects SeedingLayerSetsHits::numberOfLayersInSet() to be >= 3, got " 62 <<
". This is likely caused by a configuration error of this module, HitPairEDProducer, or " 63 "SeedingLayersEDProducer.";
67 if (regionDoublets.empty()) {
79 std::vector<std::unique_ptr<BaseTrackerRecHit> > refittedHitStorage;
82 LogDebug(
"MultiHitFromChi2EDProducer") <<
"Creating multihits for " << regionDoublets.regionSize() <<
" regions, and " 83 << trilayers.size() <<
" pair+3rd layers from " 84 << regionDoublets.layerPairsSize() <<
" layer pairs";
87 for (
const auto& regionLayerPairs : regionDoublets) {
94 hitCache.
extend(regionLayerPairs.layerHitMapCache());
96 LogTrace(
"MultiHitFromChi2EDProducer") <<
" starting region";
98 for (
const auto& layerPair : regionLayerPairs) {
99 LogTrace(
"MultiHitFromChi2EDProducer")
100 <<
" starting layer pair " << layerPair.innerLayerIndex() <<
"," << layerPair.outerLayerIndex();
103 return a.first[0].index() == layerPair.innerLayerIndex() &&
a.first[1].index() == layerPair.outerLayerIndex();
105 if (
found == trilayers.end()) {
106 auto exp =
cms::Exception(
"LogicError") <<
"Did not find the layer pair from vector<pair+third layers>. This " 107 "is a sign of some internal inconsistency\n";
108 exp <<
"I was looking for layer pair " << layerPair.innerLayerIndex() <<
"," << layerPair.outerLayerIndex()
109 <<
". Triplets have the following pairs:\n";
110 for (
const auto&
a : trilayers) {
111 exp <<
" " <<
a.first[0].index() <<
"," <<
a.first[1].index() <<
": 3rd layers";
112 for (
const auto&
b :
a.second) {
113 exp <<
" " <<
b.index();
119 const auto& thirdLayers =
found->second;
124 LogTrace(
"MultiHitFromChi2EDProducer")
125 <<
" created " << multihits.
size() <<
" multihits for layer pair " << layerPair.innerLayerIndex() <<
"," 126 << layerPair.outerLayerIndex() <<
" and 3rd layers";
127 for (
const auto&
l : thirdLayers) {
128 LogTrace(
"MultiHitFromChi2EDProducer") <<
" " <<
l.index();
133 seedingHitSetsFiller.emplace_back(hitSet);
140 auto storage = std::make_unique<edm::OwnVector<BaseTrackerRecHit> >();
141 storage->reserve(refittedHitStorage.size());
142 for (
auto& ptr : refittedHitStorage)
143 storage->push_back(ptr.release());
146 storage->shrink_to_fit();
unsigned int size() const override
std::vector< LayerSetAndLayers > layers(const SeedingLayerSetsHits &sets)
static RegionFiller dummyFiller()
void initES(const edm::EventSetup &es) override
unsigned short numberOfLayersInSet() const
Get number of layers in each SeedingLayerSets.
std::pair< LayerSet, std::vector< Layer > > LayerSetAndLayers
edm::RunningAverage localRA_
MultiHitGeneratorFromChi2 generator_
void hitSets(const TrackingRegion ®ion, OrderedMultiHits &trs, const edm::Event &ev, const edm::EventSetup &es, SeedingLayerSetsHits::SeedingLayerSet pairLayers, std::vector< SeedingLayerSetsHits::SeedingLayer > thirdLayers) override
void extend(const LayerHitMapCache &other)
edm::EDGetTokenT< IntermediateHitDoublets > doubletToken_
void update(unsigned int q)