32 [
this](
edm::InputTag const&
tag) { return consumes<TrajectorySeedCollection>(tag); });
33 produces<TrajectorySeedCollection>();
35 if (cfg.
exists(
"clusterRemovalInfos")) {
36 clusterRemovalInfos_ = cfg.
getParameter<std::vector<edm::InputTag> >(
"clusterRemovalInfos");
37 clusterRemovalTokens_.resize(clusterRemovalInfos_.size());
38 for (
unsigned int i = 0;
i < clusterRemovalInfos_.size(); ++
i)
40 clusterRemovalTokens_[
i] = consumes<reco::ClusterRemovalInfo>(clusterRemovalInfos_[
i]);
41 if (!clusterRemovalInfos_.empty() && clusterRemovalInfos_.size() == inputCollections_.size())
50 size_t ninputs = inputCollections_.size();
52 std::vector<Handle<TrajectorySeedCollection> >
seedCollections(ninputs);
53 for (
size_t i = 0;
i < ninputs; ++
i) {
54 ev.
getByToken(inputCollections_[
i], seedCollections[i]);
55 nseeds += seedCollections[
i]->size();
59 auto result = std::make_unique<TrajectorySeedCollection>();
63 unsigned int iSC = 0, iSC_max = seedCollections.size();
64 for (; iSC != iSC_max; ++iSC) {
66 if (reKeing_ && !(clusterRemovalInfos_[iSC] ==
edm::InputTag(
""))) {
69 for (TrajectorySeedCollection::const_iterator iS = collection->begin(); iS != collection->end(); ++iS) {
71 newRecHitContainer.
reserve(iS->nHits());
75 for (; iH != iH_end; ++iH) {
77 refSetter.
reKey(&newRecHitContainer.
back());
83 result->insert(
result->end(), collection->begin(), collection->end());
SeedCombiner(const edm::ParameterSet &cfg)
T getParameter(std::string const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
void reKey(TrackingRecHit *hit) const
bool exists(std::string const ¶meterName) const
checks if a parameter exists
recHitContainer::const_iterator const_iterator
auto vector_transform(std::vector< InputType > const &input, Function predicate) -> std::vector< typename std::remove_cv< typename std::remove_reference< decltype(predicate(input.front()))>::type >::type >
void produce(edm::Event &ev, const edm::EventSetup &es) override