19 for(
const auto& triplet: triplets) {
20 seedingHitSetsFiller.
emplace_back(triplet[0], triplet[1], triplet[2]);
26 for(
const auto& quad: quadruplets) {
27 seedingHitSetsFiller.
emplace_back(quad[0], quad[1], quad[2], quad[3]);
32 template <
typename T_Generator>
50 template <
typename T_Generator>
53 generator_(iConfig, consumesCollector(),
false)
55 produces<RegionsSeedingHitSets>();
58 template <
typename T_Generator>
63 T_Generator::fillDescriptions(desc);
65 auto label = T_Generator::fillDescriptionsLabel() +
std::string(
"EDProducer");
69 template <
typename T_Generator>
73 const auto& regionDoublets = *hdoublets;
77 throw cms::Exception(
"LogicError") <<
"CAHitNtupletEDProducer expects SeedingLayerSetsHits::numberOfLayersInSet() to be >= " << T_Generator::minLayers <<
", got " << seedingLayerHits.
numberOfLayersInSet() <<
". This is likely caused by a configuration error of this module, HitPairEDProducer, or SeedingLayersEDProducer.";
81 if(regionDoublets.empty()) {
85 seedingHitSets->reserve(regionDoublets.regionSize(), localRA_.upper());
86 generator_.initEvent(iEvent, iSetup);
88 LogDebug(
"CAHitNtupletEDProducer") <<
"Creating ntuplets for " << regionDoublets.regionSize() <<
" regions, and " << regionDoublets.layerPairsSize() <<
" layer pairs";
90 typename T_Generator::ResultType ntuplets;
91 ntuplets.reserve(localRA_.upper());
93 for(
const auto& regionLayerPairs: regionDoublets) {
97 LogTrace(
"CAHitNtupletEDProducer") <<
" starting region";
99 generator_.hitNtuplets(regionLayerPairs, ntuplets, iSetup, seedingLayerHits);
100 LogTrace(
"CAHitNtupletEDProducer") <<
" created " << ntuplets.size() <<
" ntuplets";
101 fillNtuplets(seedingHitSetsFiller, ntuplets);
unsigned short numberOfLayersInSet() const
Get number of layers in each SeedingLayerSets.
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
CAHitNtupletEDProducerT(const edm::ParameterSet &iConfig)
virtual void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
ParameterDescriptionBase * add(U const &iLabel, T const &value)
edm::EDGetTokenT< IntermediateHitDoublets > doubletToken_
~CAHitNtupletEDProducerT()=default
Helper class enforcing correct way of filling the doublets of a region.
void emplace_back(Args &&...args)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
volatile std::atomic< bool > shutdown_flag false
edm::RunningAverage localRA_