52 if(comparitorName !=
"none") {
59 if(creatorName !=
"none")
62 produces<RegionsSeedingHitSets>();
63 produces<TrajectorySeedCollection>();
70 desc.
add<
std::string>(
"ttrhBuilderLabel",
"PixelTTRHBuilderWithoutAngle");
71 desc.
add<
bool>(
"mergeTriplets",
true);
72 desc.
add<
bool>(
"addRemainingTriplets",
false);
84 descComparitor.setAllowAnything();
88 descCreator.setAllowAnything();
91 descriptions.
add(
"pixelQuadrupletMergerEDProducer", desc);
97 const auto& regionTriplets = *htriplets;
100 if(regionTriplets.empty()) {
107 auto tmpSeedCollection = std::make_unique<TrajectorySeedCollection>();
115 LogDebug(
"PixelQuadrupletMergerEDProducer") <<
"Creating quadruplets for " << regionTriplets.regionSize() <<
" regions from " << regionTriplets.size() <<
" triplets";
121 for(
const auto& regionSeedingHitSets: regionTriplets) {
131 for(
const auto&
hits: regionSeedingHitSets) {
139 for(
const auto&
seed: *tmpSeedCollection) {
140 auto hitRange =
seed.recHits();
142 tripletsPerRegion.emplace_back(static_cast<SeedingHitSet::ConstRecHitPointer>(&*(hitRange.first)),
143 static_cast<SeedingHitSet::ConstRecHitPointer>(&*(hitRange.first+1)),
144 static_cast<SeedingHitSet::ConstRecHitPointer>(&*(hitRange.first+2)));
148 for(
const auto&
hits: regionSeedingHitSets) {
149 tripletsPerRegion.emplace_back(
hits[0],
hits[1],
hits[2]);
153 LogTrace(
"PixelQuadrupletEDProducer") <<
" starting region, number of triplets " << tripletsPerRegion.
size();
157 LogTrace(
"PixelQuadrupletEDProducer") <<
" created " << quadruplets.size() <<
" quadruplets";
159 for(
size_t i=0;
i!= quadruplets.size(); ++
i) {
160 const auto& quad = quadruplets[
i];
161 seedingHitSetsFiller.emplace_back(quad[0], quad[1], quad[2], quad[3]);
164 tripletsPerRegion.clear();
169 tmpSeedCollection->shrink_to_fit();
T getParameter(std::string const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
PixelQuadrupletMergerEDProducer(const edm::ParameterSet &iConfig)
void setTTRHBuilderLabel(std::string)
def create(alignables, pedeDump, additionalData, outputFile, config)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
void setAllowAnything()
allow any parameter label/value pairs
edm::EDGetTokenT< RegionsSeedingHitSets > tripletToken_
#define DEFINE_FWK_MODULE(type)
void setMergeTriplets(bool)
virtual unsigned int size() const
~PixelQuadrupletMergerEDProducer()=default
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
std::unique_ptr< SeedCreator > seedCreator_
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void update(const edm::EventSetup &)
const OrderedSeedingHits & mergeTriplets(const OrderedSeedingHits &, const edm::EventSetup &)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void setAddRemainingTriplets(bool)
virtual void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
edm::RunningAverage localRA_
std::unique_ptr< SeedComparitor > comparitor_
QuadrupletSeedMerger merger_
T get(const Candidate &c)
void update(unsigned int q)