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())
52 std::vector<Handle<TrajectorySeedCollection> >
seedCollections(ninputs);
53 for (
size_t i = 0; i < ninputs; ++
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) {
69 for (TrajectorySeedCollection::const_iterator iS = collection->begin(); iS != collection->end(); ++iS) {
71 newRecHitContainer.
reserve(iS->nHits());
73 for (
auto const& recHit : iS->recHits()) {
75 refSetter.
reKey(&newRecHitContainer.
back());
81 result->insert(
result->end(), collection->begin(), collection->end());
SeedCombiner(const edm::ParameterSet &cfg)
std::vector< edm::InputTag > clusterRemovalInfos_
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
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 >
std::vector< edm::EDGetTokenT< reco::ClusterRemovalInfo > > clusterRemovalTokens_
std::vector< edm::EDGetTokenT< TrajectorySeedCollection > > inputCollections_
T getParameter(std::string const &) const
void produce(edm::Event &ev, const edm::EventSetup &es) override